Repository navigation
v1.94.33.0 fix(ship-queue, hooks): selector reads the checkout under review; one SWITCH_DEFAULT per hook switch; installs are not checks; timed agent deferral (GST-1088 follow-up) - #3933
Merged
Conversation
…fig lists the hook switches; installs are not checks; one deferral per running agent set (GST-1088 follow-up) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ooks, gstack-config and gstack-skill-route (GST-1088 follow-up) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… linear, agent stalls are timed, report re-checks deferred runs (GST-1088 follow-up review) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…eadable config turns both hooks off whatever the default (GST-1088 follow-up) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Contributor
E2E Evals: ✅ PASS (reused: main moved, R2)No paid case ran on Verdict reuse (R2a restamp-only, R2 main moved): a changed own diff, a non-stamp byte, a changed selection, a newer red or unbound gate, or a missing binding or receipt runs the full gate; the evals-fresh label opts out. Free Tests and every other check still ran on this head. Dispatched narrow screen (gstack-ship-queue ready --screen) of merge commit |
This was referenced Nov 3, 2026
…-1088-lane-a-followup
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 this does
Follow-ups to #3912 (GST-1088 lane A, the opt-in skill routing and contract hooks). Both switches stay off, so nothing changes for anyone who has not turned a hook on.
gstack-ship-queue readyno longer misreads a PR's new files as deleted.computePaidCaseSelection(scripts/lib/paid-select.ts) passed the selector the dependency map derived from the installed gstack. When the install is older than the checkout under review, a file the PR adds (here the fourhosts/claude/hooks/skill-*files) matched an old needle and was labelled "deleted but still referenced", soreadyrecommended--screen. It now derives dependencies and reads sources from the checkout under review. Repro: a 54606c5 worktree as the selector root against the 6a370bd checkout; the new test in test/pr-dependencies.test.ts failed first.SWITCH_DEFAULTinlib/skill-route.tsis now the only place each switch's default is written (bothoff). Setup's gate, both hooks,gstack-config get|list|defaultsand the newgstack-skill-route --default <switch>all read it, so flipping a default is a one-line PR: line 39 (skill_routing: 'off',) or line 40 (skill_contracts: 'off',). Setup now reads the stored value withgstack-config get --storedand sayson via defaultwhen the table turned a hook on. An unrecognized value takes the default in the hooks too, as setup already said it did. test/setup-skill-hooks-gate.test.ts copies the readers, flips one table line and checks the diff is that line, then checks that setup registers the hook,gstack-configreportson, the routing hook routes and the Stop hook blocks; configoffstill wins.gstack-config get <absent key>prints nothing and exits 1, neverfalse(pinned in the same file).SWITCH_DEFAULT. Flipping line 39 alone fails exactly one test,pin: skill_routing defaults to off today; flipping line 40 alone fails exactlypin: skill_contracts defaults to off today(both in test/setup-skill-hooks-gate.test.ts). A flip PR changes its table line and its pin.config.yamlthat exists but cannot be read turns both hooks off in setup (with a warning) and in the hooks, whatever the default, because it may hold anoffthe person set.gstack-config listanddefaultsshowskill_routingandskill_contracts.check_after_last_editcounted any command starting withbun,npm,go,makeornode, sobun installornode --versionafter an edit satisfied "ran a test after the last edit". It now needs a test runner, a test or check verb, code through an interpreter,curlto a URL, or a test, check or repro script. Option values are skipped (make -C web test,pnpm --filter app test,xcodebuild -scheme App test),node --testand typecheck scripts count, and wrapper words nest at most three deep, so a long chain stays fast.deferredand allows the stop until the same agents have been running for 10 minutes (AGENT_STALL_MS) since the stop that first saw them; after that they count as stalled and the contract is checked. A stop on a turn that ends on a question never starts the clock.gstack-skill-contract reportre-checks deferred runs against their transcripts, so an abandoned unmet run reads as a miss.#3912 notes not fixed here, and why
remove-sourcerewrites settings.json holding empty hook arrays. That is corebin/gstack-settings-hookbehavior shared by every gstack hook, so it is out of scope for this lane.stop_hook_activecannot say whose block it was, so recording there would invent outcomes.sed -i, heredocs) are not counted as edits. Parsing shell for writes is unbounded; Edit, Write, MultiEdit and NotebookEdit cover what Claude Code does by default.CONTRACT_CHECKER_SHIPPED(scripts/resolvers/contract-done-means.ts) waits for v1.94.22.0 feat(skills): when-to-use descriptions, wider triggers and contract blocks for /investigate, /review, /qa, /verify (GST-1088 lane B) #3909 to reach main, as planned.Review
Full review on the first head: specialists, red team, adversarial, an outside voice on GPT-6.1 Sol and the targeted gate reader. Two blocking findings, both regressions in the check-command rewrite, were fixed in the one fix round: exponential recursion on long wrapper chains, and option values read as the verb. The three informational findings were fixed in the same round: a deferral started on a turn that was not final, stall detection by stop count (a user's "how is it going?" could trigger a false block), and deferred runs that
reportnever re-checked. Left as is: baremakeandmvn clean installdo not count as checks (ambiguous default targets), anduv pip install pyteststill counts, as it did before this PR. The targeted gate reader was rerun on the final head and raised one informational note, left open because the review allows one fix round: perl and php run as interpreters, soperl -pi -e s/a/b/ src/a.ts(an in-place edit) andphp composer.phar installcount as checks, andpython3 -m pip install ...still counts as it did before. A follow-up can stop counting in-place edits and interpreter-run installs. After the flip fix, the targeted reader on the final head raised one more informational note, also left open: adeferredrun thatreportcannot re-check (its transcript is gone) keeps thedeferredoutcome and is not counted as a miss, where an unrecheckableblockedrun is.Security note
setupchanges only its two skill-hook gates: they now askbin/gstack-skill-route --default <switch>(through bun with the isolation flags) for the default and read the stored value withgstack-config get --stored. If that bin cannot run, the default is off.bin/gstack-configdefinesGSTACK_BUN_CONFIGand spawns the same bin only to print the default of these two keys. No network calls, no new environment reads, no new dependencies, no workflow changes.Tests
New tests failed on the code before each fix and pass now: test/pr-dependencies.test.ts (selector root), test/gstack-config-defaults.test.ts (list and defaults), test/setup-skill-hooks-gate.test.ts (SWITCH_DEFAULT flip, absent key), test/skill-contract.test.ts (checks, option values, wrapper chain timing, report re-check) and test/skill-contract-stop-hook.test.ts (timed stall, question turns). The 22 targeted and guard files pass (234 tests), typecheck is clean, and the test typecheck ratchet reports no new diagnostics. Because this PR touches ship-queue selection, the full free suite ran on a Ubicloud VM at the final tree (eadfb3fb) before push: 21,707 tests, 6 failed, all in timing or PTY tests outside this diff (review-army-budget, plan-count-checkbox, qa-fix-loop-fixture, memorable-user-prompt-hook, section-capture-native-tools, plan-seed-submission). Rerun once at the same tree, those six files passed 168 of 168, so they are recorded as flaky. CI's Free Tests run is the full run of record.