Skip to content

fix(ci): jobs recorded cancelled after all steps succeeded fail ci-status and evict PRs from the merge queue #12520

Closed

Description

@kyle-sexton

Problem

pr-require-checks jobs are recorded as cancelled after every one of their steps, Complete job included, has succeeded. ci-status then fails with "A lane did not pass (result: cancelled)", and in the merge queue that can evict a PR that has nothing wrong with it.

Evidence

Measured 2026-11-02 over merge-group pr-require-checks runs created since 06:00Z. The success count is capped at the query's page size of 100, so the total is at least 148:

Measure Value
Successful runs 100 or more
Failed runs 21
Cancelled runs 27
Failed or cancelled runs whose only non-passing jobs are these cancelled-after-success jobs 27 of 48
... with a real job failure as well 2
... with a real job failure only 11
... unclassified (no failed or matching job, or unreadable) 8
Jobs in this state 31
Those jobs' total time 181 to 650 s; 22 of 31 ran 300 s or longer

The same state shows on pull_request runs: 19 jobs across the 48 failed or cancelled runs scanned.

The jobs most often hit are check-plugins, lint-repo, select-tests and test-python (0).

Two worked examples, both on #12509:

  • Merge-group run 41529399052: every select-tests step, including Complete job, finished by 21:33:53Z. The job was recorded cancelled at 21:39:58Z, 6 m 25 s after it started, with timeout-minutes: 6 (pr-require-checks.yml:881). ci-status failed at 21:40:27Z, and the PR was removed from the queue at 21:40:29Z with reason failed_checks. Re-enqueued unchanged.
  • Pull-request run 41523688577: check-plugins (timeout-minutes: 6, pr-require-checks.yml:2274) in the same state; ci-status reported "A lane did not pass (result: cancelled)".

Cause

UNVERIFIED. Two candidates, which the data above does not separate:

  1. The job's steps finished but the job never concluded on GitHub's side until its timeout-minutes expired. The select-tests example fits this, and so do the 22 jobs at 300 s or longer.
  2. Some of these are ordinary run-level cancellations: cancel-in-progress (pr-require-checks.yml:110), or a queue rebuild after a PR ahead was evicted. Those runs did not themselves evict anyone, so 27 of 48 is an upper bound on evictions from candidate 1.

Done when

  • The two candidates are separated by measurement: for each such run, whether a job reached its timeout-minutes, whether a newer run in the same concurrency group or a queue rebuild cancelled it, and how many failed_checks evictions each caused.
  • If candidate 1 is real: ci-status no longer fails a PR, or evicts it from the queue, for a job whose steps all succeeded (for example by re-reading the job's steps, or a single automatic re-run of the cancelled job), and a test covers it. If it is a GitHub platform fault, it is reported upstream with these run ids.
  • Evictions from this state are recorded as a metric, so a change can be compared against this baseline.

This was generated by AI.

Activity

  1. github-actions commented on Nov 2, 2026

    @github-actions
    Contributor

    Proposed work class: work-class: scoped
    Basis: automated intake triage; the lanes App applied this class.

    Size: Medium
    Complexity: Medium
    Uncertainty: Knowable
    Flags: none
    Blocked by: none

    I read this as a defect. pr-require-checks jobs whose steps all succeeded are recorded as cancelled, ci-status fails on them, and the merge queue can evict a healthy PR. The done-when has three parts. First, separate the two candidate causes by measurement. Second, if the platform hang is real, stop ci-status failing on such a job, and add a test. Third, record evictions from this state as a metric.

    #12506 looks closely related: it covers lint-repo hanging after its last step and being cancelled at the limit. It reads as one instance of this broader pattern, so I did not mark a duplicate. Maintainers may want to link or merge them.

    Automated triage, applied by the lanes App.

  2. added
    status: ready
    on Nov 2, 2026
  3. added
    admission-deferred
    on Nov 2, 2026
  4. added
    agent-ready
    and removed
    admission-deferred
    on Nov 2, 2026
  5. github-actions commented on Nov 2, 2026

    @github-actions
    Contributor
    No description provided.
  6. github-actions commented on Nov 2, 2026

    @github-actions
    Contributor
    No description provided.
  7. added
    host-run
    and removed
    agent-ready
    on Nov 2, 2026
  8. melodic-automation-lanes commented on Nov 2, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue lane stopped on this issue (patch-protected-path): the change needs a path the issue lane may not push, which a maintainer session builds by hand.
    It added host-run and removed agent-ready: an agent run on a host builds it, and it waits on no decision from a person.

    In the run's words:

    The run stopped early (patch-protected-path): its change needs a path the issue lane may not push, which a person changes instead. In the run's words: patch-protected-path: .github/workflows/pr-require-checks.yml. The issue asks that ci-status no longer fail a PR, or evict it from the merge queue, for a lane job recorded cancelled after all its steps succeeded. ci-status is the job in .github/workflows/pr-require-checks.yml (lines 4016-6725). Its 'Check each skipped lane against scope' step builds each lane's result from toJSON(needs), and the pinned melodic-software/ci-workflows aggregate-results composite (pinned at line 6697) turns a cancelled result red. Any change that prevents the eviction, whether it re-reads the job's steps or re-runs the cancelled job once before aggregating, has to edit that workflow or repin the composite there. This lane cannot push a change under /.github/workflows/**.

    What the run says it did not do:

    • Done-when 1: separating the two candidate causes by measurement over the merge-group and pull_request runs. Not started, because the run stopped on the protected path before any work.
    • Done-when 2: the ci-status change and its test. This needs an edit to .github/workflows/pr-require-checks.yml (protected).
    • Done-when 3: recording evictions from this state as a metric. Not started, because the run stopped on the protected path.
    • Repository checks (check-changelog-fragments, check-changed-skills, check-affected), tidy, review and verify were not run: the run stopped before any change, so the working tree is unchanged.

    Run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41540461872

    To hand it back to the lane, remove host-run and add agent-ready again.

  9. kyle-sexton commented on Nov 3, 2026

    @kyle-sexton
    MemberAuthor

    Claimed by lane 1 (melo-lap-001), with duplicate #12506: no hub owner named and the issue lane stopped on patch-protected-path. Starting done-when 1 (separate the two candidate causes by measurement, read-only). The change follows the #12357 re-measure.

  10. kyle-sexton commented on Nov 3, 2026

    @kyle-sexton
    MemberAuthor

    Measured: candidate 1 is real, on GitHub's side. Lane 5 claims this issue with #9398.

    Window: merge-group pr-require-checks runs created after 2026-11-02 19:40Z, when the #12400 timeouts were live (113 runs: 93 success, 20 not).

    Job Run Job time Timeout Annotation PR outcome
    lint-repo 41515384639 543 s 7 min exceeded #12465 merged 70 s later, no eviction
    lint-repo 41516566245 613 s 7 min exceeded #12493 evicted failed_checks
    lint-repo 41519495379 448 s 7 min exceeded #12458 evicted failed_checks
    check-plugins 41521061884 438 s 6 min exceeded #12423 evicted, with a real test-python (0) failure as well
    test-node 41522932997 318 s 5 min exceeded #12493 evicted failed_checks
    select-tests 41529399052 385 s 6 min exceeded #12509 evicted failed_checks
    • All six carry the annotation "The job has exceeded the maximum execution time". None of the six was a run-level cancel, so candidate 2 explains none of them. Four evictions had no other cause.
    • Rate: 6 such jobs per 113 runs after ci(pr-pipeline): separate the 3-minute work budget from the job timeout #12400 (5.3 per 100), against 25 per 216 runs from 06:00Z to 19:40Z (11.6 per 100). The earlier window also holds test-python (0) work overruns with tails of 3 to 50 s, so this is not a clean before/after of the tail alone.
    • Tail of jobs that finished: 2,220 successful jobs, median 3 s, p95 25 s, longest 211 s; none over 300 s.
    • Gap left when the timeout fired: 22, 133, 134, 194, 304 and 340 s (timeout minus work). Four are inside the range successful jobs show, so a longer limit would have let them finish. Whether the 304 s and 340 s jobs would have finished is UNVERIFIED.
    • Log: the select-tests log ends at Cleaning up orphan processes at 21:33:53Z, after Complete job. Nothing later runs in the repository's control.

    Decision (agent, on this evidence): raise the allowance instead of rewriting the result. Every job's timeout becomes its work budget plus 6 minutes, and each case is recorded as a cancelled-after-success annotation. ci-status does not treat these jobs as passed: when select-tests is cancelled, every lane skips (all of them in run 41529399052), so that rewrite would turn a run with no tests green. PR to follow.

    Reporting this upstream to GitHub stays the owner's call.

  11. kyle-sexton commented on Nov 3, 2026

    @kyle-sexton
    MemberAuthor

    Lane 1 measurement for done-when 1, read over REST on 2026-11-03. Runs created since 2026-11-02T06:00Z: merge_group 276 success, 28 failure, 27 cancelled, all 55 non-success runs read; pull_request 439 success, 123 failure, 76 cancelled, the newest 95 of 199 non-success runs read.

    In the merge queue it is candidate 1. 31 jobs in 29 of the 55 runs are cancelled with every step finished.

    • Every one of the 31 ended at or past its timeout-minutes: +1 s to +230 s, median +34 s.
    • Candidate 2 cannot explain them. A merge_group run's concurrency group is <workflow>-<run_id> (pr-require-checks.yml:101-110), unique per run, and in 27 of the 29 runs only one job was cancelled while ci-status ran on.
    • Worked example, run 41529399052: select-tests Complete job at 21:33:53Z, recorded cancelled at 21:39:58Z, ci-status failed at 21:40:27Z.
    • All three ci: lint-repo hangs after its last step in the merge queue and is cancelled at the 7-minute limit #12506 runs fit: lint-repo +28 s, +193 s and +123 s past 420 s.
    • The job log ends in Cleaning up orphan processes, the same last line as a successful job, with no cancel or timeout message. So the logs do not say why GitHub left the job open. That cause is UNVERIFIED; no background process shows in the two logs read.
    • By job: check-plugins 10, test-python (0) 8, lint-repo 6, test-node 3, select-tests 2, check-tests 1, test-bash (6) 1.

    On pull_request runs it is mostly candidate 2. 32 jobs in the sample, 28 ended before their limit, mostly within seconds of a newer run on the branch. That matters for the fix: a cancel landing between two steps leaves every step success or skipped too. Those runs' ci-status is cancelled with them, so they never reach the check. A job limit landing between steps is the same shape, which is why the fix below also needs a gap.

    Baseline for done-when 3: 29 runs in the window with an in-state job; 27 of them with no other failing lane. Queue events were not read, so that is an upper bound on evictions from this state.

    Fix (lane 1 branch fix/12520-cancelled-after-success, PR next): ci-status re-reads a cancelled lane's jobs and counts it as passed only when every step succeeded or skipped, Complete job is last, and the job ended at least 10 s after it. A read failure leaves it cancelled. Each cancelled lane writes a cancelled-after-success notice with counted-as-passed=true|false. Replayed over the saved runs: 27 of 31 jobs recover and 21 of 29 runs end with no red lane. The other 8 stay red: 2 real failures, 2 select-tests hangs whose dependents never ran, and 4 with a 3 to 5 s gap.

  12. kyle-sexton commented on Nov 3, 2026

    @kyle-sexton
    MemberAuthor

    Correction to the fix in the comment above: the 10 s gap is dropped. Jobs cut off between steps showed gaps up to 33 s in the pull_request sample (for example lint-repo in run 41506596939: 44 steps succeeded, 14 skipped, 9 s gap; select-tests in run 41533504188: 23 s), so a gap does not show the work ran.

    Each lane now ends in a Lane finished step, which runs only when no earlier step failed or was cancelled, and ci-status counts a cancelled lane as passed only when that step succeeded. Runs before this change have no such step, so the replay in the comment above no longer applies. From the saved runs I project 25 of 29 runs clearing, leaving the 2 real failures and the 2 select-tests hangs; UNVERIFIED until new runs show it.

  13. kyle-sexton commented on Nov 3, 2026

    @kyle-sexton
    MemberAuthor

    Owner decided to report this to GitHub ("Go with recomended, whatever this recommends", lane 1 session, 2026-11-03 ~04:3xZ, relayed by Lane 1). It cannot be filed from a session: GitHub documents only the Support portal, which needs a browser sign-in. So the owner files it at https://support.github.com/ with the text below.

    Subject: Actions job recorded cancelled minutes after its last step finished

    Jobs in melodic-software/claude-code-plugins merge_group runs finish every step, including Complete job, but the job stays open until its timeout-minutes passes and is then recorded cancelled. The log ends at Cleaning up orphan processes, the same last line as a successful job, with no cancel or timeout message. Measured since 2026-11-02T06:00Z: 31 such jobs in 29 of 55 non-success merge_group runs, each ending +1 s to +230 s past its limit (median +34 s).

    Example runs: https://github.com/melodic-software/claude-code-plugins/actions/runs/41529399052 (select-tests Complete job at 21:33:53Z, recorded cancelled at 21:39:58Z) and https://github.com/melodic-software/claude-code-plugins/actions/runs/41519495379.

    Why does the runner leave the job open after its last step, and what should we change? A longer timeout-minutes only works around it.

    The figures are Lane 1's measurement above; I did not re-read run 41519495379 in this session.

  14. kyle-sexton commented on Nov 3, 2026

    @kyle-sexton
    MemberAuthor

    Re-measure after 82a1475 (budget + 6 min): merge_group runs created since 2026-11-03T02:26:11Z, read 14:4xZ. 147 runs, 116 success, 31 non-success. Jobs recorded cancelled after every step succeeded: 0 of 147 runs (0 per 100), against the 5.3 per 100 baseline. Of the 31 non-success runs, 14 have a real failing job and 17 have neither a failure nor a tail job (cancelled, e.g. queue rebuilds). Post-step tail on 2,593 successful jobs: median 2 s, p95 5 s, max 25 s (check-skills, run 41575626159). This issue stays open for the GitHub upstream report the owner files (draft text above).

  15. self-assigned this
    on Nov 3, 2026
  16. kyle-sexton commented on Nov 3, 2026

    @kyle-sexton
    MemberAuthor
    No description provided.
  17. removed their assignment
    on Nov 3, 2026
  18. added
    needs-human
    on Nov 3, 2026
  19. kyle-sexton commented on Nov 3, 2026

    @kyle-sexton
    MemberAuthor

    Closed on the owner's decision (2026-11-03): no GitHub support report will be filed. The in-repo fix holds: after 82a1475, 0 of 147 merge_group runs had a job recorded cancelled after all its steps succeeded (lane 5 re-measure above), against a 5.3 per 100 baseline.

  20. removed
    status: ready
    on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    host-runneeds-human

    Type

    Fields

    Work status

    agent-ready

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions