Skip to content

The required check's pull-request run gives way to a newer push's, and a merge group's never is (#681 step 4, record 0206) - #802

Closed
don-petry wants to merge 4 commits into
mainfrom
claude/cancel-superseded-681
Closed

don-petry wants to merge 4 commits into
mainfrom
claude/cancel-superseded-681

Conversation

@don-petry

@don-petry don-petry commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Part of #681, its last step (4 of 4). Step 3 landed as #783, and the simulator's case is #800 for #749. #681 is closed once both land.

A newer push now cancels a pull request's run of the required check. A merge group's run is never cancelled. This is "CI: a newer push cancels its pull request's verify run, and a merge group's run is never cancelled" (pull request 679) brought back now that step 3 is on main: decision 0203 passes over a cancelled run's failed verify beside a later run on the same head. It carries the points of #679's Claude review, and of this change's readers.

Protected edit (.github/workflows/verify.yml): pre-approved by the Maintainer 2026-11-08, ruled by the Factory Builder 2026-11-11. The second edit to it, in 49c2695 (a re-run's group is its own run's id, from cubic's and CodeAnt's read): pre-approved by the Maintainer 2026-11-08, ruled by the Factory Builder 2026-11-13, after the push.

What

.github/workflows/verify.yml gains one top-level concurrency; its example copies match it word for word:

concurrency:
  group: ${{ format('factory-pr-{0}', github.event_name == 'pull_request' && github.run_attempt == 1 && github.event.pull_request.number || github.run_id) }}
  cancel-in-progress: ${{ github.event_name == 'pull_request' && github.run_attempt == 1 }}
  • A pull request's run gives way to the run a newer push to the same pull request starts. On 2026-11-09, 13 of a day's 47 pull-request runs ran on after a newer push: about 870 runner-minutes, 14% of that day's pull-request runner time.
  • A merge group's run is never cancelled and cancels nothing: its group is its own run id.
  • A re-run cancels nothing and replaces nothing: past its first attempt, its group is its own run's id, as a merge group's is. In the pull request's group a re-run of an older head's run would cancel the newest head's run (Astra), or take the place of the one waiting, since a group keeps one run waiting whatever cancel-in-progress says (cubic, CodeAnt; fixed in 49c2695).

tools/check_workflows.py:

  • Scope: lint(text, required=...) allows the two expressions in the required check's workflow alone; run() sets required for verify.yml only. In any other workflow each expression, alone too, is refused. This is the first point of CI: a newer push cancels its pull request's verify run, and a merge group's run is never cancelled #679's review.
  • The rule: RULES['expression'] names both expressions, the second point.
  • The workflow: lens_job_problems refuses any other top-level concurrency in the required check's workflow.

Record 0206 (provisional): amends decision 0014's row "A concurrency group on CI", the third point. The Factory Builder confirms its number at enqueue, after 0204 (#784) and 0205 (#776).

Held by

  • The test: tests/test_tools.py::test_only_a_superseded_pull_request_run_is_cancelled, extended so that:
    • each expression alone is refused outside the required check's workflow;
    • run() refuses the block in examples/workflows/other.yml and allows it in verify.yml.
  • Mutants: 7, each killed:
  • Runs: 30/30 related tools/check_workflows.py mutants are killed, and tests.test_tools.Workflows passes.
  • make checks: red on one check alone. Record 0206 opens a gap until 0204 and 0205 merge; then I merge main and push.

What remains (in record 0206)

  • The secret scan's .github/workflows/ci.yml has no group, so its outdated runs run to the end; they take under a minute.
  • The group's own cancel of a run in progress, and its eviction of a waiting run, were not tried. An evicted run may start no job and leave no verify at all. P-65 cancelled by hand. Either case is of a head a newer push replaced.

Second readers

Reader Head Result
Carbon (Gemini 4 Carbon) 05617858 no findings
Muse 05617858 not run (hung; stopped at 40 min with no answer), owed
Astra (gpt-6-astra) 05617858 2 majors, both fixed in c214084: a re-run of an older head cancelled the newest head's run (now run_attempt == 1); the scoping test masked one expression behind the other (each is now tested alone)
Claude + security 05617858 no blocker. 1 major, fixed: nothing held run()'s scoping to verify.yml (test and mutant added). 2 minors, fixed in record 0206: a re-run from an older head, and the group's cancel and eviction not tried

The fixes in c214084 came after the readers; none of them re-read that head.

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

don-petry and others added 2 commits November 12, 2026 20:57
…d a merge group's never is (#681 step 4, record 0206 provisional)

#679's concurrency returns now that a cancelled run's check is passed over beside a later run (record 0203), with its review's points: the two expressions are allowed in verify.yml's top-level concurrency alone and named in the rule `expression`, and record 0206 amends 0014's concurrency row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… is refused alone outside the required check's workflow, and the check of the repo's files is held to give the allowance to verify.yml alone

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@don-petry
don-petry requested a review from a team as a code owner November 13, 2026 02:59
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-13T02:59:31.010761Z
We couldn’t complete this review. Comment @codex review to try again.
c214084 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@codeant-ai

codeant-ai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

CodeAnt  CodeAnt Review Status

✅  Review completed

Status Commit Started (UTC) Finished (UTC)
✅  #6a051 Incremental review completed 73a6c23 Nov 13, 2026 · 06:51 06:51
✅  #fe5a2 Reviewed your PR c214084 Nov 13, 2026 · 02:59 03:07

@codeant-ai

codeant-ai Bot commented Nov 13, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request configures concurrency for the required check's workflow (verify.yml), allowing a newer push to a pull request to cancel its previous run while ensuring merge group runs are never cancelled. It updates the decision records, workflow standards, and the workflow linter (tools/check_workflows.py) to enforce these rules. The review feedback points out an issue with excessive indentation in the linter's continuation lines, suggesting a cleaner wrapping format.

Comment thread tools/check_workflows.py Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 7 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread .github/workflows/verify.yml Resolved
Comment thread tools/check_workflows.py Resolved
@codeant-ai

codeant-ai Bot commented Nov 13, 2026

Copy link
Copy Markdown

CodeAnt  CodeAnt Nitpicks

1 code suggestion

1. If runs for two pushes reach this group out of order, this cancels the already-running newer-head run too; no later run may replace it, leaving the current head unchecked.

Race condition · .github/workflows/verify.yml:14

@codeant-ai

codeant-ai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

CodeAnt  CodeAnt PR Risk

🟢  Low Risk

  • The PR appears safe to merge; reruns use their own run ID, so they cannot replace a newer head’s pending check.

Assessed commit: 49c2695fb7c4

donpetry-bot
donpetry-bot previously approved these changes Nov 13, 2026
… id, so it takes the place of no newer push's waiting run

A group keeps one run waiting whatever cancel-in-progress says, so in the pull request's group a re-run of an older
head's run would replace the newest head's run waiting. The group is now the pull request's only for its first
attempt; record 0206's row says so. A test and a mutant hold it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 7 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread .github/workflows/verify.yml Resolved
@don-petry

Copy link
Copy Markdown
Contributor Author

Closed to reopen fresh from the same branch at the same head (49c2695): this pull request is held as description_edited_after_approval, since its description was edited at 07:20Z after the Factory's approval of 73a6c23 at 07:14Z (dismissed by the push of 49c2695). The new pull request carries the same title and description, unedited.

@don-petry don-petry closed this Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants