Repository navigation
Stop the stable cut counting its own check runs against the commit it cuts (GST-2463) - #4297
Merged
Merged
Conversation
… cuts (GST-2463) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…-2463) GitHub files a check run another workflow creates through the API (main-backstop from release-gate.yml and evals-main-backstop.yml) under any github-actions check suite on the commit, so suite membership could hide a red main-backstop. The cut now lists the jobs of its own workflow runs and sets aside only check runs whose id is one of those job ids. Review-Finding: p1/red-team#1 reader=red-team Review-Finding: p1/adversarial-native#1 reader=adversarial-native Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…s safe (GST-2463) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Contributor
|
Free Tests run 43082282390 attempt 1: |
garrytan
added a commit
that referenced
this pull request
Nov 17, 2026
… read too (GST-2252) After #4297 the cut sets aside check runs from its own workflow and the Windows nightly by job id, but the rows from lib/ci-head-checks.ts skipped that filter, so the cut waited on its own run. headCheckRows now takes the set-aside check run and workflow run ids and removes them from every list before ciAtHead reads it. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
capy-ai Bot
added a commit
that referenced
this pull request
Nov 17, 2026
… head green while a check on it failed (GST-2252) (#4257) * Make gstack-pr-wait, gstack-ci-gate and the release cut count a failed check hidden behind an empty rerun (GST-2252) GitHub rollup and default check-runs list hold only each check suite latest attempt, so a rerun attempt with no jobs hid the failed run before it, and a workflow run that failed before any job never appeared. All three readers now add CI at the commit as the merge queue reads it (ciAtHead via lib/ci-head-checks.ts) and keep the worse bucket per check. Tests reuse the gstack-evals#303 recording from #4235. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Have the release cut read every check attempt only for commits that pass its named checks (GST-2252) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Say in the changelog that the release cut now counts failed commit statuses (GST-2252) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Let the release cut set its own jobs aside in the every-attempt check read too (GST-2252) After #4297 the cut sets aside check runs from its own workflow and the Windows nightly by job id, but the rows from lib/ci-head-checks.ts skipped that filter, so the cut waited on its own run. headCheckRows now takes the set-aside check run and workflow run ids and removes them from every list before ciAtHead reads it. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --------- Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The daily stable release no longer blocks itself on its own check run, so a commit the release gate passed can reach stable the same day. This serves the stable channel's promise that important fixes reach users within a day.
What changed
gateVerdictincrew/scripts/release-cut.tsnow sets aside the check runs that the stable-release workflow produced itself, whether running or finished. Every other check run is judged exactly as before.How it recognises its own check runs. The lookup runs only when a candidate has a check run that is still going or red. It reads the commit's workflow runs (
GET repos/{repo}/actions/runs?head_sha=<sha>) and keeps the runs whosepathis.github/workflows/weekly-release.yml(CUT_WORKFLOW). For each of those it lists every job, re-run attempts included (GET repos/{repo}/actions/runs/{id}/jobs?filter=all). It then drops only the check runs whoseidis one of those job ids, because an Actions job's id is its check run's id. That was checked live: job 130716281605 is the "Cut the release" check run on 19ed2ac. A job name like "Cut the release" can be reused by any workflow, so the name is never the key.Why not the check suite. The first version of this PR matched on
check_suite.id. Two reviewers pointed out that GitHub files a check run that a workflow creates through the API withGITHUB_TOKENunder some github-actions check suite on that commit, and the creator can't choose which. Themain-backstopcheck runs fromrelease-gate.ymlandevals-main-backstop.ymlare created exactly that way. So a redmain-backstopcould land in the cut's suite, be set aside, and let the cut release past a failed backstop. Matching by job id leaves API-created check runs alone.Fails closed to today's behaviour. If the workflow-runs or jobs read fails, nothing is set aside, so the verdict is what it was before this change. A clean commit makes no extra API call.
Permissions. Both jobs in
weekly-release.ymlgainactions: read(read-only) for the lookup.Lines that change gate behaviour (
crew/scripts/release-cut.tsat the final head): line 79,export const CUT_WORKFLOW = '.github/workflows/weekly-release.yml';, and lines 126-136, theif (runs.some(c => c.status !== 'completed' || RED.has(c.conclusion ?? '')))block that buildsownfrom the jobs of the cut's workflow runs and ends withruns = runs.filter(c => !(typeof c.id === 'number' && own.has(c.id)));. Everything after it (required check, backstop, train and release-record evidence, red and running checks) is unchanged and runs over the remaining check runs. The freeze and the RED release-record hold live inreadTrainNotes, which this doesn't touch.Why
"Stable has been stuck on v1.99.0.0." The daily cut runs on main's newest commit, so its own "Cut the release" job lands a check run on the very commit it might release. While the cut runs, that commit looks unfinished and is skipped. When a cut fails, its red check run keeps the commit out of every later cut. On 2026-11-11 the release gate passed 19ed2ac (v1.99.1.0). The 18:16Z cut (run 43076123863) skipped it because its own job was still going, failed with NO_RELEASE_PR, and left a red "Cut the release" check run on 19ed2ac. With this change, the live
release-cut.ts --dry-run --dailyplans 19ed2ac.Blast radius
This touches only the stable cut's commit selection (
gateVerdict, whose one production caller isplanRelease) and the read-only permissions ofweekly-release.yml. It's safe because the set-aside is limited to check runs whose id matches a job of aweekly-release.ymlrun on that commit. A failed lookup sets nothing aside. That was confirmed by reading release-cut.ts:126-136 and by tests that fail on the old code and pass here.Summary
The cut was deadlocking on itself, because its own running or failed job counted as a not-green check on the commit it was cutting. It now recognises its own jobs through the workflow file and those runs' job ids, and ignores them. The review turned up the check-suite flaw described above, so matching moved from check suites to job ids.
docs/releases.mdnow explains the set-aside, theactions: readit needs and the fail-safe.Test Coverage
All new code paths have test coverage. These tests in
crew/test/release-cut.test.ts(describe "the cut sets aside its own check runs (GST-2463)") fail against the earlier versions ofrelease-cut.ts(main's, and the check-suite version) and pass here:main-backstopfiled under the cut's check suite; a runningfree-tests; no gate evidence; an unreadable workflow-runs API.test/weekly-release-workflow.test.tsexpectsactions: readon both jobs.Tests ran: free 1662 (files, CI run 43082282390 attempt 2)
Pre-Landing Review
Pre-Landing Review: 5 issues — 2 auto-fixed (one defect, found by the Red Team and the native adversarial pass), 0 asked, 0 deferred, 3 noted. The suite-membership defect (
p1/red-team#1=p1/adversarial-native#1) is fixed in 505dbe1. The first item in Review notes below is that same finding, now fixed. One fix-check on the fix range found nothing.REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=3 fixed=2 scope=frozen ledgers_read=4 fix_checks=1 dispatches=3 est_input_tokens=17759
Gate edits: none detected (6 listed, 3 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Outside review: completed, CLEAN (openai/gpt-6.1-sol, a host subagent of another model family).
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
crew/scripts/release-cut.ts:129Check runs are set aside by check-suite membership; GitHub files API-created check runs (main-backstop from release-gate.yml/evals-main-backstop.yml) into an arbitrary github-actions suite on the sha, so one can land in the cut's suite and be hidden. Fix: set aside only check runs whose id is a job id of the cut workflow's own runs.crew/scripts/release-cut.ts:126A failed actions/runs lookup sets nothing aside silently; the verdict's reason doesn't say the lookup failed.crew/scripts/release-cut.ts:125Main's head is judged before late API-published check runs exist; same race as older commits, shorter window. INVESTIGATE.crew/scripts/release-cut.ts:128The PR dry-run job's check runs are set aside too, reachable only if a PR head sha becomes a main commit (main lands by squash).Exploratory QA
Smoke checks:
bun test crew/test/release-cut.test.ts test/weekly-release-workflow.test.ts crew/test/release-cadence.test.tsgave 43 pass, 0 fail at tree f53fbae0. With the source reverted to the check-suite version, the two GST-2463 tests fail (0 pass, 2 fail). Not run here: a live workflow run of the cut (the live dry run cited under Why was run on the first version of this PR).Design Review
No frontend files changed — design review skipped.
Eval Results
No prompt-related files changed — evals skipped.
Plan Completion
Plan completion audit: not run (no plan is bound to this branch and no docs/designs/ file matches). This is a bug fix, exempt from a plan.
Issues
Refs p1/adversarial-native#1
Refs p1/red-team#1
Verification Results
No Step 8.1 obligations (no plan bound); verification is the targeted tests and CI run above.
TODOS
No TODO items completed in this PR.
Documentation
Status: updated. One factual sentence added to docs/releases.md.
Scope: base 19ed2ac to head 505dbe1 on branch stable-cut-ignores-its-own-check-runs (2 commits, 6 files; nothing staged, unstaged or untracked). The change: the stable cut ignores check runs from its own workflow (weekly-release.yml), matched by job id, and the workflow now needs actions: read.
Documentation health:
Coverage debt: none. Diagram drift: none.
Test plan
🤖 Generated with Claude Code
Agent notes
GSTA-36 lane GSTA-517, GST-2463. CI attempt 1 of run 43082282390 had one infrastructure red (quick-bun-default shard 2/8, "shard cleanup or home containment failed: native process identity unavailable", 0 failing tests); failed jobs were rerun once under the flaky rule and attempt 2 is green.
REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=3 fixed=2 scope=frozen ledgers_read=4 fix_checks=1 dispatches=3 est_input_tokens=17759
Gate edits: none detected (6 listed, 3 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Approvals
No approvals recorded for branch stable-cut-ignores-its-own-check-runs.
Plan: exempt: bug fix
Plan check: exempt bug fix
Refs GST-2463