Skip to content

Commit 17cc319

Browse files
yiliang114qwencoder
andcommitted
fix(ci): stop the queue-expiry body naming a cause it cannot observe
Follow-up to #11855, from its sandboxed verification report. The never-started branch fires on `runner_name` empty AND `steps` empty, which is a shape, not a cause. Verification sampled eight recently cancelled qwen-code-pr-review.yml runs and found three with exactly that shape, cancelled after 9.7, 36.4 and 33.7 minutes — so the body's claim that GitHub ended the job "at the 24-hour queue limit" was false by a factor of 40-150x. All three were cancellations caused by the PR closing, and the step's `pr_state != OPEN` gate runs before body selection, so none of them posted; the residual reachable case is an operator cancelling a review still queued, or a command-triggered run cancelled while it waited, both on an OPEN PR where the head-drift exit does not apply either. That reader is told a duration that did not elapse and is sent to qwen-review-runner-schedule.yml for something the schedule did not do. The first sentence now states only the observation, and cancellation joins the candidate list the body already disclaims with. Under the steady-state schedule a queued review waits at most 12 h and then runs, so a genuine cap expiry means the schedule itself is broken — the claim was true only in the failure mode it was written for. The five tests added in #11855 pin WHETHER the branch fires; none pinned WHICH cause it claims. The queue-expiry case now asserts the body names no duration and does offer cancellation, for both `failure` and `cancelled` results. Restoring "at the 24-hour queue limit" turns it red. Also records two .size-baseline numbers that were wrong on main: qwen-review-runner-schedule.yml 1958 -> 2518 (the ratchet's own entry, drifted inside #11855 when the main-fence comment landed without re-recording; the file could have grown 140% before the gate objected) and ci.yml 134426 -> 137297 (main-side and pre-existing, but it left only 1225 bytes of headroom, so the next PR touching ci.yml would be told to account for 2871 bytes of growth it did not cause — the red-wall class check-workflow-size.sh exists to prevent). qwen-code-pr-review.yml is re-recorded for this change. Co-authored-by: Qwen-Coder <[email protected]>
1 parent 4b8e02b commit 17cc319

3 files changed

Lines changed: 15 additions & 4 deletions

File tree

‎.github/workflows/.size-baseline‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
9256 build-and-publish-image.yml
2020
49610 cd-cua-driver.yml
2121
2076 cd-mobile-mcp.yml
22-
134426 ci.yml
22+
137297 ci.yml
2323
1482 codeql.yml
2424
9389 comment-attachment-guard.yml
2525
1634 desktop-packaging-check.yml
@@ -40,11 +40,11 @@
4040
5942 qwen-autofix-fork-signal.yml
4141
469165 qwen-autofix.yml
4242
7061 qwen-ci-flaky-rerun.yml
43-
265415 qwen-code-pr-review.yml
43+
265436 qwen-code-pr-review.yml
4444
79041 qwen-fleet-shepherd.yml
4545
22680 qwen-issue-followup-bot.yml
4646
5760 qwen-pr-safety-precheck.yml
47-
1958 qwen-review-runner-schedule.yml
47+
2518 qwen-review-runner-schedule.yml
4848
27648 qwen-triage-finalize.yml
4949
350381 qwen-triage.yml
5050
9657 release-sdk-java.yml

‎.github/workflows/qwen-code-pr-review.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3298,7 +3298,7 @@ jobs:
32983298
# `[workflow logs](RUN_URL)` markdown link the cross-job dedup
32993299
# anchors on, and the retry instruction the timeout flavor needs.
33003300
if [ "$never_started" = "true" ]; then
3301-
body="**Qwen Code review never started.** No runner picked up the review job before GitHub ended it at the 24-hour queue limit, so no review ran for this head and nothing picks it up on its own. This step cannot see WHY no runner was available: \`ecs-review\` is switched by \`qwen-review-runner-schedule.yml\`, so check its latest run — a pool that is closed by schedule, empty, or all-offline expires the next request the same way. Re-request with \`@qwen-code /review\` once that run shows the pool open. See [workflow logs](${RUN_URL})."
3301+
body="**Qwen Code review never started.** No runner picked up the review job before GitHub ended it, so no review ran for this head and nothing picks it up on its own. This step cannot see why: the \`ecs-review\` pool may be closed by schedule, empty or all-offline — \`qwen-review-runner-schedule.yml\` switches it, and its latest run tells those apart — or the run was cancelled while the job was still waiting. Re-request with \`@qwen-code /review\`; if it ends the same way, read that schedule run before requesting again. See [workflow logs](${RUN_URL})."
33023302
elif [ "$REVIEW_PR_RESULT" = "cancelled" ]; then
33033303
body="**Qwen Code review was cancelled before a review could be posted.** Nothing failed and nothing is retried automatically: the run was cancelled — by an operator, an upstream event, or the job exceeding its execution time limit. If you still want a review of this PR, request one with \`@qwen-code /review\`. See [workflow logs](${RUN_URL})."
33043304
else

‎scripts/tests/qwen-pr-review-workflow.test.js‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4190,6 +4190,17 @@ describe('fallback comment resilience (PR #8894 incident class)', () => {
41904190
expect(r.posted).toContain('@qwen-code /review');
41914191
expect(r.posted).not.toContain('did not complete successfully');
41924192
expect(r.posted).not.toContain('retried automatically');
4193+
// Which CAUSE the body claims is a separate axis from whether the
4194+
// branch fires, and it is the one the predicate cannot observe: real
4195+
// cancelled runs reach this shape in 10-40 minutes rather than at the
4196+
// 24-hour queue cap (an operator cancelling a review still queued, or
4197+
// a command-triggered run cancelled while it waited — both on an OPEN
4198+
// PR, so the pr_state gate does not filter them). Naming a duration
4199+
// would be false by a factor of 40-150x and would send the reader to
4200+
// the schedule workflow for something the schedule did not do.
4201+
expect(r.posted).not.toContain('24-hour');
4202+
expect(r.posted).not.toContain('queue limit');
4203+
expect(r.posted).toContain('cancelled while the job was still waiting');
41934204
expect(r.summary).toContain('never started by a runner');
41944205
}
41954206
},

0 commit comments

Comments
 (0)