Repository navigation
release: daily stable check: important gated changes reach stable within a day, forced cut at 7 days (GST-1646, R74) - #4083
Merged
Conversation
…nd forces a cut at 7 days (GST-1646, R74) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…so the PR dry run against main stays green between cuts Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
release-cut --daily: a plan that clears the 24 h floor while the daily check cannot date stable is held as FLOOR_UNKNOWN, so a null decision never reaches a cut (red-team p1#1). Review-Finding: p1/red-team#1 reader=red-team Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… CHANGELOG_FRAGMENT_INVALID Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
4 tasks done
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.
What changed
A transient GitHub error during the daily check used to leave a cuttable plan with no decision; it is now held as FLOOR_UNKNOWN (the /ship review's one blocking finding, fixed in fa8ef25).
Before/after as text: A transient GitHub error during the daily check used to leave a cuttable plan with no decision; it is now held as FLOOR_UNKNOWN
The Stable release workflow (
.github/workflows/weekly-release.yml) now runs every day at 14:00 UTC as a daily check (scripts/release-cut.ts --daily). The decision logic lives in a new testable module,scripts/release-cadence.ts. A day's run picks the candidate the way every cut does (the newest green, gated commit) and cuts when one trigger holds:changelog.dfragment withimportant: security|regression|data-loss|blockerScheduled runs keep the 3-hour cron grace on every floor. With no trigger, the run changes nothing, exits 0 with a notice and logs why (
DAILY: no-op: …,DAILY: wait: … NEXT_ALLOWED: …). An important change that has landed but isn't gated yet is logged asIMPORTANT_UNGATEDand never counts toward a cut.lib/changelog-fragments.tsacceptsimportant:besidebump:. Any other value isCHANGELOG_FRAGMENT_INVALID. The daily check reads each fragment at the commit that added it, so the release stamp folding and deleting the file doesn't hide it.gstack-release-stamp openin the same turn it lands a PR whose fragment carriesimportant:. A due trigger with no release PR isNO_RELEASE_PR: important change waiting, no release PR: …and goes red. A week-old stable whose main has nothing newer that is gated isSTABLE_STALE, also red. A dry run of either exits 0 with a warning.ref,security,regression) are unchanged and keep the 72-hour floor. The newdailydispatch input runs the check on demand and refusesref,securityandregression. The pull-request dry run now runs both the plain plan and the daily check.important: regression, then re-enable. docs/ship-policy.md documents the fragment field and the READY phrase "rides the daily cut". docs/captain.md says when to stamp. README, docs/install.md and docs/recommended-harness.md now describe the new cadence.Why
Garry, 2026-11-06 (R74, GST-1646): "make sure we have a daily check for stable so we make sure anything important makes it to stable as frequently as once a day and as infrequently as once a week". Before this change, a security or regression fix that landed on a Tuesday waited for Thursday unless someone ran a labelled hand cut, and a stalled cadence (no release PR, a red gate) could leave stable weeks old with no alarm. Now an important fix reaches stable within about a day, a quiet week still gets a forced cut at 7 days, and a GitHub read failure during the check holds the cut instead of cutting on the wrong day.
Blast radius
The workflow's one schedule changes from
0 14 * * 1,4to0 14 * * *; permissions, concurrency and the main-only cut job are unchanged, and the script still runs no tests and no paid evals. On Monday and Thursday with nothing important the result matches today (a cut past 72 h), and hand-run cuts keep the 72-hour floor. New red outcomes on the schedule areNO_RELEASE_PRfor important and forced triggers,STABLE_STALE, andFLOOR_UNKNOWNwhen the daily check cannot date stable. A fragment carryingimportant:is rejected by gstack installs older than this parser, somin_gstack_versionshould rise in the release that carries it (GSTA-350 owns VERSION). The update channel and setup code (GSTA-352) and the release stamp (GSTA-350) are untouched. Evidence: the --daily CLI test runs the real script against a bare git origin with a gh shim, and the CI free suite ran at the pushed head.Behavior changes
.github/workflows/weekly-release.yml: cron Mon/Thu → daily; the schedule passes--daily; newdailydispatch input; the PR dry run runs twice.lib/changelog-fragments.tsparseFragment:important:front matter accepted; the error text names it.lib/result-codes-release.tsCHANGELOG_FRAGMENT_INVALID: the summary and fix text mentionimportant:.scripts/release-cut.ts:floorStatus/planReleasetakefloorHours(default 72). A VERSION already tagged on an earlier commit of the candidate's line (no release PR since the last cut) is now its own code,NO_RELEASE_PR, instead ofREFUSED. It carries the candidatesha, stays red on a real cut, and is a warning with exit 0 on a dry run, so the PR dry run against main no longer fails between cuts (it did at 0db2d4a:REFUSED: tag v1.96.0.0 already names 6666b7296766). A tag on an unrelated commit staysREFUSED. Also newplanDailyand--daily/--fragments-dirflags.FLOOR_HOURSandSCHEDULED_GRACE_HOURSnow live inscripts/release-cadence.tsand are re-exported.scripts/release-cut.tsplanDaily(review fix): a plan that clears the 24 h floor while the daily check's own read of stable's move fails is returned asFLOOR_UNKNOWNwith a null decision, so--dailyexits 1 instead of cutting.Approvals
APPROVALS_RENDER: redacted (repository visibility public); gstack-approvals list shows the full record
No approvals recorded for branch capy/gst-1646-daily-stable-check.
Recorded in the plan run instead of the approvals store:
autoplan-20261106154224: gate answeredrec except d1b(accepted review d1, red alarms; d2, rollback hold). APPROVED gate_rev=1, artifact valid.Tests
test/release-cadence.test.ts(new): the decision table (important + 24 h cuts; important under 24 h waits; nothing important under 7 days is a no-op; 7 days + gated cuts; ungated is a no-op; Monday floors; grace; no release PR; STABLE_STALE),importantChangesread from history after the stamp deleted the fragments,planDailyagainst a real git origin, and the--dailyCLI exit codes.test/changelog-fragments.test.ts:important:parse cases.test/weekly-release-workflow.test.ts: the daily schedule and wiring.Summary
Important fixes now reach stable within a day and stable is never more than a week stale. The Stable release workflow runs a daily check that cuts on an
important:changelog fragment after 24 h, forces a cut at 7 days, and keeps Monday and Thursday as the regular 72-hour cuts. The /ship review found that a GitHub read failure inside the daily check could cut stable on a non-trigger day; that path now fails closed asFLOOR_UNKNOWN. The docs audit added theimportant:field to changelog.d/README.md and theCHANGELOG_FRAGMENT_INVALIDtroubleshooting entry.Test Coverage
All new code paths have test coverage (Step 7 audit, audit-only: 12 of 12 paths, 100% value-weighted, 0 gaps).
Tests: 1739 → 1739 (+0 new files; the review fix adds one case to test/release-cadence.test.ts)
Coverage: 100% value-weighted (100% including 0 weakly covered paths)
Test value: 0 tests written, 1 rejected by the authoring gate, 0 existing tests extended, 0 paths weakly covered.
CHANGELOG_FRAGMENT_INVALIDsummary and fix text (prose only; fragment validation is covered by test/changelog-fragments.test.ts).--timeout=30000.Pre-Landing Review
Pre-Landing Review: 7 issues — 1 auto-fixed, 0 asked (0 fixed, 0 skipped), 0 deferred, 6 noted
REVIEW_LOOP: passes=2 blocking_found=1 deferred=0 noted=4 fixed=1 scope=frozen ledgers_read=3 dispatches=4
Gate edits: none detected (14 listed, 7 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
(The 7 read hunks are the workflow's cron, header and summary step, the release-cut CLI's refusal and annotation block (RH-12, the pre-existing
GITHUB_ACTIONScheck moved intoannotate), and the workflow test's cron and dry-run expectations, each changed with the cadence the diff introduces; the one relaxation,NO_RELEASE_PRas a dry-run warning, is the product decision in 7b5aa9f and real cuts stay red.)Outside review: openai/gpt-6.1-sol (host subagent) on the pass 2 range: no findings, recommendation approve.
scripts/release-cut.tsplanDaily returned a cleared plan with a null decision when its owngh release viewfailed after planRelease succeeded, and the--dailyentry point then cut on any day once stable was 24 h old. Fixed in fa8ef25 with a regression test.Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
scripts/release-cut.ts:496NO_RELEASE_PR checks the existing tag's ancestry against the candidate, not stable, so a half-done cut (tag pushed, stable push failed) is misreported as no release PRscripts/release-cut.ts:627the FLOOR_UNKNOWN hold also catches a finishing cut (stable already at the candidate) when the daily check's release view fails transiently; before the fix that cut finishedscripts/release-cut.ts:627the held result keeps the plan whose floor line says clear, so the CLI prints FLOOR_UNKNOWN next to FLOOR: clearscripts/release-cut.ts:627a finishing cut whose stable tag is lightweight is now red on every daily run; only a hand-run cut without --daily recovers it and NEXT_ALLOWED does not say soscripts/release-cut.ts:627FLOOR_UNKNOWN is not in the CLI's hold set, so a GitHub API blip during the planDaily read turns the --daily dry run red where the race used to exit 0; the same as planRelease's own FLOOR_UNKNOWN todayscripts/release-cut.ts:627(adversarial p2#3) FLOOR_UNKNOWN is not in the CLI's hold set, so a GitHub API blip during the daily check turns the--dailydry run red, as planRelease's own FLOOR_UNKNOWN already does.scripts/release-cut.ts:496(targeted re-read at 9908ba6) NO_RELEASE_PR decides from ancestry alone and never checks that the tagged commit's VERSION matches, so a tag on an older commit with a different VERSION, formerly REFUSED, is now NO_RELEASE_PR and a silent no-op under--dailyon non-trigger days; the clash test near test/release-cut.test.ts:568 still passes because it checks only the message substring.Exploratory QA
Functional surface, smoke budget: one capture (001,
bun ~/.capy/work/rt-repro.tsagainst an owned scratch git origin with a faked gh). Contract: on a non-trigger day 30 h after stable moved, the control run decidesnoop; when only the daily check's own release view returns HTTP 502, the plan is refusedFLOOR_UNKNOWNwith a null decision. Result: pass on current inputs. Limit: the CLI exit code for the held plan is covered by code reading and the existing--dailyCLI test, not by a probe.Design Review
No frontend files changed — design review skipped.
Eval Results
No prompt-related files changed — evals skipped.
Scope Drift
Scope Check: CLEAN
Intent: a daily stable check that cuts important changes within a day and forces a cut at 7 days (R74).
Delivered: the daily check, the
important:fragment field, release docs, and one fail-closed review fix.Plan Completion
Plan completion audit: not run (no plan is bound to this branch and no docs/designs/ file matches). The lean autoplan run lives outside the repository.
Verification Results
No plan-specific verification items (no plan bound to the branch). Automatic diff-scoped QA: 1 PASS, 0 FAIL, 0 BLOCKED, 0 NOT RUN.
TODOS
No TODO items completed in this PR.
Documentation
Status: updated. Two factual edits, no blockers.
Scope: committed diff 603d6bb..fa8ef25 (15 files; no staged, unstaged or new files): the daily stable check (scripts/release-cadence.ts, release-cut.ts --daily, the weekly-release.yml daily cron and input) and the
important:fragment front matter.Documentation health:
important:front matter)important:field)Coverage debt:
--dailyand--fragments-dir(release-cut.ts) and thedailyworkflow input have reference and how-to coverage in docs/releases.md.NO_RELEASE_PR,STABLE_STALEandIMPORTANT_UNGATEDare documented in the releases.md Outcomes table only and have no docs/troubleshooting.md entry, because they are not registered result codes (common gap). No architecture diagram drift was found.Test plan
bun run test(free suite, carried from CI): free-tests.yml run 42256019852/1 green at 9908ba6 (tree 902a006ebe50), 1614 test files, 35995 tests; LANE: test carried, EVIDENCE: FRESHbun test --timeout=30000): test/release-cadence.test.ts, release-cut.test.ts, changelog-fragments.test.ts, weekly-release-workflow.test.ts: 56 pass, 0 fail