Repository navigation
Description
Problem
Reported: editing a PR body triggered a ci run that skipped every lane, ci-status went red as the newest status and blocked the merge, and an empty commit was needed to clear it.
The mechanism in that framing does not match main. .github/workflows/ci.yml treats edited (without changes.base), labeled and unlabeled on a same-repo PR as contract-only. Every job except ci-status is gated off with the same predicate (ci.yml:14-42; the gate at :137, :325, :681 and on the other lane jobs). ci-status (ci.yml, job ci-status, treat-skipped-as: fail, carry-forward-wait-seconds: '540') calls the ci-workflows ci-status composite (pinned 4610c31e, v0.27.1). In contract-only mode that composite ignores the skipped results and instead reads the ci-lanes commit status the last full run recorded on the head SHA. It waits up to 540 s for any in-flight run of the workflow on that SHA. So a body edit goes red only when ci-lanes is failure or absent at read time. treat-skipped-as plays no part.
The real hazard is that a red contract-only check can outlive the failure it carried:
- (a) A stale settled status ends the wait. In the composite's
run.sh(pinned copy line 348; ci-workflows HEAD line 336, logic unchanged), the poll loop breaks as soon asci-lanesissuccess,failureorerror. It does not check whether a sibling run on the same SHA is still in flight. After a full run fails and is re-run, a body edit during the re-run reads the oldfailureat once and goes red, without waiting for the re-run the loop exists to wait for. - (b) The remedy text sends people the wrong way. The failure message says "no successful ci-lanes status on ; re-run the full workflow". Once
ci-lanesissuccess, re-running the red contract-only run is enough. The message never says so, so an empty commit (a full re-run of every lane) is the natural reaction.
Evidence
Verified this pass (2026-09-27, gh run view/gh api reads):
- Contract-only runs log
results: skipped skipped skipped skipped skipped,contract-only: trueand "reading the ci-lanes status on instead of aggregating skipped lanes" (for example run 36306467809). - Method: the last 400
cipull-request runs were grouped by head SHA. SHAs holding both a success and a failure were inspected, plus a sample of failed runs whose SHA had repeated runs. Every red contract-only run inspected carried a real failure from the same SHA's full run:- 36306467809:
ci-lanes=failure, "lane 4 of 5 did not pass". - 36348453420, 36339525291.
- 36298155233 and 36296671729: each waited on the in-flight full run (135 s, 165 s), then read that run's first-attempt failure.
- 36306467809:
- On SHA
3e014e21, the full run's attempt 1 failed at 05:18 (ci-lanes=failure). The contract-only run went red at 05:18. Attempt 2 passed at 06:23 and wroteci-lanes=success. The SHA now has twoci-statuscheck runs in different check suites: failure (05:18) and success (06:23). run.shat the pin and at ci-workflows HEAD (82ddeae33) differ only in comments. ci-workflows issue fix(source-control): require per-thread pins for autonomous bulk babysit thread resolves #561 and PRs source-control/babysit-prs: telemetry-comment edit uses gh api -f body=@file, posts literal @path string instead of file content #559 and work-items(triage): status side-exit routing does not reliably clear priority: needs-triage, letting already-decided items re-enter the queue #562 fixed earlier wait-ordering bugs; none covers (a).
Not verified:
- The original incident. No red contract-only run was found whose SHA already had a successful
ci-lanesat read time, and no empty-commit PR was identified. - Defect (a) in a live run.
- Which of two same-name
ci-statuscheck runs on one SHA the org ruleset honors. If it honors any failure rather than the latest, a red contract-only run blocks the merge even after a passing re-run, and only a new commit clears it. That would match the report.
Proposed approach
The composite is owned by melodic-software/ci-workflows. Fix it there, then repin here.
- Reproduce first, in a throwaway PR:
- Make a full run fail.
- Re-run it, and edit the body while the re-run is in flight.
- Observe whether the contract-only run reads the stale
failurewithout waiting (defect a). - After the re-run passes, check the PR's merge box: is it blocked by the older red
ci-statuscheck run?
- Upstream (ci-workflows), for (a): in carry-forward mode, a settled
failureorerrorends the wait only when no full-run re-run started after that status is in flight (see Constraints for why "any sibling" is wrong). Asuccessmay still end it immediately. - Upstream, for (b): rewrite the failure message to name both paths. With a failed or missing full run, re-run the full workflow. When
ci-lanesis alreadysuccess, re-run this run. - Here, only if the reproduction shows the ruleset honors the older red check run: give each full run's
ci-statusa way to clear stale contract-only failures, for example by re-running failed contract-onlyciruns on the same SHA after it recordssuccess(needsactions: write). Otherwise document "re-run the redci-statusrun" in the PR workflow docs. - Repin
ci-workflowsin.github/workflows/ci.yml(everyuses:SHA moves together) and update thecarry-forward-wait-secondscomment if the semantics change.
Acceptance criteria
- The reproduction result is recorded here, including how the ruleset treats two same-name check runs on one SHA.
- In a throwaway PR, a body edit made while a re-run of a failed full run is in flight waits for the re-run and passes when the re-run passes.
- The contract-only failure message names the re-run-this-run remedy when
ci-lanesissuccess. - No empty commit is needed to clear a stale red
ci-statusafter the lanes pass (shown in the throwaway PR). -
ci.ymlpins the fixed ci-workflows release.
Constraints and gotchas
- The fix for (a) must not bring back mutual waiting. The composite's input doc says reading the settled status on each poll is what stops two contract-only runs on one SHA from waiting on each other until the ceiling. Waiting on "any in-flight sibling" before accepting a
failurewould reintroduce that for two label flips on a failed SHA. The loop has to tell a full-run re-run apart from a contract-only sibling. Options: wait only on a sibling whose current attempt started after the settled status'screated_at, or inspect the sibling's jobs to see whether its lanes run. ci-statusis the only required check. A change that lets it pass on a skipped lane or on a timeout reopens the fail-open hole the composite exists to close; keep every path fail-closed.- The contract-only predicate is repeated verbatim in the concurrency group, in every gated job's
if:, and as the composite'scontract-onlydefault. Change all of them or none. - The wait ceiling is sized from this repository's measured full-run time (
timeout-minutes: 10, 540 s). - Test in a throwaway PR. Do not force-push or empty-commit other people's PRs to test.
Context
Source: operator report during the inbox wind-down, which this issue retires. Related: ci-workflows #550, #557, #559, #561, #562; melodic-software/github-iac#378 (the earlier eviction bug that led to the branched concurrency group).
Activity
fix(ci): keep the contract remedy out of the synced rule
docs(ci): contract-only ci-status stale-failure remedy (#4670) (#4956)
ci: point workflow comments at their trackers instead of restating pi…
docs(ci): drop the time-to-green section, soften the contract-only re…
kyle-sexton commentedon Sep 29, 2026
Reopened. This comes from the 2026-09-29 audit of the Cursor agent run.
priority: mediumandwork-class: scopedstay.Finding
#4956 closed this issue with none of the five acceptance criteria met. It added a
ci.ymlcomment and a docs section (the issue's conditional step 4 fallback) without doing steps 1-3 and 5: no reproduction is recorded, no upstream fix exists, andci.ymlstill pins ci-workflows4610c31e(v0.27.1) for that composite.The operator remedy it states (re-run the red contract-only run; an empty commit is wrong) is unverified. The issue's "Not verified" section names exactly this: which of two same-name
ci-statuscheck runs the org ruleset honors.Operator steps (needs a maintainer with a throwaway PR)
cirun fail, re-run it, edit the PR body while the re-run is in flight, and record whether the contract-onlyci-statusreads the stale failure without waiting (defect a).ci-statuscheck run still block? Record the result here.This issue stays the tracker until then.
What happens next
PR #5316 reduces the
ci.ymlcomment to a pointer atdocs/ci-runner-routing.mdand usesRefs #4670, neverCloses. The core-docs group is asked to soften the docs remedy to what is verified.docs: fix factual and wording defects in top-level docs and the nativ…
ci: re-pin gitleaks composite, extend the Windows lane, wire unwired …
docs(agents): hold a PR with the do-not-merge label, not body prose (#…
kyle-sexton commentedon Sep 30, 2026
Agent consensus under the owner's 2026-09-30 delegation (not reviewed by the owner; reversible): Not obsolete. The thread's four operator steps were never done, and nothing on origin/main or upstream supersedes them. The thread frames no owner question, and the owner delegated the choice to run the throwaway-PR reproduction autonomously instead of waiting for a maintainer. Resolution: do it here.
Plan:
do-not-mergelabel, and close and delete it at the end. Make the fullcirun fail, re-run it, edit the PR body during the re-run, and record whether the contract-onlyci-statusreads the staleci-lanes=failureat once (defect a). After the re-run passes, read the merge box and the rulesets API to see whether the older redci-statuscheck run still blocks. Record both results on fix(ci): contract-only ci-status reads a stale failure during a re-run #4670.ci-lanesis success. Keep every path fail-closed and do not reintroduce mutual waiting. Extend the ci-workflows ci-status shell tests with: (i) stale failure plus in-flight full re-run waits, (ii) two contract-only siblings on a failed SHA do not wait on each other, (iii) a missing status still fails.uses:SHA in.github/workflows/ci.ymltogether and update thecarry-forward-wait-secondscomment. Updatedocs/ci-runner-routing.md, and add the stale-check-clearing step only if step 1 shows the ruleset honors the older red check run. The PR usesRefs #4670, and the issue closes when all five acceptance criteria are met.Evidence: origin/main
.github/workflows/ci.ymlstill pins ci-workflows 4610c31e (v0.27.1). ci-workflows main.github/actions/ci-status/run.shlines 332-340 say a settled verdict ends the wait whatever is still in flight, and lines 378, 388 and 396 still say only "re-run the full workflow", so defects (a) and (b) are unfixed. No ci-workflows issue covers defect (a) (#561 is closed and a different ordering bug). Latest ci-workflows release is v0.30.1 and the repin is pending. Not verified: whether the PR #5316 comment softening landed.Resolved by consensus of three read-only researchers under the owner's standing instruction of 2026-09-30 to resolve owner-gated issues.
Next: the issue is labeled
agent-ready; a worker picks it up and starts with step 1.kyle-sexton commentedon Sep 30, 2026
Reproduction results from a throwaway PR (#5581, draft, labeled
do-not-merge, now closed and its branch deleted). All times are 2026-09-30 UTC, repomelodic-software/claude-code-plugins, head SHAad99ed0ce859b0fa1071d48f30c410528ee331f8, composite pin4610c31e(v0.27.1).Setup: a step in the
hook-utilsjob (if: github.run_attempt == '1',run: exit 1) fails the first attempt only.scripts/check-lane-coverage.sh --checkandscripts/check-docs-only-gate.sh --checkaccepted the edit.Defect (a) is reproduced
opened) and contract-only run 36673989103 (labeled) start.hook-utilsfailed.ci-lanes=failurerecorded (status id 55241522644).gh run rerun 36673988526. Attempt 2 is queued.gh pr edit --body-filewhile attempt 2 is queued.edited) is created.ci-statusjob starts. Attempt 2 is still in flight:changesfinished 05:59:31, every lane job was still queued.Contract-only event: reading the ci-lanes status ....::error::no successful ci-lanes status on ad99ed0c...; re-run the full workflow.The log has no
Waiting Ns for in-flight run(s)line and no wait note. The composite read the stalefailureat once, with the re-run in flight, and went red. After attempt 2 finished at 06:12:50 (all lanes success),ci-lanes=successwas recorded at 06:12:49 (status id 55242254969).Contrast, run 36673989103 (started 05:39:26): no settled
ci-lanesstatus existed yet, so it loggedWaiting 15s for in-flight run(s) 36673988526on every poll and ended at the 540 s ceiling (05:49:03) withwaited 540s of 540s. The full run was slow that day because lane jobs sat in the runner queue for about 6 minutes, and it ran about 23 minutes end to end. So the wait loop works only while no settled status exists.Re-running the red contract-only run
Re-running 36675804726 after
ci-lanes=success(attempt 2 job, 06:14:55): the Aggregate step loggedCarried forward: ci-lanes is success on ad99ed0c...and passed. The job still went red becausepr-contractfails on thedo-not-mergelabel. The stale check run 109760383506 was replaced by 109764541830 in the same check suite (99324140244). The check-runs API no longer lists the replaced run. The same happens to attempt 1 of the full run after a re-run.So a re-run of a red contract-only run fixes the composite's own verdict and replaces that check run. That supports defect (b): the remedy is to re-run the contract-only run, not to push a commit.
Ruleset and merge box: not determined
gh api repos/melodic-software/claude-code-plugins/rules/branches/mainis readable without admin scope. The required-status-checks rule is from org ruleset 17989001: contextci-status,integration_id15368,strict_required_status_checks_policyfalse. Other rules: deletion, non_fast_forward, required_linear_history (17988999), pull_request (squash only, thread resolution required), required_signatures (17989003). None says how two same-name check runs on one SHA are combined.ci-statusrun is red no matter whatci-lanessays, so the merge box cannot answer the question. After the passing re-run:mergeStateStatusBLOCKED,mergeableMERGEABLE, draft true; rollup holds threeci-statusFAILURE entries (runs 36673988526, 36673989103, 36675804726) andci-lanesSUCCESS. Whether the ruleset honors the latest run or any red run was not observable.ci-status, so a ready, unlabeled probe PR with an older red contract-only check run beside it. I did not remove the label: thedo-not-mergelabel was the only merge guard on a probe that adds a first-attemptexit 1toci.yml, and a green unlabeled ready PR could be merged. That is the owner's call.ci-statuscheck run older than a later success on its merged head SHA. The SHA3e014e21from the issue is on no remote branch and no PR has it as a head (PR 4559, same title, merged with head0b88a37d), so it cannot show whether the ruleset blocked.Acceptance criteria
The issue stays open.
docs(ci): state the observed contract-only ci-status re-run behavior (#…
kyle-sexton commentedon Sep 30, 2026
Owner decision (2026-09-30): ratified. The owner approved the agent consensus above (headed "Agent consensus under the owner's 2026-09-30 delegation") in their own words: "I explicitly want you to do the recommended stuff here." It now stands as the owner's decision.
kyle-sexton commentedon Oct 1, 2026
Owner decision (2026-10-01): approved the recommendation ("go with recommended", the owner's reply to the batch decision page that listed this question and its recommendation).
Question: may an agent merge ci-workflows PR #647 and cut a release so the repin can go ahead?
Chosen option A: approve, with no ruleset probe. An agent takes ci-workflows #647 out of draft, merges it and cuts a release. It then repins every ci-workflows
uses:SHA in.github/workflows/ci.ymltogether, updates thecarry-forward-wait-secondscomment anddocs/ci-runner-routing.md(the remedy is to re-run the contract-only run; how the ruleset treats two same-nameci-statuscheck runs stays recorded as unverified), and re-runs the labeled draft throwaway-PR check on the new pin. No unlabeled ready probe PR.Next: an agent readies and merges #647 through its own ready flow, cuts the release, and opens a draft PR here (
Refs #4670) with the repin and doc edits. The result goes on this issue, and it closes once AC2-AC5 are met, with AC1's ruleset item recorded as unverified.fix(ci): repin ci-workflows to v0.30.2 for the stale-failure wait fix (…
kyle-sexton commentedon Oct 1, 2026
Done under the owner decision of 2026-10-01 (option A). All times are 2026-10-01 UTC.
Merges and release
a267a27f7a321452267e20c82d57699b6c057cb0at 20:56:51. ci-status: a stale ci-lanes failure ends the carry-forward wait while its full run is re-running ci-workflows#646 is closed. Review results:run_started_at". The data contradicts it. Attempt 2 of run 36673988526 hadrun_started_at05:57:10, one second after the re-run request and two minutes before its first job started. In the probe below, a live read at 21:27:17 showed attempt 2queuedand already carryingrun_started_at21:27:15. The reply with the first evidence is on the PR, and the thread is resolved.release.yml(run 36925303957,bump=patch). The tag points ata267a27f.uses:refs in.github/workflows/ci.ymltogether toa267a27f… # v0.30.2. It also updates thecarry-forward-wait-secondscomment,docs/ci-runner-routing.md(section Contract-onlyci-status) and the README pin record. It was squash-merged asb935cceb8e9962df5a1cff906668d53b16e35cac.Throwaway-PR check on the new pin
The probe was #5749: a draft labeled
do-not-merge, now closed with its branch deleted. Its headd01dc5d4is #5747's head at the time,e53c2f6e(the same ci-workflows pins that merged), plus the samehook-utilsstep as #5581 (if: github.run_attempt == '1',run: exit 1).labeled) starts.Waiting 15s for in-flight run(s) 36927824414on every poll.ci-lanes=failure(status 55404119752).gh run rerun 36927824414 --failed. Attempt 2 is queued withrun_started_at21:27:15.gh pr edit --body-filecreates contract-only run 36928786481 (edited).Waiting 15s for in-flight run(s) 36927824414 ... (waited 0s of 540s).ci-lanes=success(status 55404172904).settled after 15s, thenCarried forward: ci-lanes is success. Its Aggregate step passes.Carried forward: ci-lanes is successand passes.Three Aggregate steps passed: 36927824414 attempt 2, 36928786481, and 36927828640 attempt 2. Their
ci-statusjobs are still red, but only becausepr-contractfails on thedo-not-mergelabel, the probe's merge guard. The Aggregate step, which runs the composite, is the verdict this check reads. At 21:27:31 the newestci-laneswas still the 21:27:01 failure, and the success arrived only at 21:27:45. That poll is the one that tells v0.30.2 from v0.27.1, which would have gone red there. On v0.27.1 the same body edit read the stale failure at once (#5581, run 36675804726).The red at 21:27:15 carries the new message:
no successful ci-lanes status on d01dc5d4...; re-run the full workflow (waited 465s of 540s on in-flight run(s): 36927824414). Once ci-lanes on d01dc5d4... is success, re-run this run instead.Acceptance criteria
ci-statuscheck runs on one SHA stays unverified. The decision ruled out an unlabeled ready probe, anddocs/ci-runner-routing.mdsays it is unverified. No stale-check-clearing step was added.run.shfail_carry_forward).ci.ymlpins v0.30.2 on main atb935cceb8e9962df5a1cff906668d53b16e35cac.Closing per the decision: AC2 to AC5 are met, and AC1's ruleset item is recorded as unverified.
Not in scope, because the decision names only
ci.yml:.github/workflows/test-windows.yml(change-detection) and.github/workflows/issue-triage-label.ymlstill pin ci-workflows v0.27.1.