Repository navigation
Make autoplan's plan-approval gate item p1 so gstack-gate accepts it (#4181) - #4219
Merged
capy-ai[bot] merged 3 commits intoNov 9, 2026
Merged
Conversation
…4181) /autoplan Phase 4 told the agent to write a gate item with id `plan` and to read replies `plana`/`planc`/`pland`/`plane`. gstack-gate only accepts ids of a lowercase label plus a number, so render refused the gate and the replies never parsed. Rename it to `p1` (the id lib/autoplan-gate.ts and docs/unattended.md already use), lower the autoplan size pins by the 10 characters saved, and add a test that builds the gate from the template text and runs it through bin/gstack-gate render and parse. Co-authored-by: Eng. Mahmoud Bek ElNemer <[email protected]> Co-authored-by: Yuan S. <[email protected]> Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
Now that the /autoplan Phase 4 gate renders, its reply mapping is reachable. gstack-gate parse accepts p1a while a User Challenge is still pending, and treats all as rec, which takes plan-changing recommendations, yet the skill sent both straight to A (approve as written). Re-present a reply that leaves an approval item pending, and send a plan change chosen on a d<n> or uc<n> item, all included, to B or B2. The paragraph is 3 characters shorter, so the 12 autoplan size pins drop by 3. Review-Finding: p1/outside-voice#1 reader=outside-voice Review-Finding: p1/adversarial-native#1 reader=adversarial-native Review-Finding: p1/adversarial-native#2 reader=adversarial-native Review-Finding: p1/red-team#1 reader=red-team Review-Finding: p1/red-team#2 reader=red-team Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
3 tasks done
This was referenced Nov 15, 2026
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 replies to its plan-approval item parse. The skill told the agent to name that item
plan, which gstack-gate refuses, so the whole gate failed before anyone could answer it.What changed
autoplan/SKILL.md.tmpl(and the regeneratedautoplan/SKILL.md) names the plan-approval gate itemp1instead ofplan, and lists its replies asp1a,p1c,p1dandp1einstead ofplana,planc,plandandplane.test/gate-list.test.tsadds "the /autoplan Phase 4 gate as documented (/autoplan tells the agent to write a gate item with idplan, which gstack-gate rejects #4181)": it builds the gate from the template's own text and runsbin/gstack-gate renderandparsefor every documented reply.test/fixtures/skill-md-size-allowlist.jsonlowers 12 autoplan size pins by the 10 characters the rename saves.changelog.d/autoplan-gate-accepts-plan-approval-replies.mdadds the release note.Why
"gstack-gate render exits 1" on the gate /autoplan Phase 4 tells the agent to write (#4181, reported by @exGeni). gstack-gate only accepts an item id made of a lowercase label and a number (
ID_REat lib/gate-list.ts:75, and the reply-token pattern at :207), soplanfailed validation andplananever matched.p1is the id gstack's own gate builder (lib/autoplan-gate.ts) and docs/unattended.md already use, so the skill now agrees with the tool.Blast radius
Only /autoplan's Phase 4 prose and its test and size pins change; no code path changes. The new test builds the gate from the template text itself, so a future rename that breaks the id fails CI (rung: script ran; failing first on main 6473a17, where render and all four parses exit 1 with "items[2].id must match [a-z]*[0-9]+"). The change touches no network, secrets, permissions, workflows, install scripts or dependencies.
Outside credit: @ElNeMeR70 (#4189) and @szsunyuan (#4191) proposed the same rename. Their code was read as text only and never checked out or run; this change was written on main, and the commit credits both with Co-authored-by trailers.
Summary
p1so gstack-gate renders the gate and parses its replies (7b97904).Test Coverage
Coverage: deterministic (each of 2 changed runtime files has a changed test naming it). The new #4181 test failed first on main 6473a17 and passes here.
Pre-Landing Review
Pre-Landing Review: 2 issues — 0 auto-fixed, 2 asked (0 fixed, 2 skipped), 0 deferred, 0 noted (pass 1). The b746d50 fix round was reverted, so every reply-mapping finding is open as a note or ruling below.
Gate edits: none detected (2 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Review notes
Below the blocking floor or ruled by the Captain; recorded here and not fixed in this PR.
Ruled note: autoplan/SKILL.md.tmpl:401:outside-voice:pending at 7b97904 ruled by Captain GStack Minder (GSTA-36), 2026-11-09 at 2026-11-09T14:47:47.470Z: p1a can pass A while a uc item is pending: main's existing answer-path mapping with only the token renamed; out of scope; queued for an answer-path follow-up (approval a-0eaad14c8f72)
Ruled note: autoplan/SKILL.md.tmpl:401:adversarial-native:pending at 6dca760 ruled by Captain GStack Minder (GSTA-36), 2026-11-09 at 2026-11-09T14:47:47.565Z: same finding as p1 outside-voice#1: p1a can pass A while a uc item is pending; main's existing answer-path mapping with only the token renamed; out of scope (approval a-e370ccde32ed)
Ruled note: autoplan/SKILL.md.tmpl:401:adversarial-native:all-rec at 6dca760 ruled by Captain GStack Minder (GSTA-36), 2026-11-09 at 2026-11-09T14:47:59.714Z: all/rec maps to approve-as-written while gstack-gate applies plan-changing recommendations: main's wording, token renamed; own answer-path PR after this lands (approval a-bb204dad025d)
autoplan/SKILL.md.tmpl:401(pass 1 red-team#1, adversarial-native#2):allis an alias ofrec, which takes plan-changing recommendations, but the mapping sends it to A. Covered in substance by the all-rec ruling above.autoplan/SKILL.md.tmpl:402(pass 1 adversarial-native#3): a barep1breply has no outcome mapping.autoplan/SKILL.md.tmpl:360(pass 1 adversarial-native#4, investigate): hand-written gates now reach the code that readsp1rows (autoplan-carry, the shadow reader) withoutitem_class,originorchanges_plan; approval-record degrades sensibly, the other readers were not traced.autoplan/SKILL.md.tmpl:401(Step 11 rerun adversarial-native#3): the new test expectsp1ato pass withuc1pending and never checkspending.autoplan/SKILL.md.tmpl:363(Step 11 rerun adversarial-native#4, investigate): the hand-writtenp1hard-codes "a) approve as-is (recommended)" and sets nochanges_plan, unlikeplanApprovalin lib/autoplan-gate.ts, which recommendsbwhen a recommendation changes the plan.Exploratory QA
Smoke, 3 probes on the checkout's bin/gstack-gate with a gate built as the template describes: render exits 0;
uc1a p1aparses (p1=a, nothing pending);plananow fails with GATE_REPLY_UNPARSED. No browser surface. QA's method sections were not read for this prose-only rename.Eval Results
evals: none affected (eval-select, pr profile: 0 behavioral probes, 0 quality judges; 32 autoplan and journey behaviors stay on release coverage).
Plan Completion
Plan completion audit: not run (bug fix, Plan: exempt: bug fix (R65)).
Issues
Fixes #4181
Refs p1/adversarial-native#1
Refs p1/adversarial-native#2
Refs p1/outside-voice#1
Refs p1/red-team#1
Refs p1/red-team#2
Related: #4189 (@ElNeMeR70)
Related: #4191 (@szsunyuan)
Verification Results
No plan obligations (bug fix). Repro: failing first on main 6473a17, passing at 6dca760.
TODOS
No TODO items completed in this PR.
Documentation
Status: current — the docs already match the change, and no edits were needed (read-only audit).
Scope: base 6473a17 through head 6dca760 (3 commits, 5 files): the autoplan plan-approval gate item is renamed from
plantop1, with repliesp1a/p1c/p1d/p1e. No staged, unstaged or new files.Documentation health:
autoplan/SKILL.md.tmpl: Updated in this branch (gate idp1)autoplan/SKILL.md: Current (generated output matches the template)changelog.d/autoplan-gate-accepts-plan-approval-replies.md: Currentdocs/unattended.md: Current (already usesp1ids)docs/skills.md: Current (no gate-id detail)Coverage debt: none. The changed contract is covered by reference docs (the skill template and docs/unattended.md). Diagram drift: none.
Test plan
Agent notes
Lane GSTA-446 (Captain GStack Minder, GSTA-36). Pin 6dca760, tree 40fc985031bd50bbfe25f3d97cb9bbd49a7b7a6e (equal to 7b97904's).
REVIEW_LOOP: passes=2 blocking_found=7 deferred=0 noted=20 fixed=5 scope=frozen ledgers_read=5 dispatches=4
The fixed=5 count comes from b746d50's Review-Finding trailers; 6dca760 reverted that commit, so none of those fixes ship. Every finding they name is a ruled or listed note above.
Gate edits: none detected (2 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Ruled note: autoplan/SKILL.md.tmpl:401:outside-voice:pending at 7b97904 ruled by Captain GStack Minder (GSTA-36), 2026-11-09 at 2026-11-09T14:47:47.470Z: p1a can pass A while a uc item is pending: main's existing answer-path mapping with only the token renamed; out of scope; queued for an answer-path follow-up (approval a-0eaad14c8f72)
Ruled note: autoplan/SKILL.md.tmpl:401:adversarial-native:pending at 6dca760 ruled by Captain GStack Minder (GSTA-36), 2026-11-09 at 2026-11-09T14:47:47.565Z: same finding as p1 outside-voice#1: p1a can pass A while a uc item is pending; main's existing answer-path mapping with only the token renamed; out of scope (approval a-e370ccde32ed)
Ruled note: autoplan/SKILL.md.tmpl:401:adversarial-native:all-rec at 6dca760 ruled by Captain GStack Minder (GSTA-36), 2026-11-09 at 2026-11-09T14:47:59.714Z: all/rec maps to approve-as-written while gstack-gate applies plan-changing recommendations: main's wording, token renamed; own answer-path PR after this lands (approval a-bb204dad025d)
Approvals
Approved: yes (record r-f47838d7a91a). The full approval record stays private.
Plan: exempt: bug fix (R65)
Plan check: exempt bug fix
Refs #4181