Skip to content

v1.92.65.0 fix(review): every reviewer brief opens with the REVIEWED_TREE step (GST-897) - #3830

Merged
capy-ai[bot] merged 5 commits into
mainfrom
gst-897-reviewed-tree-first
Nov 2, 2026
Merged

capy-ai[bot] merged 5 commits into
mainfrom
gst-897-reviewed-tree-first

Conversation

@garrytan

@garrytan garrytan commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3830,
  "head": "a60194f024a4c7ff24383a0f957ebd008b5e6a99",
  "version": "1.92.47.0",
  "base": "main",
  "gate": {
    "focused": {
      "pass": 204,
      "fail": 0,
      "skip": 0
    }
  },
  "session_kind": "unattended",
  "head_tree": "5502b91a99bd7a99b4da9967448825e4b846f785",
  "product_patch_id": "badd2200e2b381f32e8c0bff8757a847d9841191",
  "gstack_version": "1.92.47.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 35,
    "rules": "97c1e5fe49607f73",
    "base": "f5cb6ec1eb3ea25b579e022dfd735d7b452f6bb5",
    "registry": "f5cb6ec1eb3ea25b579e022dfd735d7b452f6bb5",
    "gate_scan": {
      "tagged": 0,
      "head": "a60194f024a4c7ff24383a0f957ebd008b5e6a99"
    },
    "reasons": [
      "runtime=35"
    ],
    "risk": []
  },
  "pregate": "requires-remote cleared @5502b91a99bd (1 checks, current for a60194f024a4)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/41385262853",
    "pregate.json/remote_gate: remote-gate tree=5502b91a99bd tests=3509"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, capy/skill/gstack/, CONTRIBUTING.md, AGENTS.md, CLAUDE.md, README.md (where the fingerprint request sits in the brief)"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 0,
    "fixed": 0,
    "scope": "frozen",
    "rounds": 1,
    "dispatches": {
      "specialist": 3,
      "red-team": 1
    }
  },
  "review_targeted": {
    "classes": [
      "gate"
    ],
    "rules": "baeb8f7ef7da92d0",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "badd2200e2b381f32e8c0bff8757a847d9841191",
    "status": "done",
    "findings": 0,
    "raised_by": "targeted"
  },
  "carry": {
    "from": "ed1d0556d238886cff3006a0498e6fbf05ea3626",
    "reason": "base merge + test-only change + release metadata",
    "product_patch_id": "badd2200e2b381f32e8c0bff8757a847d9841191",
    "changed_paths": [
      "product:.github/workflows/free-durations-record.yml",
      "product:.github/workflows/windows-free-tests.yml",
      "product:.github/workflows/windows-setup-e2e.yml",
      "product:.github/workflows/windows-smoke.yml",
      "product:.gstack/pregate.json",
      "product:.gstack/ship-policy.json",
      "product:AGENTS.md",
      "metadata:CHANGELOG.md",
      "product:CONTRIBUTING.md",
      "product:TODOS.md",
      "metadata:VERSION",
      "metadata:agents-digest/gstack-AGENTS.md",
      "product:autoplan/DRIVER.md",
      "product:autoplan/SKILL.md",
      "product:autoplan/bin/guard-journal.ts",
      "product:autoplan/bin/phase-publication-hook.ts",
      "product:autoplan/sections/ceo-only.md",
      "product:autoplan/sections/ceo-only.md.tmpl",
      "product:autoplan/sections/manifest.json",
      "product:bin/gstack-autoplan",
      "product:bin/gstack-autoplan-snapshot.ts",
      "product:bin/gstack-ceo-mode-handoff",
      "product:bin/gstack-doctor-components.sh",
      "product:bin/gstack-eval-plan",
      "product:bin/gstack-jsonl-merge",
      "product:bin/gstack-outside-voice",
      "product:bin/gstack-restamp",
      "product:bin/gstack-review-scope",
      "product:bin/gstack-ship-queue",
      "product:bin/gstack-ship-receipt",
      "product:captain/templates/slot-call.md",
      "product:capy/skill/gstack/SKILL.md",
      "product:docs/TESTING_INTERNALS.md",
      "product:docs/agent-ready-errors.md",
      "product:docs/autoplan-guard-troubleshooting.md",
      "product:docs/captain.md",
      "product:docs/pregate.md",
      "product:docs/review-policy.md",
      "product:docs/ship-policy.md",
      "product:docs/skills.md",
      "product:docs/troubleshooting.md",
      "product:docs/unattended.md",
      "product:eval-plan/SKILL.md",
      "product:eval-plan/SKILL.md.tmpl",
      "product:hosts/claude/hooks/timeline-stop-hook.ts",
      "product:lib/approval-citations.ts",
      "product:lib/approval-record.ts",
      "product:lib/autoplan-budget.ts",
      "product:lib/autoplan-carry.ts",
      "product:lib/autoplan-confirm.ts"
    ],
    "merge_commits": 1,
    "range_diff": "1:  0fd4df234 = 1:  0fd4df234 fix(review): open every outside-voice brief with the REVIEWED_TREE step (GST-897)\n2:  a54545e03 = 2:  a54545e03 test: register the review-wrong-tree fixtures as free (GST-897)\n3:  ed1d0556d = 3:  ed1d0556d changelog: GST-897 fragment",
    "covers": [
      "pre-landing review",
      "adversarial review",
      "gate integrity",
      "documentation audit"
    ],
    "reruns": [
      "CI at head (gstack-ship-queue ready requires it); test and helper code changed since the reviewed head runs there unreviewed"
    ],
    "ancestry": "linear",
    "trees": [
      "7f4363a4f9c490130da586e6c16a23d89a9e9be6"
    ]
  }
}

What changed

Every brief gstack-review-dispatch sends a reviewer now opens with the REVIEWED_TREE request instead of only closing with it. withWorkspace (lib/review-brief.ts) puts a new workspaceStep(dir) before the section's render and keeps the closing workspaceParagraph(dir) after it, so the render in between stays byte for byte what it was. The step says to run the fingerprint command first, says it outputs one REVIEWED_TREE: <tree hash> <path> line, and asks the reader to copy that output line, not the command, as the first line of the reply. The closing paragraph now says "(the output, not the command)". collect is unchanged: a reply without the line is still refused, and the dispatcher never stamps the tree for a reader. docs/review-policy.md item 7 describes the new order.

Before and after: the first line of the rendered outside-voice brief (gstack-review-dispatch render --role outside-voice, captured in this run):

main 35a676ff6:
Filesystem boundary: do not read or execute any files under ~/.claude/, ~/.agents/, .claude/skills/, or agents/. They hold skill definitions, not repository code to review. ...

this branch:
First step, before anything else: run `cd '/home/user/.capy/work/wt-897' && echo "REVIEWED_TREE: $(git rev-parse 'HEAD^{tree}') $(git rev-parse --show-toplevel)"`. It outputs one line, `REVIEWED_TREE: <tree hash> <path>`. Copy that output line, not the command, as the first line of your final reply, above everything else, even where this brief limits your output to findings or says how to end it; a reply without it, or from another checkout, does not count.

Collect on this branch, a reply that followed the step, then the captured GST-850 reply:

$ cat reply.txt
REVIEWED_TREE: 1bfad643f4313b44379ca15c714fb617222072b5 /home/user/.capy/work/wt-897
No blocking issues in the diff.
Recommendation: ship
$ gstack-review-dispatch collect --role outside-voice --output reply.txt ...
COLLECT: reader=outside-voice findings=0 sha256=6442bb89... merged=.../merged.jsonl
exit=0
$ gstack-review-dispatch collect --role outside-voice --output test/fixtures/review-wrong-tree/gpt-6.1-sol-gst850-p1.out ...
COLLECT_WRONG_TREE: reader=outside-voice reported="none" expected="1bfad643f4313b44379ca15c714fb617222072b5 /home/user/.capy/work/wt-897" (the reply did not review the checkout its brief named; nothing merged; ...)
exit=1

Why

GST-897, from GST-850 on GSTA-167. Two gpt-6.1-sol outside-voice readers never ran the fingerprint command. The request was only the brief's closing paragraph, after a diff of more than 700 lines and a rule that the reply ends with its Recommendation: line. collect refused both replies (COLLECT_WRONG_TREE reported="none"), so the outside voice's findings were lost. Other readers misread "the line prints" and pasted the command instead of its output.

Proof, failing first. With lib/review-brief.ts at main 35a676f, the new test in test/review-dispatch.test.ts fails because the brief's first line is "Filesystem boundary…" (GStack Minder drive, handoffs/GST-897/failing-first.txt). On this branch it checks the first line, runs the step's command and confirms checkReviewedTree accepts its output, and confirms collect still refuses both captured GST-850 replies (exit 1, COLLECT_WRONG_TREE reported="none"). The two replies are checked in as test/fixtures/review-wrong-tree/gpt-6.1-sol-gst850-p1.out and p2.out, registered in FREE_FIXTURES.

Eval

Preregistered in the GStack Minder drive: handoffs/GST-897/prereg.md and repeat-prereg.md, with results in handoffs/GST-897/noloss-results.md. Old brief = main 35a676f, new brief = 0fd4df2. The brief body this PR ships is byte-identical to 0fd4df2's; the later commits add a fixture registration and the changelog fragment.

  • Compliance (bar 3 of 3, met). gpt-6.1-sol on the re-rendered GST-850 p1 input with the new brief: 3 of 3 replies opened with the right REVIEWED_TREE line and were accepted by collect (exit 0). The first three dispatches got a brief cut short by the lane's launcher, were stopped before replying, and were sent again once with the full brief (checked by cmp). The results file reports that.
  • No-loss (preregistered one-trial rule, not met). Five judged units, two models (gpt-6.1-sol, claude-opus-5-5), blind Opus judge with a decoy that scored nothing. Losses: claude-opus-5-5 on 3593 B1 and gpt-6.1-sol on 3527 B1. Gains: gpt-6.1-sol on 3534 B3 and 3527 B3. A 3-trial repeat on the 3593 / claude-opus-5-5 cell found B1 2 of 3 times under each brief. The sixth unit (3564) was stopped under the stop rule and is unscored. No-gstack arms on the same inputs are in the results file beside each model.

Preregistered one-trial no-loss rule not met (2 single-trial flips). Pooled over 5 units × 2 models: 8 vs 8 blockers, 2 losses and 2 gains, both losses on blockers the recorded outside voice never found; both gains on blockers it found in both recorded passes. The 3593 repeat measured equal rates (2/3 vs 2/3). Accepted by GStack Minder (GSTA-36) 2026-11-02 as noise. R48 verdict FIX-METHOD for the rule, which needs a rate-based panel.

Corrected by GSTA-36 2026-11-02; original wording overstated the gains.

Spend on the eval: $31.14 of the $90 GST-897 cap.

Blast radius

  • Code: withWorkspace, workspaceStep and workspaceParagraph in lib/review-brief.ts. Every reader brief /ship dispatches gets about 500 more bytes at the front. Ledger hashes, sent checks and chunking all work on the whole rendered text, so nothing reads the old first line.
  • Tests: test/review-dispatch.test.ts (the new test, and the byte-for-byte role test now expects step + render + paragraph), test/review-pass.test.ts (each created prompt starts with the step and ends with the paragraph; the withWorkspaceTail helper is gone), test/helpers/free-fixtures-data.ts (the new fixture directory).
  • Security: none. The change is brief prose and tests only. It adds no network calls, environment reads, permission changes, workflow, setup or install edits, or dependencies.

Known limits

  • The step now comes before the defensive-security framing that ship/sections/review-army.md says the security and Red Team prompts begin with (round 1 Red Team, INFORMATIONAL, confidence 6). A refusal would come back as COLLECT_NOT_REVIEWED and cost a re-dispatch, not a silent loss. The brief bytes stay as the eval measured them, so this is an open note.
  • This PR's own review readers got their briefs from the installed gstack (main's layout), so their replies say nothing about the new step. The eval above is the evidence.

Approvals

None needed. This is a bug fix assigned by GStack Minder (GSTA-36) under GST-897, with failing-first proof and no autoplan (the Captain's ruling for a bug fix). GStack Minder accepted the no-loss result as recorded in the Eval section.

Pre-Landing Review

REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=0 fixed=0 scope=frozen dispatches=4

Gate edits: none detected (9 listed, 5 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none). No hunk was tagged; docs/review-policy.md and lib/review-brief.ts matched no gate pattern, so the scan says nothing about them, and the review readers covered them. The read hunks are the import lines and the two updated assertions in test/review-dispatch.test.ts and test/review-pass.test.ts, plus the removed withWorkspaceTail helper; each assertion now checks more of the brief, not less.

Review notes

  • One review round at the depth the classifier planned (class gate, full): batched testing, security and state-machine specialists, the Red Team, then Step 11's adversarial voice (Opus 5.5), outside voice (GPT-6.1 Sol) and targeted gate reader. verify reports every brief and output matched. Nothing reached the blocking floor, so there was no second round.
  • Red Team, INFORMATIONAL: the step now precedes the defensive-security framing paragraph. Left as an open note under Known limits, with the brief unchanged.
  • Adversarial voice, Low: asked for the no-loss evidence for a reviewer-brief change. It is in the Eval section above.
  • The Step 7 coverage audit (audit only, cannot block) mapped every changed path to a test and found no gaps.
  • Exploratory QA (Step 9.2.1) was the before and after capture in What changed: the brief's first line on main and here, and collect on a compliant reply and on the GST-850 reply.

Documentation

Scope: the diff 35a676f...HEAD (lib/review-brief.ts now opens every reviewer brief with the REVIEWED_TREE step). I searched docs/, capy/skill/gstack/ and CONTRIBUTING.md for wording about where the fingerprint request sits in the brief.

Result: current. docs/review-policy.md item 7 already describes the new order, and no other doc says the request comes last.

Debt: none.

Test plan

  • Failing first: the new test/review-dispatch.test.ts test fails on main 35a676f (the brief's first line is "Filesystem boundary…") and succeeds here.
  • Focused lane, 10 files (review-dispatch, review-dispatch-origin-base, review-pass, review-targeted, ship-driver, ship-budget-reader-drift, prose-voice-floor, module-size-ratchet, free-fixtures, test-pr-profile) with the GSTACK_* launch variables unset: 204 tests, 0 failed at a54545e.
  • bun run typecheck clean.
  • test/free-fixtures.test.ts failed on 0fd4df2 (the new fixtures were unregistered) and is green after a54545e.
  • Remote pregate (Ubicloud, UBI_OWNER=gsta234) at tree 7f4363a4: 3488 tests, 0 failed, $0.05. The VM was destroyed.
  • Base merge of main at f5cb6ec (v1.92.56.0) under GStack Minder's rule 19 grant, merge commit a60194f. The only conflict was the import block of test/review-pass.test.ts, which keeps both sides. lib/review-brief.ts and test/review-dispatch.test.ts are byte-identical to ed1d055, and docs/review-policy.md differs only by main's own item 6 edit. After the merge: focused lane 207 tests, 0 failed; typecheck clean; remote pregate at tree 5502b91a: 3509 tests, 0 failed, $0.05, VM destroyed. The receipt was carried from ed1d055 (base merge, test-only change, release metadata).
  • CI green at ed1d055 (45 succeeded, 13 skipped, none failed or pending), including the Windows shard (run 41378424275, dispatched on the branch) and the macOS named regressions (Free Tests run 41378393622).
  • CI green at a60194f (45 succeeded, 13 skipped, none failed or pending), including the macOS named regressions (Free Tests run 41385262853); the Windows Free Tests run 41385270012 on the branch also succeeded.

Disclosures

gstack is Garry Tan's own project.

Disclosure: OpenAI began through YC Research, which was started by Sam Altman, a former president of Y Combinator. Garry Tan runs Y Combinator.

garrytan and others added 3 commits November 2, 2026 01:18
…ep (GST-897)

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

trunk-io Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

…reviewed-tree-first

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

# Conflicts:
#	test/review-pass.test.ts
@github-actions github-actions Bot changed the title fix(review): every reviewer brief opens with the REVIEWED_TREE step (GST-897) v1.92.65.0 fix(review): every reviewer brief opens with the REVIEWED_TREE step (GST-897) Nov 2, 2026
@capy-ai
capy-ai Bot merged commit 0ee985b into main Nov 2, 2026
55 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.

1 participant