Repository navigation
v1.95.0.0 feat(release-gate): gate main every 8 hours and feed the stable release (inert until adopted) - #3917
Merged
Merged
Conversation
…se (inert until adopted) 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>
…ation Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
… neutral check for an unfinished gate) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…tself; an open gate on stable or older than three cadences) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…gin; held or failed leaves the gate job green) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…exclude_paths and release_gate) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # lib/ship-policy.ts
…InsideRoot to lib/path-containment.ts to keep ship-policy.ts under 800 lines Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…het) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… bisect prefix cost so the cap holds across rounds Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…udit) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…e old literal 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>
4 tasks done
…0; harness-version entry for test-pr-profile.ts regenerated for both workflows) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…conversion off, as on the Linux runners (windows-scoped-shard) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… in the policy key table (Step 14.5 audit) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…on PR (named documentation risk, GSTA-258) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Resolve lib/ship-policy.ts against #3892: keep both POLICY_KEY_INTRODUCED entries (release_gate and stamp_placeholders); main's stamped STAMP_PLACEHOLDERS_KEY_VERSION is kept as is. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Resolve scripts/harness-version.json against #3903: take main's manifest and carry this branch's test-pr-profile.ts pin into scripts/harness-pins/scripts/test-pr-profile.ts.json. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Resolve lib/ship-policy.ts against #3920: keep main's stamped REVIEW_POLICY_KEY_VERSION and its review entry, and append release_gate to the same POLICY_KEY_INTRODUCED line. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
3 tasks done
Union lib/ship-policy.ts (merge + release_gate) and lib/ship-queue-train-record.ts (LandNote + ReleaseRecord). Take main's VERSION, package.json, CHANGELOG.md and agents-digest as they are and keep this PR's entry in changelog.d/gsta258-l1-release-gate.md, dropping the train-107 stamp. RELEASE_GATE_KEY_VERSION moves to the tentative 1.96.0.0 because main's 1.95.0.0 is #3973's release. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
3 of 4 tasks
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.
Lane L1 of GSTA-258 (GST-1133).
What changed
release-cut on main 6f1dfd5: before, it refuses because the backstop check is neutral; after, the release gate's green record counts as the gate.
Before/after as text: release-cut on main 6f1dfd5: before, it refuses because the backstop check is neutral; after, the release gate's green record counts as the gate
.github/workflows/release-gate.ymlrunsbin/gstack-release-gateevery 8 hours. When main has moved since the last gate, it runs the full paid gate on main's head once, writes areleasenote torefs/notes/gstack-trains, and publishes themain-backstopcheck run on that commit. A red gate bisects its red cases withinbisect_spend_cap_usd. Nothing runs until main's.gstack/ship-policy.jsondeclares arelease_gateblock. The key version is v1.95.0.0, tentative, and the slot stamp moves it throughstamp_paths.scripts/release-cut.ts. The 72-hour floor and its security and regression exceptions are unchanged. Release-cut now also accepts a GREEN release record as proof that a commit was gated. A RED record with no GREEN record on a later commit refuses every cut, and that refusal is the freeze.test/release-cut.test.tsproves both.evals-main-backstop.ymlkeeps its per-push trigger. While arelease_gateblock exists, its policy step reportstrain=false, so a push starts no gate, sets no freeze and publishes no check run, and main is never gated twice. The gate has its own workflow, so the backstop's push-only contract and per-push concurrency group stay untouched while trains still run (until L2).capy/skill/gstack/scripts/install.sh(wrapper revision 4) uses stable or main with the same override and fallback asgstack-upgrade../setupis untouched.Why
GSTA-258 asked for "a release gate on main every 8h + stable ref" (option A): one full gate on main every 8 hours replaces a gate on every push, and the stable release reads its verdict. Option C, shortening the 72-hour floor, isn't ours to raise, so the floor stays as it is.
Blast radius
The change touches three workflows (release-gate.yml is new; evals.yml and evals-main-backstop.yml gain one policy branch each), release-cut and the Capy installer. All of it stays off until a
release_gateblock is adopted in a later PR, because every new branch reads that block at the base revision first;test/release-gate-workflow.test.tsruns those policy steps on scratch repositories (script ran), and the free suite passed at this tree (Free Tests run 41612197176; CI carry 41612200230, 34710 tests).Approvals
Source: gstack-approvals record for gsta258-l1-release-gate (display only; not an approval citation).
Summary
Main got a full paid gate on every push, and nothing tied the stable release to a gate's verdict except the backstop's check run. This PR adds the gate as its own 8-hour workflow, records each verdict as a note release-cut can read, and keeps release-cut as the only writer of
stable. Review found that the bisect could spend past its cap when a prefix reported no cost; each such prefix is now charged at the trial reservation, so the bisect endscappedwithin its cap. A base merge of main (v1.94.0.0) kept both new policy keys, movedassertInsideRoottolib/path-containment.tsto keeplib/ship-policy.tsunder 800 lines, and re-pinned the key version above main. A second, granted merge of main (v1.94.10.0) regenerated the harness-version entry forscripts/test-pr-profile.tsso it names both new free-only workflows, and the new Windows-by-path check showed that Git Bash rewritesorigin/main:.gstack/…arguments, so the workflow test now runs its policy steps with that conversion off.Adoption (two steps)
release_gateblock to.gstack/ship-policy.jsonand raisesmin_gstack_versionto that version.Security call-out (R45)
release-gate.ymlis new. Its gate job holdscontents: write(to push the release note and the bisect'srelease-gate/<id>refs) andactions: write(to dispatchevals.ymland read its artifacts). The check run comes from a separate job that holdschecks: write, checks out no code and runs only a validated action word, sha and check name.evals.ymlgains a git-and-jq policy step and routesrelease-gate/bisect refs only under arelease_gateblock at the base revision. The backstop gains one stand-down branch.install.shgains channel resolution. It reads onlyGSTACK_UPDATE_CHANNELand the existingbin/gstack-update-channel.sh, fetches only the existing origin, and uses no new secrets.ghandgitwithGH_TOKEN(the workflow'sgithub.token) and nothing else.Test Coverage
New code paths have tests:
test/release-gate.test.ts(run, bisect, status and the null-cost bisect cap; 13 tests, all green),test/release-gate-workflow.test.ts,test/release-cut.test.ts,test/train-gate.test.tsandtest/capy-skill-wrapper.test.ts. The bisect-cap test ('null prefix costs are charged at the reservation, and the bisect ends capped within its cap') fails on the code before 82f91f8 and passes after it.Tests ran: free 34710 (CI carry run 41612200230 at tree d8d291a; Free Tests 41612197176, windows-smoke 41612201954)
Pre-Landing Review
Two specialist passes and Step 11's voices fixed 7 blocking findings. The first granted fix-check found one CRITICAL money finding (the bisect cap was never enforced), fixed in 82f91f8; the second granted fix-check on that hunk found one INFORMATIONAL item, listed below. A scoped review of the merged test-only edit in
test/pregate-selection.test.tsread clean (anthropic/claude-opus-5-5). After the second main merge, a third granted scoped check covered the harness-version merge resolution and the Windows fixture fix and found nothing. The targeted reader (money, gate) read the final head 598467d and found two INFORMATIONAL items, listed in the review notes below.REVIEW_LOOP: passes=2 blocking_found=2 deferred=0 noted=8 fixed=4 scope=frozen fix_checks=5 dispatches=8
Review-loop exception: accepted by GStack Minder 2026-11-03 via GSTA-36 relay: rule 19 grant at 1cf7835 for one merge with union resolution and de-stamp, plus the approved RELEASE_GATE_KEY_VERSION v1.96.0.0 line: rule 19 merge of main 1cf7835: one scoped reader on the resolution only (merge + release_gate union in lib/ship-policy.ts, LandNote + ReleaseRecord union in lib/ship-queue-train-record.ts, the changelog.d fragment, and RELEASE_GATE_KEY_VERSION moved to the tentative v1.96.0.0 because main's v1.95.0.0 is #3973's release) (fix-check at 88996e1, 0 findings)
Two later rule 19 main merges carried the receipt: 2f9d11a (resolved
lib/ship-policy.tsagainst #3892; one scoped review of those hunks read clean) and 1ccab0d (moved this PR'sscripts/test-pr-profile.tsharness pin intoscripts/harness-pins/after #3903; the scoped check above confirmed the record is the one reviewed at 0fc4c07). The targeted money and gate reader reran at c0d33a2 and found nothing. A third merge, bf2cab3, appendedrelease_gateto thePOLICY_KEY_INTRODUCEDline that #3920 had changed (a mechanical union beside main's stampedREVIEW_POLICY_KEY_VERSION); the targeted reader reran at e9277ef and raised 2 INFORMATIONAL findings, both listed in Review notes.Rule 25 trial merge with #39261b31842 (L4's bf2cab3 merge; shared file docs/ship-policy.md): no conflicts,
bun run typecheck0 errors, and 228 tests pass across the 15 test files that read docs/ship-policy.md.A fourth main merge, 1cf7835 (rule 19), unions
mergefrom #3973 withrelease_gatein lib/ship-policy.ts andLandNotewithReleaseRecordin lib/ship-queue-train-record.ts, takes main's VERSION, package.json, CHANGELOG.md and agents digest as they are, and keeps this PR's entry in changelog.d/gsta258-l1-release-gate.md so it can land withland --pin.RELEASE_GATE_KEY_VERSIONmoves to the tentative v1.96.0.0 because main's v1.95.0.0 is #3973's release; the release stamp moves it through stamp_paths. One scoped reader on those hunks read clean, and the targeted money and gate reader at 88996e1 raised only the known sha-lessfailednote.Review notes
Below the blocking floor; recorded here and not fixed in this PR.
failedresult (a refused policy, unreadable notes, an unresolved branch): the job ends green and no check is published. The backstop stands down for anyrelease_gateobject without validating it, so an invalid block (cadence_hours=6, a stray key) makes the gate returnaction=failedwith no sha: both workflows stay green and no paid gate runs. release-cut still refuses commits with no evidence, so this weakens monitoring and opens no release. The fix is to stand down only for a block that validates, or to fail the gate job when it has no sha.Math.maxin bisectRecord), so loweringbisect_spend_cap_usd, even to 0, does not stop it, and a one-offbisect --spend-cap Nstays in the record (targeted reader at 598467d, money, below the floor).classifyRunrecords GREEN when a run concluded success but its report-verdict artifact is missing or failed to download, and release-cut counts that as evidence. The old backstop also trusted run success, so this is not a regression (targeted reader at e9277ef, below the floor).release_gaterow in docs/ship-policy.md's Schema v1 key table is deferred to the adoption PR (named documentation risk below); its text is kept from audit d107fc4.Live proof
gstack-release-gate run --policy <file> --ignore-cadenceon main 6f1dfd5 (the policy passed on the command line, nothing adopted) dispatched evals run 41568848358 and recordedRELEASE: green sha=6f1dfd5b7cd0… run=41568848358 cost=37.80. A fresh state root then readLAST_GATE: GREEN … run=41568848358back from origin's notes, a dry run skipped on cadence, andscripts/release-cut.ts --ref 6f1dfd5… --dry-runprintedCANDIDATE: 6f1dfd5… gated by release gate run 41568848358. That dry run also reportedFLOOR_UNKNOWN: stable 2512dd7 has no annotated v1.92.55.0 tag. That state was already on main and this PR doesn't change it.Exploratory QA
The live proof above is the end-to-end check: one real gate run, its note read back from origin, and a release-cut dry run that accepted it.
Design Review
No frontend files changed, so design review was skipped.
Eval Results
One paid gate ran as the live proof (run 41568848358, green, $37.80). No other evals ran.
Review bot comments
No review bot comments.
TODOS
No TODO items completed in this PR.
Documentation
Documentation: blocked. Scope: docs/ and README.md against the 25 files in f6d6215..0fc4c07. The audit updated docs/releases.md (the release gate's evidence and hold); its docs/ship-policy.md key-table row is deferred.
Documentation exception: accepted by GSTA-258 2026-11-03 via GSTA-258 relay (option B on #3917): docs/ship-policy.md release_gate key row deferred to the L1 adoption PR, which turns the key on and is reviewed as money code; row text kept from audit d107fc4
Test plan