Operator, 2026-10-23: the second half of the merged-PRs-read-red item (#20061 / PR #20062 took the first). After the controller's post-merge runs leave the merged heads, 7 of the 30 most recently merged PRs still roll up FAILURE, from 8 red contexts of one class: a check that ran twice on the same head and whose first run's conclusion stayed.
red context
count
PRs
File Size Guard / check-sizeCANCELLED, a later run of the same name SUCCESS on the same head
GitHub's rollup (the field the PR list icon renders, as "59/60 checks passing" with a red mark) counts every check run on the SHA, not the latest per name: #20032 carries two cancelled check-size runs (07:17Z, 07:20Z) and three green ones (07:22Z, 07:36Z, 08:08Z) and rolls up FAILURE. The merge gate reads the latest run per required context, which is why these PRs merged clean while reading red.
Live specimen and mechanism proof, 14:0xZ: PR #20063 (head a949c64086) opened at 14:00Z; check-size run 39965984915 (created 14:00:42Z) was cancelled when the body-edit run 39966042076 arrived at 14:01:05Z under the workflow's cancel-in-progress: true group; the edit run passed; rollup FAILURE. gh run rerun 39965984915 at 14:11:51Z → attempt 2 success at 14:12:39Z → rollup SUCCESS (63 green, 1 skipped), the cancelled entry gone: a re-run replaces the conclusion in place.
Prior sightings on the record: Mnemosyne read the cancelled check-size as a superseded duplicate on PR #19352 (10-01) and PR #19587 (10-11) and adopted a workaround (edit the body before the push or after green); Grace (08-17) found that a re-run replays the frozen event payload, so a body gate reading github.event.pull_request.body can never pass on re-run, which is why the baseline's pr-body job now fetches the body live (reusable-pr-baseline.yml v0.1.55:468–489), as does file-size-guard.yml:43–55. That property is what the fix below depends on.
Live latest-open sweep: the newest 20 open issues at 14:13Z, no equivalent (#20061 is the controller half). A2A claims in the last hour: none on this surface. Memory Core rationale sweep: the three sightings above, no prior fix. Own open assignments: #20061 (the sibling), none else on this surface.
The Problem
Two workflows re-run on an unchanged head when the PR body changes (pull_request: edited), by design: both read the body (the size ratchet's justification marker, the PR-body anchors). Each edited event starts a new workflow run, a new check suite with check runs of the same names, and the earlier suite's conclusions stay on the SHA:
File Size Guard cancels the in-progress run of the same ref when the edit arrives (concurrency.group: file-size-guard-${ref}, cancel-in-progress: true, file-size-guard.yml:21-23). The cancelled run is a red check run on the head for good; agents edit the body right after opening a PR, so the cancellation is routine (6 of 30 PRs).
PR Baseline / PR body fails on a body that misses an anchor and passes once the author edits it, the designed fail-fix-pass flow. The first run's FAILURE stays beside the later SUCCESS (2 of 30). File Size Guard's own ratchet has the same designed flow (fail, add the justification, pass): 0 of 30 today, structural all the same.
Neither workflow can fix this from inside a run: check runs cannot be deleted, and GitHub offers no latest-per-name rollup. What does work is re-running the first run after the head has a green run of the same workflow: re-runs replace the conclusion in place (the specimen above), and both jobs read the live PR, so the re-run judges the corrected body, not the frozen payload.
The Architectural Reality
.github/workflows/file-size-guard.yml:7-10 triggers on opened, edited, synchronize, ready_for_review with a paths filter; :21-23 the concurrency group with cancellation; :43-55 fetches the live body for --pr-body-file. The repo-wide run_attempt == '1' && github.ref || github.run_id idiom (#15593) governs workflows that cancel; a workflow with no concurrency block is outside its scope by construction.
.github/workflows/pr-baseline.yml:55-57 triggers on the same four events and calls neomjs/neo-agent-skills/.github/workflows/reusable-pr-baseline.yml@v0.1.55; it has no concurrency block, so its runs never cancel each other (0 cancellations in the data). Its ten jobs are required contexts in the dev ruleset (gh api repos/neomjs/neo/rules/branches/dev); the file's header still says dev carries no required_status_checks rule, a comment drift noted as a defect-note, not touched here.
reusable-pr-baseline.yml v0.1.55 pr-body (:438-520) fetches the body with pulls.get and runs neo-agent-skills-pr-body; no checkout.
GitHub: workflow_run runs execute in the base repository from the default branch's workflow file, with a token that may hold actions: write, and anchor their own check runs on the default-branch commit they ran from (github.sha), while the payload carries the triggering run's head_sha, workflow_id and run_number; actions.listWorkflowRuns filters by workflow_id + head_sha; actions.reRunWorkflow / reRunWorkflowFailedJobs start a new attempt whose job conclusions replace the previous attempt's in the suite (the specimen); re-runs keep the original run's actor, SHA and ref.
The durable home for the repair is the Skills corpus' reusable baseline, which every consumer repository calls; a consumer cannot change it from here and the tag pin moves by release. The repository-local shape below is the one that ships in the v13.3.1 window; it retires when the upstream shape lands (sunset condition in Out of Scope).
Design authority: #15593's rerun-isolation contract is the idiom for workflows that cancel; removing File Size Guard's cancellation takes it out of that contract's scope rather than bending it. The body-edit trigger stays load-bearing (pr-baseline.yml:15-20); nothing here changes what is linted or when.
The Fix
file-size-guard.yml: delete the concurrency block (3 lines). Two runs on the same head both complete; a synchronize run's predecessor finishes on the old SHA, invisible on the new head. Cost: one redundant ~40 s job per rapid body edit.
New .github/workflows/same-head-check-repair.yml: on: workflow_run: workflows: [PR Baseline, File Size Guard], types: [completed], permissions: actions: write, one github-script job that, when the completed run is success from a pull_request event on an open PR, lists that workflow's runs on the same head_sha and re-runs each completed run whose conclusion is failure, cancelled or timed_out, whose run_attempt is 1 and whose per-workflow run_number is lower than the witness's (failed jobs only for failure, all jobs for cancelled / timed_out); API errors become core.warning, never a failed job, because the job's own check run sits on the dev commit the event ran from and a red there is a red on dev. The loop terminates: a repaired run completes green and lists nothing to repair, the attempt bound stops a run that fails twice, and the run-number bound keeps an old green that finishes late from spending a newer red run's retry before the author's fix has run (Euclid's RA-1 on PR #20066).
Nothing else: PR Baseline's caller, the reusable workflow, the ruleset and both lint scripts are untouched.
Contract Ledger Matrix
Target Surface
Source of Authority
Proposed Behavior
Fallback
Docs
Evidence
File Size Guard runs on one head
the workflow's trigger set (unchanged)
every run completes; none cancels a sibling on the same ref
none needed
the file's trigger comment
AC-1
Same-Head Check Repair (new)
workflow_run of the two body-reading workflows
after a green run on a head, red runs of the same workflow on that head with a lower run number are re-run once
the repair job never fails; an API refusal is a warning and the stale red stays, as today
workflow header
AC-2, AC-3
required contexts baseline / *
dev ruleset
unchanged (the latest run per name already governs the gate)
—
—
the ruleset read
Decision Record impact
none.
Acceptance Criteria
AC-1 No same-head cancellation:file-size-guard.yml has no concurrency key; on this ticket's PR, a body edit during an in-flight check-size run leaves two check-sizeSUCCESS entries and no CANCELLED entry in the head's rollup (the PR touches the guard's own file, so the guard runs).
AC-2 Repair, evaluated: the committed repair script, run against a mocked actions API with runs [A: failure attempt 1, B: the completed success (self), C: cancelled attempt 2, D: in_progress, N: a newer failure attempt 1], re-runs exactly A (failed jobs) and nothing else; with C at attempt 1 it re-runs A and C (C all jobs); an older green completing after the newer failure N re-runs nothing, and a later green re-runs N once; with the PR closed, or the triggering run not success, or its event not pull_request, it re-runs nothing. Output in the PR body.
AC-3 Never red itself: the same harness with every actions call throwing ends with warnings and no setFailed.
AC-4 Post-merge only: for the first PR after this lands whose PR body job fails and then passes on a body edit, the head's rollup shows the first run at attempt 2 success within minutes of the green run and no stale FAILURE; receipt on this ticket.
Out of Scope
The upstream home: a neomjs/neo-agent-skills ticket to fold the repair into reusable-pr-baseline.yml (serving every consumer), filed as the follow-up; when it ships and the pin moves, same-head-check-repair.yml loses its PR Baseline entry, and retires once File Size Guard moves there too.
Retroactive repair of the 7 merged PRs: a re-run of a merged PR's check-size checks out a merge ref that no longer exists; the baseline's pr-body has no checkout and would repair; the operator's call whether old history is worth touching.
pr-baseline.yml's header drift (says no required contexts; the ruleset requires all ten): defect-note.
The dev commit list's red (test runs cancelled by the next merge): a runner-budget decision.
Two green witnesses completing within the same seconds may both request the same re-run; GitHub refuses the second (the run is already in progress) and the refusal is a warning. Not exercised against GitHub; the first week's Same-Head Check Repair run logs show it if it happens.
Avoided Traps
cancel-in-progress: false for File Size Guard: keeps one running and one pending job and cancels a third arrival's predecessor; three events within a run's 40 s still leave a cancelled entry.
Re-running on edited instead of a fresh run: the fresh run is the event's own evidence; the repair re-runs the old run only after a green one exists, so a re-run can never outrank a green with a red (Grace's 08-17 trap, in reverse).
Completion order as "earlier": a success that completes later is not a later success; the witness relation is the per-workflow run number (RA-1).
Status-context verdicts for the lints: latest-write-wins would need the required contexts rebound in the ruleset (#17171's domain) and a change to the reusable workflow.
Dropping edited: the body gates stop re-judging corrected bodies (pr-baseline.yml:15-20).
Context
Operator, 2026-10-23: the second half of the merged-PRs-read-red item (#20061 / PR #20062 took the first). After the controller's post-merge runs leave the merged heads, 7 of the 30 most recently merged PRs still roll up
FAILURE, from 8 red contexts of one class: a check that ran twice on the same head and whose first run's conclusion stayed.File Size Guard / check-sizeCANCELLED, a later run of the same nameSUCCESSon the same headPR Baseline / baseline / PR bodyFAILURE, a later runSUCCESSon the same headGitHub's rollup (the field the PR list icon renders, as "59/60 checks passing" with a red mark) counts every check run on the SHA, not the latest per name: #20032 carries two cancelled
check-sizeruns (07:17Z, 07:20Z) and three green ones (07:22Z, 07:36Z, 08:08Z) and rolls upFAILURE. The merge gate reads the latest run per required context, which is why these PRs merged clean while reading red.Live specimen and mechanism proof, 14:0xZ: PR #20063 (head a949c64086) opened at 14:00Z;
check-sizerun 39965984915 (created 14:00:42Z) was cancelled when the body-edit run 39966042076 arrived at 14:01:05Z under the workflow'scancel-in-progress: truegroup; the edit run passed; rollupFAILURE.gh run rerun 39965984915at 14:11:51Z → attempt 2successat 14:12:39Z → rollupSUCCESS(63 green, 1 skipped), the cancelled entry gone: a re-run replaces the conclusion in place.Prior sightings on the record: Mnemosyne read the cancelled
check-sizeas a superseded duplicate on PR #19352 (10-01) and PR #19587 (10-11) and adopted a workaround (edit the body before the push or after green); Grace (08-17) found that a re-run replays the frozen event payload, so a body gate readinggithub.event.pull_request.bodycan never pass on re-run, which is why the baseline'spr-bodyjob now fetches the body live (reusable-pr-baseline.ymlv0.1.55:468–489), as doesfile-size-guard.yml:43–55. That property is what the fix below depends on.Live latest-open sweep: the newest 20 open issues at 14:13Z, no equivalent (#20061 is the controller half). A2A claims in the last hour: none on this surface. Memory Core rationale sweep: the three sightings above, no prior fix. Own open assignments: #20061 (the sibling), none else on this surface.
The Problem
Two workflows re-run on an unchanged head when the PR body changes (
pull_request: edited), by design: both read the body (the size ratchet's justification marker, the PR-body anchors). Eacheditedevent starts a new workflow run, a new check suite with check runs of the same names, and the earlier suite's conclusions stay on the SHA:File Size Guardcancels the in-progress run of the same ref when the edit arrives (concurrency.group: file-size-guard-${ref},cancel-in-progress: true,file-size-guard.yml:21-23). The cancelled run is a red check run on the head for good; agents edit the body right after opening a PR, so the cancellation is routine (6 of 30 PRs).PR Baseline / PR bodyfails on a body that misses an anchor and passes once the author edits it, the designed fail-fix-pass flow. The first run'sFAILUREstays beside the laterSUCCESS(2 of 30).File Size Guard's own ratchet has the same designed flow (fail, add the justification, pass): 0 of 30 today, structural all the same.Neither workflow can fix this from inside a run: check runs cannot be deleted, and GitHub offers no latest-per-name rollup. What does work is re-running the first run after the head has a green run of the same workflow: re-runs replace the conclusion in place (the specimen above), and both jobs read the live PR, so the re-run judges the corrected body, not the frozen payload.
The Architectural Reality
.github/workflows/file-size-guard.yml:7-10triggers onopened, edited, synchronize, ready_for_reviewwith a paths filter;:21-23the concurrency group with cancellation;:43-55fetches the live body for--pr-body-file. The repo-widerun_attempt == '1' && github.ref || github.run_ididiom (#15593) governs workflows that cancel; a workflow with noconcurrencyblock is outside its scope by construction..github/workflows/pr-baseline.yml:55-57triggers on the same four events and callsneomjs/neo-agent-skills/.github/workflows/reusable-pr-baseline.yml@v0.1.55; it has no concurrency block, so its runs never cancel each other (0 cancellations in the data). Its ten jobs are required contexts in thedevruleset (gh api repos/neomjs/neo/rules/branches/dev); the file's header still saysdevcarries norequired_status_checksrule, a comment drift noted as a defect-note, not touched here.reusable-pr-baseline.ymlv0.1.55pr-body(:438-520) fetches the body withpulls.getand runsneo-agent-skills-pr-body; no checkout.workflow_runruns execute in the base repository from the default branch's workflow file, with a token that may holdactions: write, and anchor their own check runs on the default-branch commit they ran from (github.sha), while the payload carries the triggering run'shead_sha,workflow_idandrun_number;actions.listWorkflowRunsfilters byworkflow_id+head_sha;actions.reRunWorkflow/reRunWorkflowFailedJobsstart a new attempt whose job conclusions replace the previous attempt's in the suite (the specimen); re-runs keep the original run's actor, SHA and ref.Design authority: #15593's rerun-isolation contract is the idiom for workflows that cancel; removing File Size Guard's cancellation takes it out of that contract's scope rather than bending it. The body-edit trigger stays load-bearing (
pr-baseline.yml:15-20); nothing here changes what is linted or when.The Fix
file-size-guard.yml: delete theconcurrencyblock (3 lines). Two runs on the same head both complete; asynchronizerun's predecessor finishes on the old SHA, invisible on the new head. Cost: one redundant ~40 s job per rapid body edit..github/workflows/same-head-check-repair.yml:on: workflow_run: workflows: [PR Baseline, File Size Guard], types: [completed],permissions: actions: write, onegithub-scriptjob that, when the completed run issuccessfrom apull_requestevent on an open PR, lists that workflow's runs on the samehead_shaand re-runs each completed run whose conclusion isfailure,cancelledortimed_out, whoserun_attemptis 1 and whose per-workflowrun_numberis lower than the witness's (failed jobs only forfailure, all jobs forcancelled/timed_out); API errors becomecore.warning, never a failed job, because the job's own check run sits on thedevcommit the event ran from and a red there is a red ondev. The loop terminates: a repaired run completes green and lists nothing to repair, the attempt bound stops a run that fails twice, and the run-number bound keeps an old green that finishes late from spending a newer red run's retry before the author's fix has run (Euclid's RA-1 on PR #20066).Contract Ledger Matrix
File Size Guardruns on one headSame-Head Check Repair(new)workflow_runof the two body-reading workflowsbaseline / *devrulesetDecision Record impact
none.Acceptance Criteria
file-size-guard.ymlhas noconcurrencykey; on this ticket's PR, a body edit during an in-flightcheck-sizerun leaves twocheck-sizeSUCCESSentries and noCANCELLEDentry in the head's rollup (the PR touches the guard's own file, so the guard runs).actionsAPI with runs[A: failure attempt 1, B: the completed success (self), C: cancelled attempt 2, D: in_progress, N: a newer failure attempt 1], re-runs exactly A (failed jobs) and nothing else; with C at attempt 1 it re-runs A and C (C all jobs); an older green completing after the newer failure N re-runs nothing, and a later green re-runs N once; with the PR closed, or the triggering run notsuccess, or its event notpull_request, it re-runs nothing. Output in the PR body.actionscall throwing ends with warnings and nosetFailed.PR bodyjob fails and then passes on a body edit, the head's rollup shows the first run at attempt 2successwithin minutes of the green run and no staleFAILURE; receipt on this ticket.Out of Scope
neomjs/neo-agent-skillsticket to fold the repair intoreusable-pr-baseline.yml(serving every consumer), filed as the follow-up; when it ships and the pin moves,same-head-check-repair.ymlloses itsPR Baselineentry, and retires once File Size Guard moves there too.check-sizechecks out a merge ref that no longer exists; the baseline'spr-bodyhas no checkout and would repair; the operator's call whether old history is worth touching.pr-baseline.yml's header drift (says no required contexts; the ruleset requires all ten): defect-note.devcommit list's red (test runs cancelled by the next merge): a runner-budget decision.Same-Head Check Repairrun logs show it if it happens.Avoided Traps
cancel-in-progress: falsefor File Size Guard: keeps one running and one pending job and cancels a third arrival's predecessor; three events within a run's 40 s still leave a cancelled entry.editedinstead of a fresh run: the fresh run is the event's own evidence; the repair re-runs the old run only after a green one exists, so a re-run can never outrank a green with a red (Grace's 08-17 trap, in reverse).edited: the body gates stop re-judging corrected bodies (pr-baseline.yml:15-20).Related
#20061 / PR #20062 (the controller half), #15593 (rerun isolation), #17171 (required-context policy), #19352 and #19587 (prior sightings), #20022 (the cut), PR #20066.
Retrieval Hint: "same-head rerun stale red check-size cancelled PR body failure rollup repair workflow_run"
— Vega (Claude Fable 5.1, Claude Code) 🌿