Repository navigation
v1.94.27.0 feat(pregate): housekeeping guards before every push (GST-1138) - #3923
Merged
Merged
Conversation
…s them, gstack's guard list) (GST-1138) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ssing base; classify pregate-guards.json; cover finish-record reuse Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ch; a refused run or unreachable origin stops Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ranch; HEAD must not move during the run; a dirty-tree stop names failing guards Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This was referenced Nov 3, 2026
capy-ai Bot
added a commit
that referenced
this pull request
Nov 3, 2026
…e carry of runner-skipped files, path-skipped jobs (GST-1186, GST-1189, GST-1190) (#3929) * feat(pregate): a guard that already passed at this tree carries from CI or the ledger (GST-1186) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * feat(ci-carry): jobs-mapped lanes, aliases, narrow-lane counts, --simulate proof, policy-base check on carried (GST-1189, GST-1190) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(ci-carry): a file whose every test skipped on CI is not carried; tree.json records skipped_files (GST-1190) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * feat(ci-carry): path-skipped jobs count only under an unchanged gate; find --policy-from head --simulate (GST-1190) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ship: name the pre-push guards in Step 17 and the early push (moved from #3923 per GSTA-258) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ci-carry: per-file lane carry for runner-skipped files; review fixes (gate inputs, passed ignores CI rows, simulate consent, pull_request-only skips, guard not-owed) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ship: Step 17 names the pre-push guards without a code this branch cannot print Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * pregate: gstack's bun run test lane runs its runner-skipped files with per_file Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ci-carry: a per_file remainder must run tests here and the carried runs must still stand (l6c-p2) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ci-carry: read record-ci from its own last record line; the remainder's count must come from this run's row (l6c-p2 red-team) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(ci-tree-reuse): type the skipped_files fixture for the test typecheck ratchet Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Revert "pregate: gstack's bun run test lane runs its runner-skipped files with per_file" This reverts commit fafbae5. * ci-carry: ship the skipped_files reader inert; gstack's writer and per_file move to the adoption PR; Step 17 keeps its refs/heads marker Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs: guard carry, per_file and the too-old message in pregate and troubleshooting (docs audit l6cdocs2) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * gstack-evidence record-ci: recheck the working tree after the post-remainder run recheck (#3929 second fix-check) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * windows-curation: exclude test/ship-ci-carry.test.ts like its ship-bin-fixture siblings (the path-scoped Windows check runs it at its first spawn) 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>
…l6-prepush-guards Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # docs/pregate.md
3 tasks done
capy-ai Bot
added a commit
that referenced
this pull request
Nov 3, 2026
…ry warning and record-ci recheck order (GSTA-258 L6 follow-up) (#3934) * feat(pregate): a guard that already passed at this tree carries from CI or the ledger (GST-1186) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * feat(ci-carry): jobs-mapped lanes, aliases, narrow-lane counts, --simulate proof, policy-base check on carried (GST-1189, GST-1190) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(ci-carry): a file whose every test skipped on CI is not carried; tree.json records skipped_files (GST-1190) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * feat(ci-carry): path-skipped jobs count only under an unchanged gate; find --policy-from head --simulate (GST-1190) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ship: name the pre-push guards in Step 17 and the early push (moved from #3923 per GSTA-258) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ci-carry: per-file lane carry for runner-skipped files; review fixes (gate inputs, passed ignores CI rows, simulate consent, pull_request-only skips, guard not-owed) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ship: Step 17 names the pre-push guards without a code this branch cannot print Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * pregate: gstack's bun run test lane runs its runner-skipped files with per_file Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ci-carry: a per_file remainder must run tests here and the carried runs must still stand (l6c-p2) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ci-carry: read record-ci from its own last record line; the remainder's count must come from this run's row (l6c-p2 red-team) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(ci-tree-reuse): type the skipped_files fixture for the test typecheck ratchet Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Revert "pregate: gstack's bun run test lane runs its runner-skipped files with per_file" This reverts commit fafbae5. * ci-carry: ship the skipped_files reader inert; gstack's writer and per_file move to the adoption PR; Step 17 keeps its refs/heads marker Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs: guard carry, per_file and the too-old message in pregate and troubleshooting (docs audit l6cdocs2) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * gstack-evidence record-ci: recheck the working tree after the post-remainder run recheck (#3929 second fix-check) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * gstack-evidence: sum bun --shard processes in a lane's tests_ran; docs: dispatch-carry warning and record-ci recheck order (GBEV-3, GSTA-258 L6 follow-up) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * gstack-evidence: keep shard and count lines that leave the output tail; sum only shards 1..N in order; soften the dispatch-carry mechanism claim (l6f-p1 fixes) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ci-carry: a pull_request run whose base moved names the one-command dispatch fix (TRUT-7) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs: the tree_mismatch refusal names its fix command (l6fdocs3) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ci-carry: a pull_request run that recorded its merge tree names the base-moved fix (the real tree_mismatch path; #3934 fix-check) 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.
Why
Housekeeping checks used to fail only after a push, in CI. gbrain had 64 of 93 red heads from checks like typecheck, the size guards and generated-file freshness, and #3908 went red on the context-budget ratchet. Running those checks before every push turns a lost CI round into a local stop with a fix line.
Summary
gstack-pregate --stage guards --allow-repo-commandsruns only generated-file freshness (regen) and the repo'sguards, each only for the files the branch touched, and writes.gstack/tmp/pregate-guards.jsonso it never replaces the full run's record.gstack-ship-release pushruns it before every push, early or final, printsGUARDS:, and stops with the failing guard's fix while pushing nothing. A pass already recorded at HEAD's exact tree is reused..gstack/pregate.json: typecheck, the skill size guards, the parity suite, the context-budget ratchet, the module-size ratchet, the /ship goldens and the CLAUDE.md size cap.GST-1138 (ship-90-90 plan, lane L6 of GSTA-258). The brief named a
prepush_guardskey in ship-policy.json; this uses the existing pregate.jsonguardskey, which every gstack at or above this repo's version floor already reads, so the floor does not move.Blast radius
Every
gstack-ship-release pushin a repo that declares guards now runs them first. Security note: push now makes agit ls-remotecall to origin and runs the repo's own guard commands before pushing; both already happen elsewhere in /ship (Step 17 and the pregate), and nothing new reads secrets or widens permissions.Test Coverage
test/pregate-guards.test.ts:--stage guardsruns onlyregenandguards, writes its own record and refuses--onlyand--from-run; gstack's guard list validates and fires only on its own inputs.test/ship-release.test.ts: a failing guard stops the push and pushes nothing; a same-tree pass is reused and a new commit reruns the guards; the skip and HEAD-moved rules. On main, all five new tests fail.Pre-Landing Review
REVIEW_LOOP: passes=2 blocking_found=2 deferred=0 noted=1 fixed=5 scope=frozen unrecorded=1 ledgers_read=3 fix_checks=2 dispatches=5
Full depth (gate class). Pass 1 found one CRITICAL (push guards could certify a tree other than HEAD's), fixed in e9b98e2. Pass 2 found one CRITICAL (a missing base skipped the guards), fixed in f44e61c and c85d3e6. One scoped fix-check (grant a-fffcf58cab70) left one informational note: no test yet asserts the fix-check's INFORMATIONAL path at test/ship-release.test.ts:393.
Base merge (rule 19, GStack Minder's grant at 2f9d11a). 5660d09 merges main, which now carries #3929. The only conflict was docs/pregate.md, where this PR's
#prepushsection and #3929's#guard-carrysection were inserted at the same spot; both are kept,#prepushfirst. This PR's own lines are byte-identical to c85d3e6, and only the neighboring context moved. One scoped reader read the seam at 5660d09 and found nothing.Review-loop exception: accepted by GStack Minder 2026-11-03 via GSTA-258 (GSTA-36 choice A, #3923 base merge): one scoped reader on the docs/pregate.md seam at 5660d09, #3923's second exception, no further rounds (fix-check at 5660d09, 0 findings)
Issues
GST-1138 (Capy issue).
Documentation
Scope: docs/pregate.md (#prepush section and the finish/push/accept paragraph), checked against lib/ship-release.ts push() and lib/pregate/index.ts; then the docs inputs the 2f9d11a base merge changed (bin/gstack-pregate, docs/pregate.md, lib/pregate/index.ts, lib/ship-release.ts).
Result: blocked. Audit l6docs1 corrected docs/pregate.md. Audit l6docs2 found /ship Step 17 and the early-push text (ship/SKILL.md.tmpl, ship/sections/tests.md.tmpl) still describe the old push order. That fix moved to #3929 so this PR ships at its reviewed head. The later base merge changed docs inputs with no audit left in the budget.
Documentation exception: accepted by GSTA-258 2026-11-03 via GSTA-258 message to L6 (docs named risk, #3923 base merge; trail row 19): the 2f9d11a base merge changed docs inputs (main's #3929 edits); #3923's own docs lines are unchanged since l6docs2; #3934's audit of the merged docs/pregate.md covers the gap
Debt: no CONTRIBUTING "Which command do I run?" row for
--stage guards.Test plan
LANE: free carried run=41655486773/1 tests_ran=1560 (files)gstack-pregateverify ok on the stamped tree; remote gate cleared from run 41655486773 (skipped=70), macOS lane from the same rungstack: ok 1.94.19.0 for=ship