Repository navigation
Conversation
…ytan#4181) The autoplan skill told the agent to write the plan-approval gate item as `plan` and to read replies `plana` through `plane`. gstack-gate accepts only a lowercase label followed by a number, so the gate refused to render and those replies were never applied. Use `p1`, the id lib/autoplan-gate.ts and docs/unattended.md already use. Add a gate-list case that reads the template's plan-approval id and reply tokens and checks them with the real validator and reply parser. Fixes: garrytan#4181 Co-Authored-By: Claude Code <[email protected]>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
3 tasks done
Contributor
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.
/autoplan's final approval gate now renders, and its plan-approval replies parse. The skill told the agent to name that item
planand to read replies likeplana, whichgstack-gaterefuses.Why (in your own words)
/autoplanPhase 4 tells the agent to write$_AP/gate.jsonwith one item per user challenge (uc<n>), one per taste decision (d<n>), and a plan-approval item namedplan. It then saysplanaapproves andplanc/pland/planeinterrogate, revise or reject.gstack-gateaccepts only a lowercase label followed by a number (ID_REinlib/gate-list.ts:75), so a gate written as the skill says fails to render, and none of theplan<letter>replies can ever match an item. The owner's approval step breaks on the text the skill itself supplies.This addresses #4181, reported with the exact lines by @exGeni.
Validation status: Full free CI passed on head
34a0b6904(32 checks passed, 20 skipped, none failed), including all eleven free-suite shards, typecheck, macOS named regressions and Windows smoke. Locally, the full free suite ran once and every failing file was rerun on unchanged main (below): the only failure this change caused was a size pin, fixed in this commit. Required selected paid coverage and remaining shipping reviews are still pending; skipped fork jobs are not passes.Why this shape
p1is already the id everywhere except the skill text. The helper-built gate writes{ id: 'p1', title: 'Plan approval' }(lib/autoplan-gate.ts:269), anddocs/unattended.md:513calls the itemp1plan approval. The skill prose is the stale side, so the change renames three tokens on three template lines and leaves the grammar, which is a parsed contract, alone.Three lines in one template, its regenerated
SKILL.md, twelve exact size pins the rename moved, one test case in the existing gate-grammar owner file, and one changelog fragment. Fine to absorb into a wave.What it does
p1in the Phase 4 gate.json instructions.p1a(approve) andp1c/p1d/p1e(interrogate, revise, reject) as the reply tokens.autoplan/SKILL.md;bun run gen:skill-docs --host allchanges no other file.*/gstack-autoplanpins intest/fixtures/skill-md-size-allowlist.jsonby 10 characters each. Those renders are over the 100,000-character limit and pinned at their exact size, and the rename shortens each by 10, whichtest/skill-md-size-guard.test.tsreports with the exact values to set.test/gate-list.test.tsthat reads the template's plan-approval id and its reply tokens, then checks them with the realvalidateGateListandparseReply. It reads the tokens from the template rather than pinning a sentence, so a later rewording that keeps a valid id still passes.What it deliberately does not do
lib/gate-list.ts,lib/autoplan-gate.tsorbin/gstack-gate; the grammar stays as it is.uc<n>/d<n>wording,all, or any other part of Phase 4.VERSION, package-version, releasedCHANGELOG.md, README or ETHOS edits. Release notes are one entry-text-onlychangelog.d/fragment.Live evidence
Bun 1.4.4 and Node 22.23.4 on Linux,
LC_ALL=C, privateHOMEandGSTACK_HOME. No browser or live model was used. The gate file holds one auto item (d1) and the plan-approval item with options a to e, written exactly as each version of the skill describes.Actual CLI before and after
Before: the item named
plan, as the skill says on main ata229e2580:After: the item named
p1, as the skill says on this branch:Control: the old token against the same valid gate is still refused, so the reply half of the bug is real on its own, not only a side effect of the render failure.
Failing-first regression
The new case was written before the template edit and run against the unchanged template:
After the fix it passes (1 pass, 7
expect()calls), and the whole owner file passes 16 of 16.Focused checks
Commands ran under the isolated environment above.
test/gate-list.test.ts(gate grammar owner, including the new case)autoplan-stop-gate,autoplan-phase-handoff,autoplan-publication-generation,autoplan-phase-order,autoplan-scopetest/skill-validation.test.tstest/context-budget-ratchet.test.ts,test/catalog-budget.test.tstest/test-of-test-ratchet.test.ts,test/module-size-ratchet.test.ts,test/spawnsync-timeout-tripwire.test.ts,test/egress-receipt-wiring.test.tstest/changelog-fragments.test.tsEach run was
bun --no-env-file --no-load-bunfig test <files> --timeout=60000. Productbun run typecheckexits 0.bun run typecheck:testreports812 known diagnostics, none new.bun run gen:skill-docs --host allleaves the tree clean.gstack-plain-title checkon the title, branch, commit subject and fragment printsPLAIN_TITLE: ok;gstack-prose-lint --gateon the fragment printsPROSE_LINT: ok;git diff --checkis clean;gstack-redact --repo-visibility publicon the exact staged patch reports zero findings.Full free suite and base control
bun run testran once locally on this change before the size-pin fix; that tree differs from the final commit only in the pin fixture. All five shards reported failures in 71 files. This container's Playwright browsers are Chromium build 1243, while the repo pins Playwright 1.65.0 (build 1254), so every browser launch fails here; most of the other failures are /cso, iOS QA and Ubicloud runner tests that need tooling this container lacks.Every failing file was then rerun on its own, with the same flags, on unchanged main at
a229e2580:test/skill-md-size-guard.test.tstest/plan-count-timeout.test.tspasses 2 of 2 (main: 0 failures), andbrowse/test/chromium-profile-isolation.test.tsfails 5 (main: 6), all 30-second Chromium launch timeouts.Upstream main moved to
10fc9b1eawhile this was in review, including #4186's one-line autoplan template edit. This commit cherry-picks onto it cleanly,gen:skill-docs --host allleaves no drift, and the size guard (2/2),test/gate-list.test.ts(16/16),test/skill-validation.test.ts(320/320), both budget suites (10/10) andtest/changelog-fragments.test.ts(15/15) pass there.Every test that reads the pin fixture, rerun on the final commit:
test/skill-md-size-guard.test.tstest/free-fixtures.test.tstest/windows-path-scope-workflow.test.tstest/gate-list.test.tsScope
mainata229e2580:autoplan/SKILL.md.tmpl, the regeneratedautoplan/SKILL.md,test/fixtures/skill-md-size-allowlist.json,test/gate-list.test.tsandchangelog.d/fix-4181-autoplan-gate-p1.md. One commit:34a0b6904cc9f29a4d573c0669b827e313f34030.gstack-gateCLI before and after, the failing-first run of the new case against the unchanged template, 493 focused passing checks, the full free suite with a per-file base control on unchanged main, both typechecks, an all-host regeneration with no drift, and exact-patch lint and redaction scans./autoplanrun through Phase 4 with a model, native Windows or macOS execution, or any paid lane.The free paid-coverage planner (
bun run eval:select --base upstream/main) selects no behavioral probes and no quality judges for this diff in the PR profile. It defers 32 broad behaviors (the autoplan, carve-section-loading and journey cases) to scheduled/release coverage. None was run; none receives pass credit here.Liveness proof (required for external contributors)
Checklist
GSTACK PRtyped live into a real surface)..tmplsource and the existing owner test are changed, andSKILL.mdwas regenerated from it.plan, which gstack-gate rejects #4181.Test plan
planand the parser refusingplana, with the real CLI.p1renders, andp1a/p1cresolve to the right options; keep the old token refused as a control.34a0b6904: 32 passed, 20 skipped).Fork PRs do not receive upstream eval secrets. Skipped paid jobs are not passes; required maintainer-run coverage remains necessary before merge. Broad-profile deferrals are scheduled/release coverage, not PR passes.
Fixes #4181.