-
Notifications
You must be signed in to change notification settings - Fork 3k
fix(ci): keep a fallback comment when the PR review runner dies #9255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
82d3501
0ab52be
95ada48
3cad099
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -71,6 +71,13 @@ concurrency: | |||||
| format('qwen-pr-review-run-{0}', github.run_id) }} | ||||||
| cancel-in-progress: "${{ github.event_name == 'pull_request_target' && (github.event.action == 'synchronize' || github.event.action == 'closed') }}" | ||||||
|
|
||||||
| env: | ||||||
| # Dedup marker for the review-failure fallback comments. The in-job step | ||||||
| # and the fallback-comment job both build their body from it, and the | ||||||
| # cross-job dedup matches it — the sites must stay byte-identical or the | ||||||
| # dedup silently posts duplicates, so the literal is defined once here. | ||||||
| FALLBACK_MARKER: '<!-- qwen-review-fallback -->' | ||||||
|
|
||||||
| jobs: | ||||||
| precheck-pr: | ||||||
| if: |- | ||||||
|
|
@@ -412,6 +419,55 @@ jobs: | |||||
| pull-requests: 'write' | ||||||
| issues: 'write' | ||||||
| steps: | ||||||
| # The runner worker dies in FinalizeJob with EACCES when it loses write | ||||||
| # access to its own directories (observed: '/home/github-runner' no | ||||||
| # longer creatable), taking the whole job down with no fallback comment | ||||||
| # and no cleanup — see the PR #8894 incident. The known trigger on this | ||||||
| # shared pool is a prior containerised job running as root. Probe every | ||||||
| # directory the review must create files in, repair single-directory | ||||||
| # ownership with the same sudo pattern as 'Restore workspace ownership', | ||||||
| # and fail fast with a clear message when repair is impossible — cheaper | ||||||
| # than burning hours of review budget to die at finalize. Only catches | ||||||
| # corruption already present at job start; mid-run corruption is covered | ||||||
| # by the fallback-comment job instead. | ||||||
| - name: 'Verify runner directory health' | ||||||
| run: |- | ||||||
| set -uo pipefail | ||||||
| RUNNER_UID="$(id -u)" | ||||||
| RUNNER_GID="$(id -g)" | ||||||
| # Three levels above the workspace (_work/owner/repo) is the runner | ||||||
| # root, whose _diag/pages dir is what FinalizeJob creates in. | ||||||
| RUNNER_ROOT="$(cd "$GITHUB_WORKSPACE/../../.." && pwd)" | ||||||
| dirs=("$HOME" "${RUNNER_TEMP:?}" "$RUNNER_ROOT") | ||||||
| # A writable runner root does not prove an existing _diag writable | ||||||
| # (ownership is per-directory), so probe it too; when absent, it is | ||||||
| # created by FinalizeJob, which only needs the runner root. | ||||||
| if [ -d "$RUNNER_ROOT/_diag" ]; then | ||||||
| dirs+=("$RUNNER_ROOT/_diag") | ||||||
| fi | ||||||
| status=0 | ||||||
| for dir in "${dirs[@]}"; do | ||||||
| probe="$(mktemp -u "$dir/.qwen-health-XXXXXX")" | ||||||
| if touch "$probe" 2>/dev/null; then | ||||||
| rm -f "$probe" | ||||||
| continue | ||||||
| fi | ||||||
| echo "::warning::no write access to $dir; attempting single-directory repair" | ||||||
| sudo -n chown "$RUNNER_UID:$RUNNER_GID" "$dir" 2>/dev/null || true | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] The repair branch's Suggested fix: have the stub 中文说明修复分支的 建议修复:让 stub — qwen3.8-max via Qwen Code /review (v0.21.12) |
||||||
| sudo -n chmod u+rwx "$dir" 2>/dev/null || true | ||||||
| if touch "$probe" 2>/dev/null; then | ||||||
|
Comment on lines
+456
to
+458
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] R3-3: The health probe's repair-vs-fail-fast decision (probe → repair → re-probe → Suggested fix: add an executed-shape test mirroring 中文说明健康探测的"修复还是快速失败"决策(探测 → 修复 → 复探 → — qwen3.8-max via Qwen Code /review (v0.21.12) |
||||||
| rm -f "$probe" | ||||||
| echo "repaired write access to $dir" | ||||||
| else | ||||||
| echo "::error::runner directory still unusable after repair: $dir" | ||||||
| status=1 | ||||||
| fi | ||||||
| done | ||||||
| if [ "$status" != 0 ]; then | ||||||
| echo "::error::runner directories unhealthy; failing fast instead of dying at job finalize" | ||||||
| fi | ||||||
| exit "$status" | ||||||
|
|
||||||
| # Self-hosted runners reuse the workspace; a prior containerised job can | ||||||
| # leave root-owned, read-only files anywhere in it. Restore ownership and | ||||||
| # write permission unconditionally before checkout — probing only .qwen | ||||||
|
|
@@ -1624,6 +1680,27 @@ jobs: | |||||
| echo "Skipping fallback comment: PR #${PR_NUMBER} moved from ${EXPECTED_HEAD_SHA} to ${current_head}." >> "$GITHUB_STEP_SUMMARY" | ||||||
| exit 0 | ||||||
| fi | ||||||
| # Re-runs of failed jobs keep the same run id: a prior attempt that | ||||||
| # died before reaching this step already got a fallback comment for | ||||||
| # this run from the fallback-comment job. Dedup on the marker plus | ||||||
| # this run's URL exactly as that job does; a FAILED lookup defers to | ||||||
| # it (it retries and fails closed) instead of risking a duplicate — | ||||||
| # posting on a failed listing is how a transient 5xx mints one. | ||||||
| bot_login="$(gh api user --jq '.login' 2>/dev/null)" || bot_login="" | ||||||
| fallback_bodies="" | ||||||
| if [ -n "$bot_login" ] \ | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] The in-job dedup's error path "comments listing fails while Suggested fix: add one scenario — 中文说明in-job 去重的错误路径" 建议修复:新增一个场景—— — qwen3.8-max via Qwen Code /review (v0.21.12) |
||||||
| && fallback_bodies="$(gh pr view "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --json comments \ | ||||||
| --jq ".comments[] | select(.author.login == \"$bot_login\") | select(.body | contains(\"$FALLBACK_MARKER\")) | .body")"; then | ||||||
| case "$fallback_bodies" in | ||||||
| *"actions/runs/${GITHUB_RUN_ID})"*) | ||||||
| echo "A fallback comment for this run already exists; skipping." >> "$GITHUB_STEP_SUMMARY" | ||||||
| exit 0 | ||||||
| ;; | ||||||
| esac | ||||||
| else | ||||||
| echo "Fallback comment dedup lookup failed; deferring to the fallback-comment job." >> "$GITHUB_STEP_SUMMARY" | ||||||
| exit 0 | ||||||
| fi | ||||||
| MAX_TIMEOUT_MINUTES="${{ vars.QWEN_REVIEW_MAX_TIMEOUT_MINUTES }}" | ||||||
| if [ "$FAILURE_KIND" = "timeout" ]; then | ||||||
| if [ "$TIMEOUT_MINUTES" -lt "$MAX_TIMEOUT_MINUTES" ]; then | ||||||
|
|
@@ -1638,6 +1715,10 @@ jobs: | |||||
| else | ||||||
| body="**Qwen Code review did not complete successfully.** ${FAILURE_REASON} A transient error is retried automatically; if you are seeing this, retry with \`@qwen-code /review\`. See [workflow logs](${RUN_URL})." | ||||||
| fi | ||||||
| # Blank line after the marker or the prose renders as raw source — | ||||||
| # same HTML-block quirk as the ack marker. The fallback-comment job | ||||||
| # dedupes on this marker plus this run's URL. | ||||||
| body="$(printf '%s\n\n%s' "$FALLBACK_MARKER" "$body")" | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] The cross-job dedup is one-directional: the new 中文说明跨 job 的去重是单向的:新的 — qwen3.8-max via Qwen Code /review (v0.21.12)
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Acknowledged — this is a real duplication path. Deferred to the next round by this round's batch bound (eight findings implemented, Critical first). Planned fix: a fail-open, author-scoped marker + run-URL lookup before the in-job 中文说明已确认——这是一条真实的重复路径。受本轮批次上限(实现了 8 个发现、Critical 优先)推迟到下一轮。计划中的修复:在 job 内
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] The ordering invariant that this step prepends FALLBACK_MARKER to the body BEFORE 中文说明该步骤在 — qwen3.8-max via Qwen Code /review (v0.21.12)
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Acknowledged — deferred to the next round by this round's batch bound. The fix is the suggested one-line ordering assertion ( 中文说明已确认——受本轮批次上限推迟到下一轮。修复即所建议的一行顺序断言(对 job 内步骤断言
Comment on lines
+1720
to
+1721
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] R2-9 (carried from round 2, ruled still standing at this commit): the cross-job dedup is one-directional — the new Suggested fix: give this step the sibling's guard before 中文说明R2-9(第 2 轮携带,本轮代码核实仍然成立):跨 job 去重是单向的——新的 — qwen3.8-max via Qwen Code /review (v0.21.12) |
||||||
| gh pr comment "$PR_NUMBER" \ | ||||||
|
Comment on lines
+1720
to
1722
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] R2-11 (carried from round 2, ruled still standing at this commit): the ordering invariant that this step prepends Suggested fix: add the one-line ordering assertion the round-2 thread already proposed — an established pattern in this suite: expect(
inJobStep.run.indexOf(`body="$(printf '%s\\n\\n%s' "$FALLBACK_MARKER" "$body")"`),
).toBeLessThan(inJobStep.run.indexOf('gh pr comment'));中文说明R2-11(第 2 轮携带,本轮代码核实仍然成立):这一步在 — qwen3.8-max via Qwen Code /review (v0.21.12) |
||||||
| --repo "$GITHUB_REPOSITORY" \ | ||||||
| --body "$body" | ||||||
|
|
@@ -1692,6 +1773,128 @@ jobs: | |||||
| rm -f .qwen/tmp/qwen-review-lease-pr-*.json 2>/dev/null || true | ||||||
| echo "review worktrees cleaned" | ||||||
|
|
||||||
| # A review job that dies abnormally — runner crash, host loss, or the | ||||||
| # FinalizeJob EACCES from the PR #8894 incident — never reaches its in-job | ||||||
| # 'Post fallback comment on failure' step, leaving the PR with no review and | ||||||
| # no explanation. This dependent job runs on an ephemeral hosted runner, so | ||||||
| # it survives whatever killed the review job, and posts the retry guidance | ||||||
| # itself. Every upstream job whose failure marks review-pr 'skipped' opens | ||||||
| # the gate — the incident's trigger can kill the chain's earlier | ||||||
| # self-hosted jobs first (authorize / review-config), and a transient API | ||||||
| # failure can kill the hosted ones (precheck-pr / delay-automatic-review) — | ||||||
| # a skipped review is just as unexplained as a dead one. It skips when a | ||||||
| # fallback comment for this run already exists — matched by the | ||||||
| # qwen-review-fallback marker plus this run's URL, since the ack comment | ||||||
| # also links the run and must not suppress this one; the same check dedupes | ||||||
| # re-runs, which keep the same run id. A review-pr that dies to its own | ||||||
| # job-level timeout is auto-CANCELLED by GitHub — result 'cancelled' and | ||||||
| # failure() false — which opens neither a failure-only gate nor the in-job | ||||||
| # step, so the gate admits 'cancelled' too; a run-level cancel cancels this | ||||||
| # queued job with it, so a live gate evaluation seeing 'cancelled' is | ||||||
| # overwhelmingly the timeout case, and the residual manual single-job | ||||||
| # cancel just gets a benign retry-guidance comment. The PR number comes | ||||||
| # from the event payload, not the dead job's outputs, which do not survive | ||||||
| # a crash. | ||||||
| fallback-comment: | ||||||
| needs: | ||||||
| [ | ||||||
| 'precheck-pr', | ||||||
| 'review-config', | ||||||
| 'authorize', | ||||||
| 'delay-automatic-review', | ||||||
| 'review-pr', | ||||||
| ] | ||||||
| if: |- | ||||||
| always() && | ||||||
| (needs.review-pr.result == 'failure' || | ||||||
| needs.review-pr.result == 'cancelled' || | ||||||
| needs.authorize.result == 'failure' || | ||||||
|
Comment on lines
+1809
to
+1811
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] R3-6: The gate disjunction admits only Suggested fix: add 中文说明gate 的析取只接受 — qwen3.8-max via Qwen Code /review (v0.21.12) |
||||||
| needs.review-config.result == 'failure' || | ||||||
| needs.delay-automatic-review.result == 'failure' || | ||||||
| needs.precheck-pr.result == 'failure') && | ||||||
| github.event.inputs.command != 'resolve' && | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] The 中文说明
— qwen3.8-max via Qwen Code /review (v0.21.12) |
||||||
| !(github.event_name == 'issue_comment' && | ||||||
| startsWith(github.event.comment.body, '@qwen-code /resolve')) && | ||||||
| github.repository == 'QwenLM/qwen-code' && | ||||||
| (github.event_name != 'workflow_dispatch' || | ||||||
| github.event.inputs.review_mode == 'comment') | ||||||
| runs-on: 'ubuntu-latest' | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] This job's load-bearing placement invariant — it must run on an ephemeral hosted runner, never the self-hosted ECS pool whose failure mode it exists to survive — is pinned by no test; the suite pins only
Suggested change
中文说明该 job 承重的部署不变量——必须运行在临时托管 runner 上、绝不能运行在它所要幸存其故障模式的自托管 ECS 池上——没有任何测试钉住;套件只钉了 — qwen3.8-max via Qwen Code /review (v0.21.12) |
||||||
| timeout-minutes: 5 | ||||||
|
Comment on lines
+1821
to
+1822
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] The fallback job's Suggested fix: add 中文说明兜底 job 的 建议修复:在现有 — qwen3.8-max via Qwen Code /review (v0.21.12) |
||||||
| permissions: | ||||||
| pull-requests: 'write' | ||||||
| steps: | ||||||
| - name: 'Post fallback comment' | ||||||
| env: | ||||||
| GH_TOKEN: '${{ secrets.CI_BOT_PAT }}' | ||||||
| PR_NUMBER: '${{ github.event.pull_request.number || github.event.issue.number || github.event.inputs.pr_number }}' | ||||||
| RUN_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' | ||||||
|
Comment on lines
+1829
to
+1830
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] R3-5: This Suggested fix: assert this step env 中文说明这个 — qwen3.8-max via Qwen Code /review (v0.21.12) |
||||||
| run: |- | ||||||
| set -uo pipefail | ||||||
| if [ -z "$PR_NUMBER" ]; then | ||||||
| echo "Could not determine the PR number; skipping fallback comment." >> "$GITHUB_STEP_SUMMARY" | ||||||
| exit 0 | ||||||
| fi | ||||||
| # A push landing mid-review leaves this comment pointing at a dead | ||||||
| # run while a fresh review of the new head already queues (per-run | ||||||
| # concurrency groups are not cancelled by pushes). The run's head | ||||||
| # is comparable only on pull_request_target events — comment and | ||||||
| # review runs report main's tip as headSha — so guard only there, | ||||||
| # and when the comparison is unavailable or fails, posting wins | ||||||
| # over silence. | ||||||
| if [ "${GITHUB_EVENT_NAME:-}" = "pull_request_target" ]; then | ||||||
| run_head="$(gh run view "${GITHUB_RUN_ID:?}" --repo "$GITHUB_REPOSITORY" --json headSha --jq '.headSha' 2>/dev/null)" || run_head="" | ||||||
| current_head="$(gh pr view "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --json headRefOid --jq '.headRefOid' 2>/dev/null)" || current_head="" | ||||||
| if [ -n "$run_head" ] && [ -n "$current_head" ] && [ "$run_head" != "$current_head" ]; then | ||||||
| echo "Skipping fallback comment: PR #${PR_NUMBER} moved from ${run_head} to ${current_head} since this run started." >> "$GITHUB_STEP_SUMMARY" | ||||||
| exit 0 | ||||||
| fi | ||||||
| fi | ||||||
| # Dedup lookup with bounded retry: a FAILED lookup is never treated | ||||||
| # as an EMPTY result — posting on a failed listing is how a | ||||||
| # transient 5xx mints a permanent duplicate (same norm as | ||||||
| # upsert-bot-comment.sh). The author scope resolves the | ||||||
| # authenticated login dynamically so a participant posting the | ||||||
| # marker can never capture the lookup, and the filter cannot drift | ||||||
| # from the account CI_BOT_PAT posts as. | ||||||
| bot_login="" | ||||||
| fallback_bodies="" | ||||||
| for _attempt in 1 2 3; do | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] This dedup lookup re-inlines the marker+author upsert protocol that 中文说明该去重查找把 — qwen3.8-max via Qwen Code /review (v0.21.12)
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Declined for this PR (not on the merits of consolidation). The suggested fix extends 中文说明对本 PR 予以拒绝(并非不认可合并本身)。建议的修复要给 |
||||||
| if bot_login="$(gh api user --jq '.login')" \ | ||||||
| && [ -n "$bot_login" ] \ | ||||||
|
Comment on lines
+1862
to
+1863
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] R3-7: The cross-job dedup's load-bearing identity agreement — the in-job comment must be posted by the same account this lookup resolves via Suggested fix: in the expect(inJobStep.env.GH_TOKEN).toBe("'${{ secrets.CI_BOT_PAT }}'");with a comment that the author-scoped dedup only sees comments posted by the same account. 中文说明跨 job 去重的承重不变量——job 内评论必须由本查询经 — qwen3.8-max via Qwen Code /review (v0.21.12) |
||||||
| && fallback_bodies="$(gh pr view "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --json comments \ | ||||||
| --jq ".comments[] | select(.author.login == \"$bot_login\") | select(.body | contains(\"$FALLBACK_MARKER\")) | .body")"; then | ||||||
| break | ||||||
| fi | ||||||
| bot_login="" | ||||||
| fallback_bodies="" | ||||||
| sleep 10 | ||||||
|
Comment on lines
+1868
to
+1870
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] R3-4: The retry loop's post-failure reset lines are unobservable in every test scenario — the only lookup-failure scenario ( Suggested fix: add a 中文说明重试循环在失败后的两行重置( — qwen3.8-max via Qwen Code /review (v0.21.12) |
||||||
| done | ||||||
| if [ -z "$bot_login" ]; then | ||||||
| echo "::error::fallback comment dedup lookup failed after retries; refusing to post on a failed listing" | ||||||
| echo "Fallback comment lookup failed after retries; skipping to avoid a duplicate." >> "$GITHUB_STEP_SUMMARY" | ||||||
| exit 1 | ||||||
| fi | ||||||
| case "$fallback_bodies" in | ||||||
| *"actions/runs/${GITHUB_RUN_ID})"*) | ||||||
| echo "A fallback comment for this run already exists; skipping." >> "$GITHUB_STEP_SUMMARY" | ||||||
| exit 0 | ||||||
| ;; | ||||||
| esac | ||||||
| pr_state="$(gh pr view "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --json state --jq '.state')" || { | ||||||
| echo "::error::could not verify PR #${PR_NUMBER} state; refusing to post on a failed lookup" | ||||||
| echo "Could not verify PR #${PR_NUMBER} (API error); failing instead of guessing." >> "$GITHUB_STEP_SUMMARY" | ||||||
| exit 1 | ||||||
| } | ||||||
|
Comment on lines
+1883
to
+1887
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] The twin failure mode of the lookup above: if this Red-on-own-failure is safe here: the gate already requires 中文说明上面查找的对称失效模式:如果这个 自身失败时变红在这里是安全的:门控已要求 — qwen3.8-max via Qwen Code /review (v0.21.12) |
||||||
| if [ "$pr_state" != "OPEN" ]; then | ||||||
| echo "Skipping fallback comment: PR #${PR_NUMBER} is ${pr_state}." >> "$GITHUB_STEP_SUMMARY" | ||||||
| exit 0 | ||||||
| fi | ||||||
|
Comment on lines
+1888
to
+1891
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] This job drops the in-job step's moved-head guard (~line 1665 compares
中文说明本 job 丢掉了 job 内步骤的"head 已移动"防护(约 1665 行会比较
— qwen3.8-max via Qwen Code /review (v0.21.12) |
||||||
| body="**Qwen Code review did not complete successfully.** The review pipeline failed before a review could be posted. A transient error is retried automatically; if you are seeing this, retry with \`@qwen-code /review\`. See [workflow logs](${RUN_URL})." | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] Fallback comments are fire-and-forget: nothing updates, retracts, or consolidates a marker comment after posting (repo-wide, the marker's only consumers are the two dedup filters). — Failure scenario: a run dies, the fallback posts "retry with Suggested fix: route the post through 中文说明兜底评论是"发后即忘":发布后没有任何机制更新、撤回或合并标记评论(全仓库范围内,该标记的唯一消费者是两处去重过滤器)。— 故障场景:某 run 死亡,兜底发布"请用 建议修复:经由 — qwen3.8-max via Qwen Code /review (v0.21.12) |
||||||
| body="$(printf '%s\n\n%s' "$FALLBACK_MARKER" "$body")" | ||||||
| gh pr comment "$PR_NUMBER" \ | ||||||
| --repo "$GITHUB_REPOSITORY" \ | ||||||
| --body "$body" | ||||||
|
|
||||||
| resolve-pr: | ||||||
| needs: ['authorize'] | ||||||
| # The /resolve shape match uses the same fromJSON newline/CR pair as | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Suggestion] The only self-healing repair for runner-pool corruption lives in
review-pr, the last job of the chain — downstream of the self-hosted jobs (authorize/review-config) that the same corruption kills first, so the repair is usually unreachable while the failure persists. — Failure scenario: anecs-qwenrunner with a root-owned$HOME(the exact PR #8894 trigger) killsauthorize/review-config(verified:authorizeruns self-hosted for same-repo heads;review-confighas noneedsand schedules first);review-pris skipped without starting, so this repair never runs and the corrupted runner stays in the pool to kill the retry. The diff's own rationale concedes the trigger "can kill the chain's earlier self-hosted jobs first" — it covers that with a comment, not with repair.Suggested fix: run the same probe (at minimum probe+repair) in the other self-hosted jobs of this workflow (
authorize,review-config), or extract it as a shared preflight for everyecs-qwenjob in this file.中文说明
针对 runner 池损坏的唯一自愈修复位于链条最末的
review-pr——处在同样会被该损坏杀死的自托管 job(authorize/review-config)下游,因此故障持续期间修复通常不可达。— 故障场景:$HOME属主为 root 的ecs-qwenrunner(正是 PR #8894 的触发条件)杀死authorize/review-config(已核实:同仓库 head 时authorize跑在自托管上;review-config无needs、最先被调度);review-pr未启动即被跳过,本修复从不执行,损坏的 runner 留在池中继续杀死重试。diff 自身的理由也承认触发条件"可能先杀死链条上更早的自托管 job"——但只以注释覆盖,未以修复覆盖。建议修复:在本 workflow 其他自托管 job(
authorize、review-config)中运行同样的探测(至少探测+修复),或抽取为本文件所有ecs-qwenjob 共享的前置检查。— qwen3.8-max via Qwen Code /review (v0.21.12)