Skip to content

release: daily stable check: important gated changes reach stable within a day, forced cut at 7 days (GST-1646, R74) - #4083

Merged
capy-ai[bot] merged 4 commits into
mainfrom
capy/gst-1646-daily-stable-check
Nov 6, 2026
Merged

capy-ai[bot] merged 4 commits into
mainfrom
capy/gst-1646-daily-stable-check

Conversation

@garrytan

@garrytan garrytan commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 4083,
  "head": "9908ba6d9f493a705225033611144b9d32f2f0c1",
  "version": "1.96.0.0",
  "base": "main",
  "gate": {
    "test": {
      "pass": 1614,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "test",
      "run": 42256019852,
      "attempt": 1,
      "tree": "902a006ebe5030539a0cfe74720b610cee3dc7ed"
    }
  ],
  "session_kind": "unattended",
  "head_tree": "902a006ebe5030539a0cfe74720b610cee3dc7ed",
  "product_patch_id": "9252ca217e2d9344de65b26d19c9815627bc0937",
  "gstack_version": "1.96.0.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 302,
    "rules": "70895942bb8a8ee2",
    "base": "8d7091ac1a879d9e3e724391bde2446c29de842d",
    "registry": "8d7091ac1a879d9e3e724391bde2446c29de842d",
    "gate_scan": {
      "tagged": 1,
      "head": "9908ba6d9f493a705225033611144b9d32f2f0c1"
    },
    "reasons": [
      "gate-class",
      "runtime=302"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @902a006ebe50 (7 checks, current for 9908ba6d9f49)",
  "requires_remote": [
    "free-tests.yml/cso-macos-launcher: https://github.com/garrytan/gstack/actions/runs/42256019852/attempts/1",
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/42256019852/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/42255016985/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=902a006ebe50 tests=35995 skipped=96 runs=42256019852/1 profiles=ci-reuse/free-tests heads=9908ba6d9f49 verified=2026-11-06T16:59:15.809Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "updated",
    "scope": "docs/, README.md, AGENTS.md, CLAUDE.md, CONTRIBUTING.md and changelog.d/README.md against 603d6bb..fa8ef2546"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 1,
    "deferred": 0,
    "noted": 4,
    "fixed": 1,
    "scope": "frozen",
    "rounds": 2,
    "ledgers_read": 4,
    "dispatches": {
      "specialist": 2,
      "red-team": 2
    }
  },
  "review_targeted": {
    "classes": [
      "gate"
    ],
    "rules": "30e6bce187be0d59",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "9252ca217e2d9344de65b26d19c9815627bc0937",
    "status": "done",
    "findings": 1,
    "raised_by": "targeted"
  }
}

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

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
--- Before · before.txt · captured output
+++ After · after.txt · captured output
 planDaily, Saturday, stable moved 30 h ago, nothing important; only the daily check's own gh release view returns HTTP 502
+planned.ok = false  code = FLOOR_UNKNOWN
-planned.ok = true  code = None
 decision   = None
+=> release-cut --daily exits 1 with FLOOR_UNKNOWN: nothing is cut
-floor      = FLOOR: clear (stable moved to v1.0.0 at 2026-11-06T16:43:55Z, 30.0 h ago; a scheduled run needs 21 h (24 h less 3 h cron grace))
-=> release-cut --daily falls through to cutRelease: stable is cut on a non-trigger day
 

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:

Trigger When Floor since stable last moved
important a commit in stable..candidate added a changelog.d fragment with important: security|regression|data-loss|blocker 24 h
forced stable is 7 days old and the candidate is newer than stable 168 h
regular Monday or Thursday (UTC) 72 h, unchanged

Scheduled 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 as IMPORTANT_UNGATED and never counts toward a cut.

  • Marker. lib/changelog-fragments.ts accepts important: beside bump:. Any other value is CHANGELOG_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.
  • Release PR. The cut still tags the VERSION it finds. The daily run never stamps or opens a PR. The Captain runs gstack-release-stamp open in the same turn it lands a PR whose fragment carries important:. A due trigger with no release PR is NO_RELEASE_PR: important change waiting, no release PR: … and goes red. A week-old stable whose main has nothing newer that is gated is STABLE_STALE, also red. A dry run of either exits 0 with a warning.
  • Hand runs. Hand-run cuts (ref, security, regression) are unchanged and keep the 72-hour floor. The new daily dispatch input runs the check on demand and refuses ref, security and regression. The pull-request dry run now runs both the plain plan and the daily check.
  • Docs. docs/releases.md gains a "The daily check" section (triggers, the marker table, the release-PR step, estimated latency, an exit-code table) and "Rolling stable back", which gives exact commands: disable the workflow first, move stable back with a leased push, mark the release withdrawn, fix forward with 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,4 to 0 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 are NO_RELEASE_PR for important and forced triggers, STABLE_STALE, and FLOOR_UNKNOWN when the daily check cannot date stable. A fragment carrying important: is rejected by gstack installs older than this parser, so min_gstack_version should 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; new daily dispatch input; the PR dry run runs twice.
  • lib/changelog-fragments.ts parseFragment: important: front matter accepted; the error text names it.
  • lib/result-codes-release.ts CHANGELOG_FRAGMENT_INVALID: the summary and fix text mention important:.
  • scripts/release-cut.ts: floorStatus/planRelease take floorHours (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 of REFUSED. It carries the candidate sha, 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 stays REFUSED. Also new planDaily and --daily/--fragments-dir flags. FLOOR_HOURS and SCHEDULED_GRACE_HOURS now live in scripts/release-cadence.ts and are re-exported.
  • scripts/release-cut.ts planDaily (review fix): a plan that clears the 24 h floor while the daily check's own read of stable's move fails is returned as FLOOR_UNKNOWN with a null decision, so --daily exits 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:

  • Garry, R74 (2026-11-06, via FOUN-32, quoted in GST-1646): the daily check.
  • GStack Minder (GSTA-36), crew brief: "run a sized /autoplan for your own design, then build. No plan approval needed." Lean autoplan run autoplan-20261106154224: gate answered rec 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), importantChanges read from history after the stamp deleted the fragments, planDaily against a real git origin, and the --daily CLI exit codes.
  • test/changelog-fragments.test.ts: important: parse cases. test/weekly-release-workflow.test.ts: the daily schedule and wiring.
  • actionlint 1.7.12 clean on the workflow.

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 as FLOOR_UNKNOWN. The docs audit added the important: field to changelog.d/README.md and the CHANGELOG_FRAGMENT_INVALID troubleshooting 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.

  • Rejected: lib/result-codes-release.ts CHANGELOG_FRAGMENT_INVALID summary and fix text (prose only; fragment validation is covered by test/changelog-fragments.test.ts).
  • Regression proof for the review fix: the new planDaily case fails with the fix reverted (planned.ok true) and passes with it; test/release-cadence.test.ts, release-cut.test.ts, changelog-fragments.test.ts and weekly-release-workflow.test.ts ran 56 pass, 0 fail locally with --timeout=30000.
  • Tests ran: test carried from CI (see the receipt and Test plan)

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_ACTIONS check moved into annotate), and the workflow test's cron and dry-run expectations, each changed with the cadence the diff introduces; the one relaxation, NO_RELEASE_PR as 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.

  • Fixed (CRITICAL, red-team p1#1): scripts/release-cut.ts planDaily returned a cleared plan with a null decision when its own gh release view failed after planRelease succeeded, and the --daily entry point then cut on any day once stable was 24 h old. Fixed in fa8ef25 with a regression test.
  • Reviewers: pass 1 specialists (testing, security, state-machines) and red team over the whole diff; pass 2 specialists, red team, native adversarial and outside voice over the fix range, and the targeted gate reader over the whole diff at fa8ef25 and again at 9908ba6 after the docs commit.

Review notes

Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.

  • INFORMATIONAL scripts/release-cut.ts:496 NO_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 PR
  • INFORMATIONAL scripts/release-cut.ts:627 the 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 finished
  • INFORMATIONAL scripts/release-cut.ts:627 the held result keeps the plan whose floor line says clear, so the CLI prints FLOOR_UNKNOWN next to FLOOR: clear
  • INFORMATIONAL scripts/release-cut.ts:627 a 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 so
  • INFORMATIONAL scripts/release-cut.ts:627 FLOOR_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 today
  • INFORMATIONAL scripts/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 --daily dry run red, as planRelease's own FLOOR_UNKNOWN already does.
  • INFORMATIONAL 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 --daily on 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.ts against an owned scratch git origin with a faked gh). Contract: on a non-trigger day 30 h after stable moved, the control run decides noop; when only the daily check's own release view returns HTTP 502, the plan is refused FLOOR_UNKNOWN with 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 --daily CLI 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:

  • README.md: Current (the branch already updated the stable cadence line)
  • docs/releases.md: Current (new section The daily check, Outcomes rows)
  • docs/install.md, docs/captain.md, docs/recommended-harness.md, docs/ship-policy.md: Current
  • docs/troubleshooting.md: Updated (CHANGELOG_FRAGMENT_INVALID now names important: front matter)
  • changelog.d/README.md: Updated (documents the important: field)
  • docs/CHANGELOG_STYLE.md, CLAUDE.md: Current

Coverage debt: --daily and --fragments-dir (release-cut.ts) and the daily workflow input have reference and how-to coverage in docs/releases.md. NO_RELEASE_PR, STABLE_STALE and IMPORTANT_UNGATED are 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: FRESH
  • Remote pregate: macOS jobs cleared from run 42256019852 and windows-smoke from run 42255016985 at the same tree; PREGATE: requires-remote cleared (final tree)
  • Targeted locally (bun 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
  • Guards: typecheck, module-size, conflict-markers passed at push

Open in Capy

…nd forces a cut at 7 days (GST-1646, R74)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 3 commits November 6, 2026 16:06
…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>
@capy-ai
capy-ai Bot merged commit cb8f9ea into main Nov 6, 2026
70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant