Repository navigation
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
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
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
17d15b6
The required check's pull-request run gives way to a newer push's, an…
don-petry c214084
The reviews of #681 step 4: a re-run cancels nothing, each expression…
don-petry 73a6c23
Merge remote-tracking branch 'origin/main' into claude/cancel-superse…
don-petry 49c2695
cubic's and CodeAnt's read of #802: a re-run's group is its own run's…
don-petry File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...est-run-gives-way-to-a-newer-pushs-and-a-merge-groups-run-is-never-cancelled.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # 0206. The required check's pull-request run gives way to a newer push's, and a merge group's run is never cancelled | ||
|
|
||
| Status: accepted. The Factory Builder's rulings of 2026-11-09 and 2026-11-13 on issue 681, a Lens's cancelled run beside a later one on the same head: its plan's step 4, the cancel of a pull request's run a newer push outdates, with the points of the Claude review of "CI: a newer push cancels its pull request's verify run, and a merge group's run is never cancelled" (pull request 679). It amends decision 0014's row "A concurrency group on CI", where it says none on the required check; the rest of the row stands. | ||
|
don-petry marked this conversation as resolved.
Resolved
|
||
|
|
||
| ## Decision | ||
|
|
||
| | What | Decided | Because | | ||
| |---|---|---| | ||
| | The group | `.github/workflows/verify.yml` has one top-level concurrency: its group `${{ format('factory-pr-{0}', github.event_name == 'pull_request' && github.run_attempt == 1 && github.event.pull_request.number \|\| github.run_id) }}` and its `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, on the Free plan's 20 runners | | ||
| | A merge group's run | Never cancelled, and it cancels nothing: its group is its own run's id, unlike any other's | A cancelled merge group's run would eject its entries from the queue | | ||
| | A re-run | Cancels nothing and replaces nothing: its attempt is past its first, so its group is its own run's id, as a merge group's is | A re-run keeps its `pull_request` event and number, so in the pull request's group a re-run of an older head's run would cancel the newest head's run in progress (Astra), or take the place of the one waiting, since a group keeps one run waiting whatever `cancel-in-progress` says (cubic and CodeAnt, reading this record's change); no later run on that head replaces either | | ||
| | Why 0014's reason no longer forbids it | 0014 kept the required check out of any group because a group evicts a waiting run, which once lost work (`docs/lessons.md`, "A request existed only as a queued run"). A pull request's run is no request: the run a newer push starts judges the newer head, and what is evicted judged content no longer the head. Each Run's lane keeps its own group, which never cancels the Run in progress | The lesson stands for every workflow that carries a request | | ||
| | The cancelled run's check | A cancelled run's `verify` concludes `failure` under `if: always()`, its suite `cancelled` (`trials/P-65.json`). On the head it ran on, beside a later run of the file, it is passed over (decision 0203); on an older head nothing reads it | Step 3 lands first, so the cancel cannot fail a Lens on content a later run passed | | ||
| | Only the required check's workflow | `tools/check_workflows.py` allows the two expressions in `.github/workflows/verify.yml`'s top-level concurrency alone, and names them in its rule `expression`; in any other workflow each is an expression where text from outside could stand | The Claude review of "CI: a newer push cancels its pull request's verify run, and a merge group's run is never cancelled" (pull request 679) | | ||
| | What remains | The secret scan's `.github/workflows/ci.yml` has no group, so its superseded runs still run to the end. A person's cancel and a reopening each leave a cancelled run beside a later one on the same head, which decision 0203 reads. The group's own cancel of a run in progress, and its eviction of a run still waiting, which may start no job and leave no `verify` at all, were not tried: P-65 cancelled by hand; either is of a head a newer push replaced | Named; the secret scan's runs take under a minute | | ||
|
|
||
| ## Why | ||
|
|
||
| Decision 0014 kept the required check out of any concurrency group for a reason that holds for a request and not for a | ||
| pull request's run. Once decision 0203 reads a cancelled run beside a later one, the run a newer push outdates can give | ||
| way, and only the merge group's run, which the queue needs whole, is kept out of every group but its own. | ||
|
|
||
| ## Boundaries | ||
|
|
||
| | Boundary | Check | | ||
| |---|---| | ||
| | The required check's workflow holds that concurrency, or none, and no other; a merge group's run and a re-run are never cancelled nor cancel another's; the two expressions stand there alone, and in any other workflow, each alone too, are refused | `tests/test_tools.py::test_only_a_superseded_pull_request_run_is_cancelled`, `tests/test_tools.py::test_a_rule_with_no_counter_example_is_caught`, `tools/check_workflows.py`, mutant: "the required check's concurrency may be anything", mutant: "a pull request's lane is no expression the check allows", mutant: "any top-level concurrency expression is allowed", mutant: "a pull request's lane stands in any workflow", mutant: "the cancel stands in any workflow", mutant: "every workflow is linted as the required check's", mutant: "the required check's workflow is linted as any other" | | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.