Skip to content

v1.91.269.0 feat(autoplan): gates print their cost, approvals mirror to the Captain's drive, Eng asks for a perf budget (GSTA-114 lane F, PR 3) - #3496

Merged
capy-ai[bot] merged 8 commits into
mainfrom
gsta-114-autoplan-gates
Oct 27, 2026
Merged

capy-ai[bot] merged 8 commits into
mainfrom
gsta-114-autoplan-gates

Conversation

@garrytan

@garrytan garrytan commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3496,
  "head": "f16ac6594d149598bce0a3f7cae1aae8c9a43d96",
  "version": "1.91.267.0",
  "base": "main",
  "gate": {
    "pregate.json/remote_gate": {
      "pass": 17714,
      "fail": 0,
      "skip": 0
    },
    "free-tests.yml/macos-named-regressions": {
      "pass": 406,
      "fail": 0,
      "skip": 5
    },
    "windows-free-tests.yml/windows-free-shard": {
      "pass": 16007,
      "fail": 0,
      "skip": 0
    }
  },
  "session_kind": "unattended",
  "pregate": "requires-remote cleared @56c43ae4d6ed (1 checks, current for f16ac6594d14)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/40453165164",
    "windows-free-tests.yml/windows-free-shard: https://github.com/garrytan/gstack/actions/runs/40453165331",
    "pregate.json/remote_gate: remote-gate tree=56c43ae4d6ed tests=17714"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "review_loop": {
    "passes": 5,
    "blocking_found": 17,
    "deferred": 1,
    "noted": 0,
    "fixed": 44,
    "scope": "frozen"
  }
}

What changed

Before: an autoplan gate stopped a run with GATE: gate_rev=N render with: … and nothing about money: the Captain relaying it, and the person approving, had no credit figure for the review so far and no idea what taking the recommendations would reopen or cost. The approvals mirror on Capy sat in the private project-user drive folder, which no sibling crew thread can read. The Eng phase never asked whether a hot path had a performance budget or a bench step.

After:

  • Every gate prints its price (lib/autoplan-gate-cost.ts). Under GATE:, run at a pending gate and the --json payloads (gate_cost): GATE_SPEND: is the run's ledger at the gate (spent, worst case, cap, headroom, attempts; host-subagent attempts are priced unknown and counted at their reservation with a pointer to the host's cost view, never an invented figure) and GATE_REC_COST: is the price of rec as an upper bound from the answer and revise rules: a plan-changing recommendation counts every phase revise can keep or add (a run that skipped Design or DX without --no-ui/--no-dx counts them too), a round grant counts its phase and Eng, the effective choice per item is parseReply's (recorded answer at this gate revision, else the carried choice, else the recommendation), a recorded plan rerun p1d prices every phase, a reject or stop nothing, two voices each with the outside voice on at the run's per-voice reservation, and a reopen past the cap says so. gstack-owner-brief render carries the same figures as one Cost so far: sentence and render --captain as a ### Cost section above the relaying-agent trailer, so the person approving sees it.
  • The approvals mirror lands where the crew can read it (lib/approval-record.ts captainApprovalsDir): on Capy the mirror is GSTACK_APPROVALS_DIR when set, else the approvals/ directory of the one mounted Captain drive (~/.capy/drive/captain-*/approvals/<slug>/<branch key>.jsonl), else the private project-user folder as before; two Captain drives with one each is ambiguous and falls through. The other roots are still read (read_also) so rows mirrored under the earlier rule stay visible; gstack-approvals path prints which rule chose the mirror and the READ_ALSO: roots.
  • Eng phase, Section 4 (Performance) (autoplan/sections/eng-phase.md.tmpl): a hot path with no performance budget or bench step is a finding, and consensus row 3 asks "Perf risks + budget/bench named?". Five nearby phrases were shortened by the same number of characters, so every host's generated autoplan SKILL.md stays at its size-guard pin.
  • Docs: autoplan/DRIVER.md relays the two cost lines with every gate render; docs/capy-install.md, docs/unattended.md, docs/recommended-harness.md, capy/skill/gstack/captain.md name the crew-readable mirror and the brief's cost section; docs/troubleshooting.md's APPROVAL_RECORD_UNAVAILABLE fix names the three mirror sources. capy/skill/gstack/SKILL.md is v1.91.258.0 feat(capy-install): project floor, --for none, WARN for behind and Node-only pins, in-place review-voice upgrade, /cso env hygiene (GSTA-114 lane F, PR 1) #3475's file and untouched here.

Before: the closing submit stops at GATE: with no figure and the Captain brief has no cost. After: GATE_SPEND/GATE_REC_COST under GATE: and a ### Cost section above the relaying-agent trailer; gstack-approvals path mirrors to the Captain drive and still reads the project-user root

Why

Harness-codify plan lane F items E16, E22 and E23: three Captains reported review rounds and reviewer subagents with no credit figure at the gate, an approvals mirror no sibling thread could read, and a correctness pass that doubled a consumer's p95 because no Eng question asked for a bench step. Everything is generic: no thread codes in product code or prose.

What was cut: the standing "take the recommendations" answer (E21)

This PR was opened with gstack-autoplan answer --owner-standing rec, which answered a gate by citing the newest gstack-approvals standing row whose words named the recommendations. Four review passes kept finding the same floor item in different clothes: a keyword grammar over the owner's free text (NEGATION_RE) read "I won't take the recommendations", "Taking the recommendations is forbidden" and "Permission … has expired" as grants, and gstack-approvals add deduped a same-day scope revocation as a duplicate of the grant. A negation blacklist cannot fail closed, so under GStack Minder's rule-23 ruling E21 left this PR in 413bce8 (lib/autoplan-gate.ts, autoplan-state.ts, autoplan-run.ts, autoplan-public.ts and result-codes-capy.ts are back to main; project_root/project_slug are not recorded in run.json). It returns as its own PR with a structured grant (an exact canonical sentence or a dedicated --standing-grant flag) once the record's id and sync rules are fixed.

Deferred findings

Review notes

Pass 4 Codex structured P2 (checkout-free lookup needed a Git branch), Codex adversarial P1 + 2 P2 (explicit refusals grant; branch required; foreign-platform project_root escapes export --public redaction) and the red team's INFORMATIONAL (slug fallback needs a caller branch) were all in the removed E21 code.

Tests

  • test/autoplan-gate-cost.test.ts (new, 7 tests): recReopens as the upper bound (plan change counts every phase revise can keep or add, a round grant its phase plus Eng, carried items only when changed, overrides, p1d/p1e), priorChoices, the two cost lines from a ledger with an unknown host attempt (cap, no cap, over the cap, no ledger); the mirror chain (project-user, one Captain drive, two, GSTACK_APPROVALS_DIR, mirror off) and gstack-approvals path with READ_ALSO:; end to end through bin/gstack-autoplan: the closing submit prints GATE_SPEND:/GATE_REC_COST: (text) or gate_cost (--json), the owner brief carries Cost so far:, render --captain a ### Cost section above its trailer, and run at a pending gate prints the gate lines once (one --json payload).
  • Base merge (GStack Minder's rule-19 grant): origin/main d9b0d60 (v1.91.267.0) merged as f16ac65; CHANGELOG.md the only conflict, resolved with mergeChangelogs (the [Unreleased] block is byte-identical); every other file's diff against its base is patch-id-identical before and after the merge, so the four review passes stand and a fifth delta pass over the merge range recorded NO FINDINGS. At f16ac65: focused 802 pass / 0 fail across 45 files; remote free tier PREGATE_REMOTE: tree=56c43ae4d6ed tests=17714 failed=0 spent=0.05; GitHub-scheduled CI green (Free Tests 40453165164, Windows Free Tests 40453165331, Quality gate, Version Gate, E2E Evals, Windows Setup E2E, Skill Docs Freshness, Workflow Lint).
  • Focused at 413bce8 (the pre-merge pin): 793 pass / 0 fail across 45 files (approval-record, approval-classes, the autoplan suites, captain-brief, design-approval-flow, eng-test-plan-edit-approval, skill-md-size-guard, troubleshooting-anchors, parity-suite, module-size-ratchet, state-root-ratchet, bun-entry-isolation, catalog/context budgets, doctor-components, context-identity, bin-context-windows-slug). bun run typecheck, typecheck:test, format:cso:check clean; gen:skill-docs --host all leaves the tree clean; autoplan/DRIVER.md 157 lines.
  • Remote free tier (Ubicloud us-east-a2, one standard-16): PREGATE_REMOTE: tree=357113283392 tests=17604 failed=0 spent=0.05. CI at 413bce8 via the dispatch route (GitHub schedules no pull_request run on a CHANGELOG-only-conflicted head): Free Tests 40417225248, Windows Free Tests 40417230719, Quality gate 40417235897, all green. At the pre-split head 4d49667 two free-suite shards failed home containment (~/.gstack/slug-cache written by the deleted standing tests and by init's project_slug lookup); both writers left with E21.
  • Review loop: four passes under review_scope frozen (the fourth was the owner's rule-23 exception bounded to the pass-3 items), 24 findings fixed across ff2bcd8, ee2ce02 and 4d49667, the pass-4 findings resolved by the split, and a fifth delta pass over the base merge (no product change); binding verified on tree 56c43ae4d6ed.

Gate integrity

No threshold, rubric, trial count, case kind or judge prompt changed (gstack-gate-diff origin/main: listed=1 eligible=0, no gate edits). The only prompt edit is the Eng phase's performance paragraph; the one paid autoplan case (autoplan-dual-voice) reads Phase 1, which is untouched.

…standing approval, approvals mirror to the Captain's drive

E16: GATE_SPEND and GATE_REC_COST under every GATE line (lib/autoplan-gate-cost.ts), and a
Cost so far sentence in the owner brief; host-subagent attempts stay priced unknown.
E21: gstack-autoplan answer --owner-standing rec --by agent:<id> answers rec by citing the
newest standing approval covering autoplan recommendations from any branch's record; the
id lands on every decision row, in run.json and in the approvals import; refused with
STANDING_APPROVAL_ABSENT or STANDING_APPROVAL_INAPPLICABLE (urgent finding).
E22: the approvals mirror honours the approvals/ directory a Captain created in its drive,
between GSTACK_APPROVALS_DIR and the private project-user folder; gstack-approvals path
names the rule.
E23: the Eng phase asks for a performance budget and a bench step on hot-path changes.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 4 commits October 26, 2026 21:49
…ject and refuse recommend-edited gates, cost is an upper bound and reaches JSON and the Captain brief

Review pass 1 (6 specialists + red team) on the standing-approval and gate-cost change:
- the standing lookup resolves the approvals record of the repository the run's plan lives in,
  never the caller's cwd (red team: project A's row answered project B's gate)
- standingAnswer refuses a gate that `recommend` edited (rec_rev > 0 or recommended_by), a
  missing or unreadable findings.jsonl, and an outside-plan finding; the STANDING line flattens
  control characters so a crew-writable row cannot forge a protocol line
- coversAutoplanRec matches the recommendation words in the owner's words only and rejects
  negations; STANDING_APPROVAL_ABSENT's fix names every required gstack-approvals flag
- recReopens is the upper bound of the answer/revise rules (a plan change counts every phase,
  a round grant its phase plus Eng); gate_cost rides the JSON payloads, `run` prints the lines
  at its final gate, and `gstack-owner-brief render --captain` appends a ### Cost section
- locate keeps the other mirror roots as read_also so rows mirrored under an earlier rule stay
  visible; gstack-approvals path prints READ_ALSO
- the Eng phase edit is size-neutral: five nearby phrases shortened so every host's autoplan
  SKILL.md stays at its size-guard pin
- tests: isolated fixtures, the run's plan inside its own git repo, cross-project refusal,
  amend_pending vs complete, recommend-then-standing, injection, gate_cost JSON, Captain brief

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Standing approvals: the newest row about autoplan recommendations decides, so a later refusal
blocks older grants; rows whose id or date is not the recorded shape are never cited; the
project is fixed at init from the plan's physical path (run.json project_root) so a symlinked
plans folder or a checkpoint restore cannot borrow another repository's record. Gate cost:
recReopens counts every phase revise can keep or add and prices answers already recorded at
the gate; run --json emits one payload; the Captain brief's ### Cost sits above the relaying
trailer.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Standing grammar fails closed: the newest standing row mentioning autoplan decides and grants only
with the canonical scope and affirmative owner words; same-id copies keep the newest recorded; id and
date are type-checked before the regexes. Gate cost prices the effective choices exactly as answer
does (p1d, carried overrides, non-recommended options). The run records project_slug beside
project_root so a restored run names its record on another machine, and project_root is a recorded
root for export --public.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Pass-4 review (red team + Codex adversarial) still found that the keyword
grammar over the owner's standing words could read a refusal as a grant
("I won't take the recommendations", "Taking the recommendations is
forbidden" granted under the canonical scope) and that gstack-approvals add
deduped a same-day scope revocation as the grant. A free-text negation
parser cannot fail closed, so the standing answer leaves this change and
returns with a structured grant in its own PR.

Kept: GATE_SPEND/GATE_REC_COST cost lines and gate_cost (E16), the
Captain-drive approvals mirror with READ_ALSO (E22), the Eng perf-budget
question (E23). Removed: standingAnswer, standingRecApproval,
coversAutoplanRec, citableRow, project_root/project_slug in run.json,
STANDING_APPROVAL_* result codes and anchors, the standing DRIVER
paragraph and docs, test/autoplan-standing.test.ts (its E16/E22 cases move
to test/autoplan-gate-cost.test.ts).

Focused: 793 pass / 0 fail across 45 files; typecheck, typecheck:test,
format: cso:check clean; renders regenerated with gen:skill-docs --host all.
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai capy-ai Bot changed the title feat(autoplan): gates print their cost, --owner-standing rec cites a standing approval, approvals mirror to the Captain's drive (GSTA-114 lane F, PR 3) feat(autoplan): gates print their cost, approvals mirror to the Captain's drive, Eng asks for a perf budget (GSTA-114 lane F, PR 3) Oct 26, 2026
garrytan and others added 3 commits October 27, 2026 05:01
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
… base=origin/main@76aa68f policy=base origin/main@76aa68fc9e7a:.gstack/ship-policy.json)

ship, next in queue at 1.91.269.0
STAMP_VERSION: 1.91.269.0
claims: ignored (stamp-at-merge)
stage version: done (wrote 1.91.269.0)
stage release_tool: done (bun scripts/gen-agents-digest.ts)
stage changelog: done (Unreleased -> 1.91.269.0)
stage stamp_paths: skipped (no stamp_paths in policy)
stage mirror: skipped (no mirror in policy)
stage apply: done (4 file(s))
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e4e2830..566bb52 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,6 @@
 # Changelog

-## [Unreleased]
+## [1.91.269.0] - 2026-10-27

 **An autoplan gate now arrives with its price, and the approvals record lands where the whole crew can read it.** Captains reported the same two frictions: review rounds and reviewer subagents had no credit figure at the gate, and the approvals mirror sat in a private project-user folder no sibling thread could read. The Eng phase also gains the performance-budget question, after a correctness pass doubled a consumer's p95 with no bench step to catch it. (The standing "take the recommendations" answer planned beside these, `answer --owner-standing rec`, was cut from this release after review: a keyword grammar over the owner's words could still read a refusal as a grant, so it returns with a structured grant in its own change.)

diff --git a/VERSION b/VERSION
index c31f846..6437fa3 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.91.268.0
+1.91.269.0
diff --git a/agents-digest/gstack-AGENTS.md b/agents-digest/gstack-AGENTS.md
index 3548eb6..4bdc287 100644
--- a/agents-digest/gstack-AGENTS.md
+++ b/agents-digest/gstack-AGENTS.md
@@ -1,4 +1,4 @@
-# gstack digest v1.91.268.0 — regenerate/re-copy after upgrading gstack
+# gstack digest v1.91.269.0 — regenerate/re-copy after upgrading gstack

 Behavioral rules from gstack (https://github.com/garrytan/gstack), compressed
 for agent hosts without a full skill install. The full skills add workflows,
diff --git a/node_modules b/node_modules
new file mode 120000
index 000000000..1de79460f
--- /dev/null
+++ b/node_modules
@@ -0,0 +1 @@
+/workspace/gstack-ap/node_modules
\ No newline at end of file
diff --git a/package.json b/package.json
index 7a672be..26a9702 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "gstack",
-  "version": "1.91.268",
+  "version": "1.91.269",
   "description": "Garry's Stack — Claude Code skills + fast headless browser. One repo, one install, entire AI engineering workflow.",
   "license": "MIT",
   "type": "module",
FILES: CHANGELOG.md VERSION agents-digest/gstack-AGENTS.md package.json
MERGE_CONDITION: sha=624f0eedec7c3aebdd0cecd70be4e4ebd10eb4af
next: NEW_VERSION=1.91.269.0; commit and push only the stamp diff above (FILES), with no edit of your own: the train's verify accepts the CHANGELOG only as the base's plus this PR's entry re-headed; merge with the expected head 624f0ee and recompute on a stale queue.
GSTACK_RESULT: skill=restamp status=complete run=/workspace/gstack-ap/.gstack/tmp/restamp-journal.json

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@github-actions github-actions Bot changed the title feat(autoplan): gates print their cost, approvals mirror to the Captain's drive, Eng asks for a perf budget (GSTA-114 lane F, PR 3) v1.91.269.0 feat(autoplan): gates print their cost, approvals mirror to the Captain's drive, Eng asks for a perf budget (GSTA-114 lane F, PR 3) Oct 27, 2026
@capy-ai
capy-ai Bot merged commit 295b32e into main Oct 27, 2026
62 checks passed
garrytan added a commit that referenced this pull request Oct 27, 2026
…radius-prose-lint (rule 19 grant 3, GSTA-36)

CHANGELOG via mergeChangelogs; NOTICE.md additive (main's pstack blocks first, this PR's unslop entry after); docs/capy-install.md takes #3496's sentence with "Blast radius" added; result codes, troubleshooting anchors and the doctor-components render additive (regenerated); ship parity cap re-measured on the merged tree: 328,319 / 187,706 = 1.7491, pinned at 1.7500.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant