Skip to content

v1.91.299.0 fix(owner-brief): Captain brief resolves rec like gstack-gate render when a gate carries decisions (#3546) - #3549

Merged
capy-ai[bot] merged 4 commits into
mainfrom
capy/gsta-141-owner-brief-carried
Oct 28, 2026
Merged

capy-ai[bot] merged 4 commits into
mainfrom
capy/gsta-141-owner-brief-carried

Conversation

@garrytan

@garrytan garrytan commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3549,
  "head": "b058319c3119eaa896f8a0a653635972025a6086",
  "version": "1.91.295.0",
  "base": "main",
  "gate": {
    "remote_gate": {
      "pass": 11190,
      "fail": 0,
      "skip": 0
    },
    "captain-brief": {
      "pass": 11,
      "fail": 0,
      "skip": 0
    }
  },
  "session_kind": "unattended",
  "thread": "GSTA-141",
  "queue_mode": "stamp-at-merge",
  "pregate": "requires-remote cleared @83897c46d827 (1 checks, current for b058319c3119)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/40719950503",
    "windows-free-tests.yml/windows-free-shard: https://github.com/garrytan/gstack/actions/runs/40719950273",
    "pregate.json/remote_gate: remote-gate tree=83897c46d827 tests=11190"
  ],
  "issues": {
    "fixes": [
      3546
    ],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "capy/skill/gstack/captain.md (Captain brief shape: 'lists every choice rec takes'), docs/unattended.md#owner-brief, captain/templates/plan-ask.md, README.md, AGENTS.md: no doc describes the per-choice wording or the rec tokens this fix changes"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 2,
    "deferred": 1,
    "noted": 3,
    "fixed": 3,
    "scope": "frozen",
    "dispatches": {
      "specialist": 7,
      "red-team": 1
    }
  }
}

What changed

At a cap gate with carried decisions, the Captain brief now resolves rec to the carried d1b–d4b, matching gstack-gate render, instead of telling the owner d1a–d4a

At a cap gate with carried decisions, the Captain brief now resolves rec to the carried d1b–d4b, matching gstack-gate render, instead of telling the owner d1a–d4a.

Before/after as text: At a cap gate with carried decisions, the Captain brief now resolves rec to the carried d1b–d4b, matching gstack-gate render, instead of telling the owner d1a–d4a
--- Before · before.txt · captured output
+++ After · after.txt · captured output
 $ gstack-gate render gate.json --all | tail -1   # same gate
 Reply binds to gate_rev=2 rec_hash=594cc2f636ac. `rec` resolves to: {"gate_rev":2,"choices":{"d1":"b","d2":"b","d3":"b","d4":"b","uc1":"a","uc2":"a","p1":"a"}}
 
+$ gstack-owner-brief render --captain --out <run>   # this branch
+- **rec (recommended):** approve the plan as reviewed, taking these answers:
+  1. Use a queue table: make the reviewer's change (your answer at gate_rev 1, carried forward).
+  2. Add metrics: make the reviewer's change (your answer at gate_rev 1, carried forward).
+  3. Drop jitter: make the reviewer's change (your answer at gate_rev 1, carried forward).
+  4. Log every retry: make the reviewer's change (your answer at gate_rev 1, carried forward).
+rec resolves to d1b d2b d3b d4b uc1a uc2a p1a
-$ gstack-owner-brief render --captain --out <run>   # main 61e201e
-- **rec (recommended):** approve the plan as reviewed, taking these recommendations:
-  1. Use a queue table: keep the plan as written (a reviewer suggested changing it).
-  2. Add metrics: keep the plan as written (a reviewer suggested changing it).
-  3. Drop jitter: keep the plan as written (a reviewer suggested changing it).
-  4. Log every retry: keep the plan as written (a reviewer suggested changing it).
-rec resolves to d1a d2a d3a d4a uc1a uc2a p1a
 

Why

"A Captain relaying the brief would tell Garry the opposite of what his one-word reply does" (GSTA-3, autoplan run autoplan-20261028004737 on 1.91.284.0; reproduced on main 1.91.295.0 in #3546). At a gate after the owner already answered some items, such as a round-cap gate, gstack-owner-brief render --captain listed each item's recommendation while gstack-gate render and gstack-autoplan answer --reply rec keep the carried answer. The brief now says what rec will record.

Blast radius

Only lib/captain-brief.ts changes, and only for gates where rec keeps an earlier answer (a carried item, or an item already answered at this gate): the per-choice words, the header, the change-something example, the do-it line and the relaying agent's rec resolves to tokens. It calls parseReply (the resolver gstack-gate render uses) with priorChoices (the filter gateCost and answerGate use), so a gate with no earlier answers renders byte-for-byte as before; the existing test/captain-brief.test.ts cases pass unchanged (rung: focused tests plus a real fixture run through gstack-autoplan).

Approvals

No approvals recorded for branch capy/gsta-141-owner-brief-carried.

Summary

  • Fix: the Captain brief resolves rec through parseReply('rec', gate, _, priorChoices(...)) instead of each item's recommended; kept items are marked (your answer at gate_rev N, carried forward) or (your answer at this gate).
  • Tests: test/captain-brief.test.ts drives a fixture autoplan run (--max-rounds 1, three challenges answered b, revise hits the cap) to a gate_rev 2 cap gate and asserts both CLIs give the same rec resolution and choice labels; a second case checks the brief against what answer --reply rec records after a partial answer; the negative control strips the carried decisions. Both new positive cases fail on main.

Note: gstack-gate render still ignores answers recorded at the same gate (it reads gate.json alone), so after a partial reply the two renders differ and the brief is the correct one; filed as #3548.

Deferred findings

Blocking findings in code this PR did not change (review scope: frozen); filed as issues and not closed by this PR.

Review notes

Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.

  • INFORMATIONAL lib/captain-brief.ts:72 pending only checks p1's row; a recorded p1c (interrogate) leaves the gate pending but the brief says Nothing pending (pre-existing)

Fixes #3546
Refs #3548

Open in Capy

garrytan and others added 3 commits October 28, 2026 15:38
…so carried decisions match gstack-gate render (#3546)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… this gate, as answer --reply rec does

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

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

trunk-io Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

@github-actions

Copy link
Copy Markdown
Contributor

E2E Evals: ✅ PASS

[test:paid] VERDICT GREEN — lane gate/pr, attempt 1
  rule 112/112 · behavior 1/1 · judge 24/24 · quarantined 0 (0 failing the lane)
  SKIPPED 0 · INFRA 0 · INCOMPLETE 0 · unattributed 0 · ACTION REQUIRED 0
  wall 6m08s · cost $33.71 known + 32 of 139 trial(s) cost unknown

125 executed, 0 reused rule/judge records | 0 manual accepted (unscored; no score-cache credit) | $33.03 rule/judge cost | reconcile exit: 0

Profile: pr / mode dependents; selected behaviors: 113, judges: 24. Deferred to scheduled/release coverage: 142 behaviors and 0 changed prompt files. Deferred checks did not run and receive no PR-pass credit.

Derived dependents (scripts/pr-dependencies.ts):

  • lib/captain-brief.ts: 255 case(s), 24 judge(s)
Rule and judge shards
Shard Automated result Manual/unscored Executed Reused Status Cost
llm-judge/skill-llm-eval 24/24 0 24 0 ✅ $1.44
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-current 1/1 0 1 0 ✅ $0.99
e2e/skill-e2e-coverage-audit 2/2 0 2 0 ✅ $0.28
e2e-deploy/skill-e2e-deploy--setup-deploy-workflow 1/1 0 1 0 ✅ $0.11
e2e-qa-functional-fix/skill-e2e-qa-functional-fix 2/2 0 2 0 ✅ $0.96
e2e/skill-e2e-plan--plan-review-report 1/1 0 1 0 ✅ $1.09
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-unavailable 1/1 0 1 0 ✅ $0.77
e2e-retro/skill-e2e-retro 1/1 0 1 0 ✅ $0.33
e2e/skill-e2e-shared-libs-paths--shared-libs-review-prior-coverage 1/1 0 1 0 ✅ $0.93
e2e-qa-workflow/skill-e2e-qa-workflow--qa-quick 1/1 0 1 0 ✅ $0.51
e2e-review-attribution/skill-e2e-review-attribution 3/3 0 3 0 ✅ $0.28
e2e/skill-e2e-ship-skip 1/1 0 1 0 ✅ $0.24
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-stale-before 1/1 0 1 0 ✅ $0.42
e2e/skill-e2e-shared-libs--shared-libs-review-lifecycle 1/1 0 1 0 ✅ $0.92
e2e-review-army/skill-e2e-review-army--review-army-migration-safety 1/1 0 1 0 ✅ $0.32
e2e-deploy/skill-e2e-deploy--land-and-deploy-first-run 1/1 0 1 0 ✅ $0.32
e2e/skill-e2e-shared-libs--shared-libs-read-only 1/1 0 1 0 ✅ $0.26
e2e-deploy/skill-e2e-deploy--land-and-deploy-review-gate 1/1 0 1 0 ✅ $0.22
e2e-docsync-spawned/skill-e2e-docsync-spawned 1/1 0 1 0 ✅ $0.72
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-stale-after 1/1 0 1 0 ✅ $0.41
e2e-safety-codex-consult/skill-e2e-safety-codex-consult 1/1 0 1 0 ✅ $0.24
e2e-deploy/skill-e2e-deploy--land-and-deploy-workflow 1/1 0 1 0 ✅ $0.61
e2e/skill-e2e-workflow 4/4 0 4 0 ✅ $0.88
e2e-review-army/skill-e2e-review-army--review-army-perf-n-plus-one 1/1 0 1 0 ✅ $0.23
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-late-result 1/1 0 1 0 ✅ $0.35
e2e/skill-e2e-shared-libs-paths--shared-libs-review-index-flags 1/1 0 1 0 ✅ $0.95
e2e-deploy/skill-e2e-deploy--benchmark-workflow 1/1 0 1 0 ✅ $0.24
e2e/skill-e2e-investigate-owned-completion 1/1 0 1 0 ✅ $0.07
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-small-cli 1/1 0 1 0 ✅ $0.78
e2e-review-army/skill-e2e-review-army--review-army-json-findings 1/1 0 1 0 ✅ $0.07
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-store 1/1 0 1 0 ✅ $0.93
e2e-triage/skill-e2e-triage 1/1 0 1 0 ✅ $0.08
e2e-review-army/skill-e2e-review-army--review-army-delivery-audit 1/1 0 1 0 ✅ $0.16
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-timeout-unsettled 1/1 0 1 0 ✅ $0.18
e2e-design/skill-e2e-design--design-review-detector-shim 1/1 0 1 0 ✅ $0.12
e2e-session-intelligence/skill-e2e-session-intelligence 4/4 0 4 0 ✅ $0.31
e2e-safety-pair-agent/skill-e2e-safety-pair-agent 1/1 0 1 0 ✅ $0.1
e2e-plan-tune/skill-e2e-plan-tune 1/1 0 1 0 ✅ $0.13
e2e-qa-workflow/skill-e2e-qa-workflow--qa-bootstrap 1/1 0 1 0 ✅ $0.07
e2e-deploy/skill-e2e-deploy--canary-workflow 1/1 0 1 0 ✅ $0.12
e2e/skill-e2e-investigate-owned-termination 2/2 0 2 0 ✅ $0.18
e2e/skill-e2e-ship-hook-refresh 1/1 0 1 0 ✅ $0.1
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-launch-failure 1/1 0 1 0 ✅ $0.16
e2e-design/skill-e2e-design--plan-design-review-no-ui-scope 1/1 0 1 0 ✅ $0.08
e2e-third-party-actions/skill-e2e-third-party-actions 5/5 0 5 0 ✅ $0.44
e2e/skill-e2e-ship-hook-consent 2/2 0 2 0 ✅ $0.25
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-recovery 1/1 0 1 0 ✅ $0.39
e2e/skill-e2e-shared-libs--shared-libs-review-revalidation 1/1 0 1 0 ✅ $1.93
e2e-review/skill-e2e-review 2/2 0 2 0 ✅ $0.35
e2e-cso/skill-e2e-cso 1/1 0 1 0 ✅ $0.42
e2e-qa-functional/skill-e2e-qa-functional 2/2 0 2 0 ✅ $0.77
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-late-input 1/1 0 1 0 ✅ $0.96
e2e-learnings/skill-e2e-learnings 1/1 0 1 0 ✅ $0.07
e2e-failure-routing/skill-e2e-failure-routing 4/4 0 4 0 ✅ $0.44
e2e-qa-workflow/skill-e2e-qa-workflow--qa-only-no-fix 1/1 0 1 0 ✅ $0.52
e2e-qa-callers/skill-e2e-qa-callers--review-exploratory-small-cli 1/1 0 1 0 ✅ $0.72
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-plan-checks 1/1 0 1 0 ✅ $0.79
e2e/skill-e2e-test-value 3/3 0 3 0 ✅ $0.81
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-failure 1/1 0 1 0 ✅ $0.68
e2e-skillify/skill-e2e-skillify 3/3 0 3 0 ✅ $0.82
e2e/skill-e2e-shared-libs-paths--shared-libs-review-path-eligibility 1/1 0 1 0 ✅ $1.46
e2e-hermetic/skill-e2e-hermetic-canary 2/2 0 2 0 ✅ $0.04
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-completion 1/1 0 1 0 ✅ $0.89
e2e-design/skill-e2e-design--design-review-plugin-handoff 1/1 0 1 0 ✅ $0.13
e2e-review-army/skill-e2e-review-army--review-army-quality-score 1/1 0 1 0 ✅ $0.1
e2e-design/skill-e2e-design--design-review-detector-shim-dom 1/1 0 1 0 ✅ $0.22
e2e-safety-ship-evidence/skill-e2e-safety-ship-evidence 1/1 0 1 0 ✅ $0.12
e2e-browse/skill-e2e-bws 6/6 0 6 0 ✅ $0.31
e2e/skill-e2e-shared-libs--shared-libs-unsupported-git 1/1 0 1 0 ✅ $0.22
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-missing-asset 1/1 0 1 0 ✅ $0.36
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-missing-marker 1/1 0 1 0 ✅ $0.16
Fail-closed reconciliation
e2e-plan-devex-plan-mode.test.ts
  slice 15  passed             32s  test/skill-e2e-safety-ship-evidence.test.ts
  slice 15  passed             56s  test/skill-e2e-design.test.ts#design-review-detector-shim-dom
  slice 15  passed             65s  test/skill-e2e-shared-libs.test.ts#shared-libs-unsupported-git
  slice 15  passed             37s  test/skill-e2e-office-hours-auto-mode.test.ts
  slice 15  passed             36s  test/skill-e2e-design.test.ts#design-review-plugin-handoff
  slice 15  passed             48s  test/skill-e2e-bws.test.ts
  slice 15  passed             25s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-missing-marker
  slice 15  passed             22s  test/skill-e2e-review-army.test.ts#review-army-quality-score
  slice 16  passed             48s  test/skill-e2e-third-party-actions.test.ts
  slice 16  passed             26s  test/skill-e2e-plan-tune.test.ts
  slice 16  passed             18s  test/skill-e2e-triage.test.ts
  slice 16  passed             31s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-timeout-unsettled
  slice 16  passed             36s  test/skill-e2e-ask-user-question-format-compliance.test.ts
  slice 16  passed             24s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-launch-failure
  slice 16  passed             31s  test/skill-e2e-session-intelligence.test.ts
  slice 16  passed             40s  test/skill-e2e-ship-hook-consent.test.ts
  slice 16  passed             24s  test/skill-e2e-investigate-owned-termination.test.ts
  slice 16  passed             23s  test/skill-e2e-design.test.ts#design-review-detector-shim
  slice 16  passed             24s  test/skill-e2e-deploy.test.ts#canary-workflow
  slice 16  passed             29s  test/skill-e2e-ship-hook-refresh.test.ts
  slice 16  passed             15s  test/skill-e2e-design.test.ts#plan-design-review-no-ui-scope
  slice 16  passed             37s  test/skill-e2e-review-army.test.ts#review-army-delivery-audit
  slice 16  passed             26s  test/skill-e2e-safety-pair-agent.test.ts
  slice 16  passed             23s  test/skill-e2e-qa-workflow.test.ts#qa-bootstrap
  slice 17  passed             13s  test/skill-e2e-learnings.test.ts
  slice 17  passed             17s  test/skill-e2e-diagram.test.ts
[test:paid] collector final outcomes: 125 executed, 0 reused; 125 passed, 0 failed, 0 manual accepted (unscored; no score-cache credit) (125 attempt records from 71 collectors; every record counts)
[test:paid] deselected testcases, zero credit (316):
[test:paid]    302  sibling case of a case shard (its own shard runs it)
[test:paid]      8  periodic-tier case (this lane runs gate)
[test:paid]      6  Bun hook placeholder of a skipped describe block (not a test)
[test:paid] VERDICT GREEN — lane gate/pr, attempt 1
  rule 112/112 · behavior 1/1 · judge 24/24 · quarantined 0 (0 failing the lane)
  SKIPPED 0 · INFRA 0 · INCOMPLETE 0 · unattributed 0 · ACTION REQUIRED 0
  wall 6m08s · cost $33.71 known + 32 of 139 trial(s) cost unknown
[test:paid] exercised-path map (shadow, non-blocking): 5 MAP_GAP line(s) over 105 executed case(s) with recorded commands
  MAP_GAP document-release bin/gstack-banned-terms: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
  MAP_GAP plan-review-report bin/gstack-plan-reality: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
  MAP_GAP plan-review-report browse/dist/browse: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
  MAP_GAP plan-review-report design/dist/design: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
  MAP_GAP timeline-event-flow bin/gstack-skill-end: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
[test:paid] report: every planned shard accounted and passed

Sliced 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 5f34275fa8e01736758dce92c19cc358c5c7e198.

…rief-carried

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

# Conflicts:
#	CHANGELOG.md
@github-actions github-actions Bot changed the title fix(owner-brief): Captain brief resolves rec like gstack-gate render when a gate carries decisions (#3546) v1.91.299.0 fix(owner-brief): Captain brief resolves rec like gstack-gate render when a gate carries decisions (#3546) Oct 28, 2026
@capy-ai
capy-ai Bot merged commit 4c745ee into main Oct 28, 2026
63 checks passed
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.

owner-brief --captain ignores carried decisions: brief's rec contradicts gstack-gate render at cap gates

1 participant