Repository navigation
v1.91.364.0 fix: pregate --policy-from head only adds lanes, and timeout_s reaches preflight and finish (GST-419, GST-420) - #3676
Merged
Conversation
…; preflight forwards --policy-from (GST-419, GST-420) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ser policy; remote test timeout) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…sarial) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…s in TODOS Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…_LOOSENS Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
3 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
The new GST-419 and GST-420 tests fail on main and pass on this branch: a head policy may only add lanes, preflight forwards
--policy-from head, andtimeout_sreaches pregate.Before/after as text: The new GST-419/GST-420 tests fail on main and pass on this branch: a head policy may only add lanes, preflight forwards --policy-from head, and timeout_s reaches pregate.
Why
GEVA-2 (gstack-evals#93) added its own pregate lane, but "preflight could not pass
--policy-from head", so Step 5 stopped withPREGATE_NO_LANEand the lane ran its tests by hand (GST-419). HARN-1 (HARN-12) had lanes of about 780 s while preflight andfinishran pregate at its 600 s default, so every run endedPREGATE: incomplete(GST-420). Now preflight forwards--policy-from head, a head policy may only add test lanes, and the repo sets the per-process timeout withtimeout_sin.gstack/pregate.json.Blast radius
This touches every
gstack-pregaterun that reads a policy. The newtimeout_skey is optional, and without it the timeout stays at 600 s (lib/pregate/context.ts, covered by thetimeout_stests). The head-policy comparison runs only under--policy-from head, so base-policy runs, which is every train and CI run, take the same path as before (script ran: the 636-test focused lane and the remote free tier on this tree).Approvals
Source: gstack-approvals record for gsta195-pregate-head-timeout (display only; not an approval citation).
Summary
Parent issue GST-422. GST-419 (from GEVA-2, gstack-evals#93) and GST-420 (from HARN-1, HARN-12).
--policy-from head,.gstack/pregate.jsonon the branch is compared with the trusted policy (the base copy, or the user-owned file when the base has none). It may add adependenciesglob with tests or add tests to an existing glob; anything else is refused withPREGATE_HEAD_POLICY_LOOSENSand each difference is named. A branch behind its base is compared with its merge-base copy and runs the base tip's policy plus its additions. A head file with no trusted policy anywhere still runs as a bootstrap, but--remoterefuses it.--remoteworks with--policy-from headonce that check passes, and still runs the trusted copy'sremote_gate.timeout_s(1 to 3600 s) sets pregate's per-process timeout when--timeoutis absent, so preflight,finishand plain runs all pick it up; the remote gate gets it asPREGATE_TIMEOUT_S. A timed-out lane names where its timeout came from.gstack-ship-preflight --policy-from headforwards to Step 5's pregate, prints up to threePREGATE_DETAIL:lines when pregate does not pass, and reports a refusal asPREGATE: refused (<code>).Behavior changes
[]declaration added only on the branch is now refused under--policy-from head, the Dart device-test workaround included. Declare"**/integration_test/**": []on the base first.test/pregate-dart.test.ts:572and thePREGATE_NO_LANEdoc say so (GStack Minder's C1 answer).--policy-from head, an invalid user-owned policy now refuses (PREGATE_CONFIG_INVALID) instead of being ignored, because it is the policy the head file is compared with.--policy-from headover a user-owned policy) now stores that policy's digest; a record written before this change failsverifyand needs a rerun.Test Coverage
All new code paths have test coverage (Step 7 audit: 100%, 0 gaps). Every new test was red on main first.
Tests ran: focused 636
Pre-Landing Review
No blocking findings. Every finding was informational; two were fixed in pass 1, and Step 11's native adversarial pass found the bootstrap
--remoteself-clear, which is fixed with a failing-first test.REVIEW_LOOP: passes=4 blocking_found=0 deferred=0 noted=5 fixed=2 scope=frozen fix_checks=1 dispatches=8
Gate edits: 8 listed, 6 read, 2 findings — 2 kept (reasons below), 0 restored, 0 open
test/pregate-dart.test.ts: a branch-only[]under--policy-from headis refused, then passes once on the base (GStack Minder's C1 answer).test/pregate-user-policy.test.ts: an invalid user-owned policy under--policy-from headrefuses instead of being ignored (fails closed by design).Outside review: GPT-6.1 Sol (the Codex CLI is not installed), completed on the full diff and on the fix range; the docs-only range skipped it.
Review notes
finishfallback drops head-policy lanes (outside voice, Medium):lib/ship-release.tsreruns pregate on the stamped tree under the base policy, so a lane added under--policy-from headdisappears after a version bump. GSTA-194 owns that file; filed in TODOS.finishwrapper deadline caps the whole run, even when each runner fitstimeout_s(outside voice). Filed in TODOS.--remote(remote_gate: null, orclear --receiptwith its own gate), and the--remoterefusal prints the genericPREGATE_HEAD_POLICY_LOOSENSfix line. Filed in TODOS.docs/pregate.mdstill says a bootstrap head file "runs as written" without naming the--remoterefusal; only lanes timeouts name their source, not guard or remote-gate timeouts. Informational.Exploratory QA
No browser, API or UI surface; CLI behavior is covered by the fixture-repo tests above.
Design Review
No frontend files changed — design review skipped.
Eval Results
No prompt-related files changed — evals skipped.
Plan Completion
Plan autoplan-20261031081834 (eng-only, approved at gate_rev 1): every item done (A1 B1 C1 D1 E1).
Verification Results
Step 8.1 obligations: the negative control (a head policy that removes or loosens a lane is still refused) and the failing-first tests per bug: PASS.
TODOS
No TODO items completed in this PR. Three follow-ups filed under "pregate head-policy follow-ups".
Documentation
Status: updated: three factual additions to docs/pregate.md; no blockers.
Scope: base 047dad7..c247079 (3 commits, 18 files: pregate head-policy rule,
timeout_spolicy key,gstack-ship-preflight --policy-from head, the--remotebootstrap refusal) plus unstaged TODOS.md and the changelog fragment. Audited docs/pregate.md in full, the affected sections of docs/troubleshooting.md, docs/ship-policy.md, ship/sections/tests.md.tmpl, ship/SKILL.md.tmpl, CONTRIBUTING.md and docs/recommended-harness.md, and checked them against the changed source.Documentation health:
docs/pregate.md: Updated. The test-tier bullet and the supervision "timed out" bullet now give the timeout order (--timeout, elsetimeout_s, else 600) and say the detail names the source; the remote gate's environment now listsPREGATE_TIMEOUT_S.docs/troubleshooting.md: Current. The branch already added the PREGATE_HEAD_POLICY_LOOSENS section and the Dart[]note.CONTRIBUTING.md: Current. The remote pregate command row is still valid.README.md,CLAUDE.md,AGENTS.md: Current. No new skill or command surface.CHANGELOG.md,TODOS.md: owned by /ship, not edited.Documentation coverage:
timeout_s(pregate.json key): reference ✅ (docs/pregate.md table,--explain); how-to ✅ (the table row names the preflight and finish use); tutorial ❌; explanation ✅ (changelog fragment).gstack-pregate --policy-from head(adds lanes only): reference ✅ (docs/pregate.md trust boundary); how-to ✅ (troubleshooting PREGATE_NO_LANE route 2); tutorial ❌; explanation ✅.PREGATE_HEAD_POLICY_LOOSENS: reference ✅ (troubleshooting anchor); how-to ✅ (fix line).gstack-ship-preflight --policy-from headandPREGATE_DETAIL/PREGATE: refused: reference ✅ (preflight help); how-to: partial (the troubleshooting example omits--base/--lane; /ship Step 5 prose does not mention it). Common gap.Debt: /ship Step 5 (ship/sections/tests.md.tmpl) could name the
--policy-from headroute and therefusedverdict. The troubleshooting PREGATE_INCOMPLETE fix could point preflight and finish users attimeout_s.Diagram drift: none; no diagrams reference the changed modules.
Test plan
bun test test/pregate-head-policy.test.ts test/ship-preflight.test.ts ...): 636 pass, 0 failbun run typecheck: clean🤖 Generated with Claude Code