Repository navigation
v1.94.36.0 fix(skill-contracts): agent_dispatch rejects markers; the waive hint names the installed bin (GST-1242) - #3964
Conversation
…names the installed bin (GST-1242) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…e call Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…o bash runs it literally (GST-1242) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
E2E Evals: ✅ PASS11 executed, 0 reused rule/judge records | 0 manual accepted (unscored; no score-cache credit) | $5.31 rule/judge cost | reconcile exit: 0 Profile: pr / mode Rule and judge shards
Fail-closed reconciliationSliced lane: planner → duration-packed executors → fail-closed report. Behavior cases run a pre-registered 3-trial panel (PASS at 2/3 with no contract violation); a PASS 2/3 is shown with its failed trial, never as a clean pass. Reused results retain their original provenance and expiry. Dispatched narrow screen (gstack-ship-queue ready --screen) of merge commit |
Summary (GST-1242)
Three fixes to the skill contract checker from lane C's reader on #3922.
lib/skill-contract.tscounted anagent_dispatchitem with amarker:as met once the marker line appeared and any later Agent call ran. Binding the marker to the item'smatchwould make it a no-op, because the fallback already accepts any Agent dispatch that matches. SoparseContractnow rejectsmarkeronagent_dispatchuntil the checker can bind a marker to the dispatch it names, and the checker's marker branch is gone. No shipped contract used it there. /review'smarkeronselected_specialists_dispatchedis unchanged.run gstack-skill-contract waive …. A standard install doesn't put that name on PATH, so the agent got exit 127. The hook now names the installed bin by the path it resolves its own bins with (binPath()inhosts/claude/hooks/spawn-bin.ts), andgstack-skill-contract checknames its own path.Review fixes
blockMessage, which failedbun run typecheck:test(TS2554). Fixed in f91e895.$(), backticks or a quote in the install path. The hint now single-quotes the path and escapes any'in it (f48e519). A new test runs the rendered command through bash with/opt/it's gstack $(touch pwned)/bin/gstack-skill-contractand checks that bash prints the path literally. It also feeds that command back through the transcript reader and checks that the waiver counts. Before the fix, bash dropped the$(…)text from the path. That fix landed after round 2, at the cap. One scoped fix-check read it afterward and found nothing blocking.Review-loop exception: accepted by GStack Minder 2026-11-03 via GSTA-36: one scoped fix-check by a single reader on the round-2 shell-quoting fix (fix-check at f48e519, 1 finding)
Review notes
markeronagent_dispatchnow fails validation. The Stop hook then fails open for that skill's whole contract, the same way any invalid contract already does. No shipped contract is affected.gstack-skill-contractthrough a symlink. Bun resolves the entry point's real path today.pwnedfile check looks next to the bin path, not in the directory bash runs in, so it can't fail. The assertion that bash prints the path literally is the real guard. Left as is.Failing tests first
test/skill-contract.test.tsGST-1242: a marker followed by an unrelated Agent call gavemetbefore the fix (captured: expectedmissing, receivedmet). It now givesmissing, and the right call givesmetas the negative control.parseContractrejects a marker onagent_dispatchand still accepts one onselected_specialists_dispatched.test/skill-contract-stop-hook.test.tsGST-1242: the block reason must not sayrun gstack-skill-contract waive. The quoted path it names must be the checkout'sbin/gstack-skill-contract, and running<that path> waive repro-after-fix --reason …must exit 0.test/gen-skill-docs.test.ts: /review carries the new wording, and itssections/preamble.mdhas## Operational Self-Improvement.The existing assertion that pinned the false pass (marker line plus an unrelated Agent call gives
met) now expectsmissing.Security read
The change makes no network calls, reads no new environment variables, widens no permissions and adds no dependencies. The block text now contains an absolute install path. That path is the user's own install location and appears only in the agent's Stop-hook feedback.