Skip to content

fix(review-depth): gate-class review-exclude and default-base; harness pins class as code (GST-972) - #3959

Merged
capy-ai[bot] merged 5 commits into
mainfrom
gst-972-followup-review-depth
Nov 4, 2026
Merged

capy-ai[bot] merged 5 commits into
mainfrom
gst-972-followup-review-depth

Conversation

@garrytan

@garrytan garrytan commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3959,
  "head": "07fb3ebeb6f96f32a597f6f3880e88816643339e",
  "version": "1.95.5.0",
  "base": "main",
  "gate": {
    "free": {
      "pass": 1561,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "free",
      "run": 41701136631,
      "attempt": 1,
      "tree": "6287ee3e37128c28a5ae4b6220a70f0fd8f72ad2"
    }
  ],
  "session_kind": "unattended",
  "head_tree": "831ba36c230a87c0ecf0e39ca6ce371883e2c72b",
  "product_patch_id": "1e8b3270486c220f673ab805747b642475981de8",
  "gstack_version": "1.94.24.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 21,
    "rules": "e2f876df0e87b2c3",
    "base": "46c9f612c099592e4f0fee8413a80268a3426135",
    "registry": "46c9f612c099592e4f0fee8413a80268a3426135",
    "gate_scan": {
      "tagged": 0,
      "head": "07fb3ebeb6f96f32a597f6f3880e88816643339e"
    },
    "reasons": [
      "gate-class",
      "runtime=21"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @831ba36c230a (7 checks, current for 07fb3ebeb6f9)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/41765418269/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/41765418278/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=831ba36c230a tests=35392 skipped=71 runs=41765418269/1 profiles=ci-reuse/free-tests heads=07fb3ebeb6f9 verified=2026-11-04T03:20:23.210Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "blocked",
    "scope": "docs/review-policy.md and test/fixtures/review-pins/files/lib/review-depth.ts.json changed by the main merge at 4bdd9d2 after audit gst972-docs-1",
    "exception": {
      "accepted_by": "GStack Minder",
      "date": "2026-11-03",
      "via": "GSTA-36 via parent relay",
      "reason": "docs/review-policy.md (main's auto-merge plus the GST-972 lines) and the review-depth.ts.json pin, read by the scoped fix-check at 4bdd9d2 with 0 findings, no docs re-audit"
    }
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 1,
    "fixed": 0,
    "scope": "frozen",
    "fix_checks": 2,
    "rounds": 3,
    "ledgers_read": 2,
    "dispatches": {
      "specialist": 3,
      "red-team": 1
    }
  },
  "carry": {
    "from": "4bdd9d2e01d4bb44ff31894227a0c2746f77e6ec",
    "reason": "base merge + test-only change + release metadata",
    "product_patch_id": "1e8b3270486c220f673ab805747b642475981de8",
    "changed_paths": [
      "product:.github/workflows/evals-main-backstop.yml",
      "product:.github/workflows/evals.yml",
      "product:.github/workflows/free-tests.yml",
      "product:.github/workflows/release-gate.yml",
      "product:.gstack/pregate.json",
      "product:.gstack/ship-policy.json",
      "product:AGENTS.md",
      "metadata:CHANGELOG.md",
      "product:CLAUDE.md",
      "product:CONTRIBUTING.md",
      "product:DESIGN.md",
      "product:README.md",
      "product:SKILL.md",
      "product:SKILL.md.tmpl",
      "product:USING_GBRAIN_WITH_GSTACK.md",
      "metadata:VERSION",
      "metadata:agents-digest/gstack-AGENTS.md",
      "product:autoplan/DRIVER.md",
      "product:autoplan/DRIVER.md.tmpl",
      "product:bin/gstack-capy-install",
      "product:bin/gstack-docs-candidate",
      "product:bin/gstack-doctor-components.sh",
      "product:bin/gstack-evidence",
      "product:bin/gstack-gbrain-detect",
      "product:bin/gstack-install-verdict.sh",
      "product:bin/gstack-lease",
      "product:bin/gstack-no-stop",
      "product:bin/gstack-outside-voice",
      "product:bin/gstack-release-gate",
      "product:bin/gstack-review-dispatch",
      "product:bin/gstack-review-plan",
      "product:bin/gstack-review-scope",
      "product:bin/gstack-runaway",
      "product:bin/gstack-ship-queue",
      "product:bin/gstack-ship-receipt",
      "product:bin/gstack-skill-contract",
      "product:bin/gstack-skill-start",
      "product:capy/skill/gstack/captain.md",
      "product:capy/skill/gstack/factory.md",
      "product:capy/skill/gstack/scripts/install.sh",
      "metadata:changelog.d/capy-gst-1263-release-gate-fail-closed.md",
      "metadata:changelog.d/capy-gst1245-stamp-foreign-versions.md",
      "metadata:changelog.d/gst-1028-pregate-reattach-docs.md",
      "metadata:changelog.d/gst-1204-preflight-lease.md",
      "metadata:changelog.d/gst-1204-ship-tooling.md",
      "metadata:changelog.d/gst-1219-ship-papercuts.md",
      "metadata:changelog.d/gst-1220-ubi-recovery.md",
      "metadata:changelog.d/gst-1227-post-preamble.md",
      "metadata:changelog.d/gst-1240-exit-ease-out.md",
      "metadata:changelog.d/gst-935-ubi-pack-subdir.md"
    ],
    "merge_commits": 1,
    "range_diff": "1:  cfb198cf = 1:  cfb198cf fix(review-depth): gate-class review-exclude and default-base; harness pins class as code (GST-972)\n2:  2a1f925a = 2:  2a1f925a docs(changelog): GST-972 follow-up fragment names only the readers gate class adds\n3:  30d1016b = 3:  30d1016b docs(review-policy): list review-exclude and default-base as gate paths and harness pins as code (GST-972)",
    "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": [
      "6287ee3e37128c28a5ae4b6220a70f0fd8f72ad2"
    ]
  }
}
{"head":"4bdd9d2e01d4bb44ff31894227a0c2746f77e6ec","version":"1.94.34.0","gstack_version":"1.94.24.0","review_loop":{"passes":1,"blocking_found":0,"deferred":0,"noted":1,"fixed":0,"scope":"frozen","fix_checks":2,"rounds":3,"ledgers_read":2,"dispatches":{"specialist":3,"red-team":1}},"depth":"full"}

What changed

gstack-review-plan on a scratch commit: a harness helper plus its pin now plans the code-class readers, and a review-exclude.ts edit now plans gate class at full depth. (Image render failed on this machine, PR_SHOTS_RENDER_FAILED, so the text version stands in.)

Before/after as text: gstack-review-plan on a scratch commit: a harness helper plus its pin now plans the code-class readers, and a review-exclude.ts edit now plans gate class at full depth
--- Before · before.txt · captured output
+++ After · after.txt · captured output
+== pin (this branch)
+REVIEW_CLASS: code (code: scripts/harness-pins/test/helpers/e2e-gate.ts.json)
+REVIEW_DEPTH: light runtime_lines=2 rules=859fb68cac454168 reasons=runtime=2 codes=none
-== pin (main 1ccab0d)
-REVIEW_CLASS: tests (tests: scripts/harness-pins/test/helpers/e2e-gate.ts.json)
-REVIEW_DEPTH: light runtime_lines=0 rules=19881e1ecf7ed1ad reasons=runtime=0 codes=none
-REVIEW_PLAN: class=tests pass=1 next=full dispatches=0 numbers=no fingerprint=none reason="pass 1 reviews the whole diff"
-== excl (main 1ccab0d)
-REVIEW_CLASS: code (code: lib/review-exclude.ts)
-REVIEW_DEPTH: light runtime_lines=1 rules=19881e1ecf7ed1ad reasons=runtime=1 codes=none
 REVIEW_PLAN: class=code pass=1 next=full dispatches=2 numbers=no fingerprint=none reason="pass 1 reviews the whole diff"
 DISPATCH: specialist batched effort=full checklists=testing,security,state-machines,red-team
 DISPATCH: adversarial-native adversarial effort=full reason=backtest inconclusive (GSTA-147 D5)
+== excl (this branch)
+REVIEW_CLASS: gate (code: lib/review-exclude.ts; gate path: lib/review-exclude.ts)
+REVIEW_DEPTH: full runtime_lines=1 rules=859fb68cac454168 reasons=gate-class,runtime=1 codes=none
+REVIEW_PLAN: class=gate pass=1 next=full dispatches=4 numbers=no fingerprint=none reason="pass 1 reviews the whole diff"
+DISPATCH: specialist batched effort=medium checklists=testing,security,state-machines
+DISPATCH: red-team red-team effort=full
+DISPATCH: adversarial-native adversarial effort=full
+DISPATCH: outside-voice outside-voice effort=host
 

Why

GST-972 item 4: an edit to lib/review-exclude.ts (which files reviewers never see) or lib/default-base.ts (the base every diff is cut from) planned light review with no gate class. Since #3903 (a1da77e) split harness pins into one file per harness file, a harness helper edit with its pin planned as tests with no reviewers at all. Both edits now get the review they had, or should have had.

Failing-first proof

Four new tests in test/review-depth.test.ts fail at main 1ccab0d (4 fail, 0 pass) and pass on this branch (4 pass). Logs: handoffs/GSTA-202/evidence-GST-972/followup/failing-first-{main,branch}.txt in the GStack Minder drive.

No-loss replay (GST-972)

  • Grid (committed test, GST-972 follow-up no-loss check): the GST-967 history grid over the four changed cases, 1,152 planReview cases. Stand-in paths reproduce main's plans at 1ccab0d byte for byte (sha 798e56fa…). On the real paths the branch only raises class and depth (review-exclude and default-base code/light to gate/full; helper+pin tests/light to code/light; pin alone docs/light to code/light), and drops no reviewer. One effort change: in 56 cases (28 per module), light's batched reader carried the Red Team prompt at full effort; full depth runs the checklists at the specialist effort (medium) with the Red Team as its own full-effort reader. That's 168 checklist slots, the same split every gate-class diff already gets.
  • History: the last 100 first-parent main commits to 1ccab0d × 288 histories (28,800 plans, collectCommit, scope {} and gate scan 0): 0 changed plans. The three commits touching these paths (a1da77e, 8d276f9, 14d7414) were already gate/full for other reasons.
  • lib/review-depth.ts repinned under replay GST-972; test/review-packets-removed.test.ts passes (9/9).

Blast radius

Review planning only: classifyPath, isGatePath and isDataConfig feed classifyDiff, the consumer scan in lib/review-collect.ts and the keep rules in lib/review-exclude.ts. Every change only raises a class or keeps a file in review, and the replay below shows no plan on the last 100 main commits changed (script ran: 28,800 plans compared).

Tests

Targeted: 25 review/ship test files, 790 pass, 0 fail. bun run typecheck clean; typecheck:test ratchet: none new.

Open notes

  • The 56-case effort split above. It follows from the gate-class change this fix asks for; flagged for the Captain.

Open in Capy

Approvals

Approved: yes (record r-6e3cbbcdec0c). The full approval record stays private: this repository is public or its visibility is unknown.

Captain grant, recorded verbatim (a-9d54beebf4ba): "review_loop_grant for #3959 at 30d1016: the post-Step-11 doc fix-check counts (GStack Minder, 2026-11-03)."

Captain grant, recorded verbatim (a-ec43de3234bf): "review_loop_grant by GStack Minder 2026-11-03: one scoped fix-check at 4bdd9d2 on docs/review-policy.md (main's auto-merge), the review-depth.ts.json pin and the GSTA-258-C+GST-972 replay entry. No further rounds, within the $31 cap."

Main merge: bf2cab3 merged once under GStack Minder's rule 19 grant. The only conflict was the lib/review-depth.ts pin, repinned at c7e7d71f under the combined replay GSTA-258-C+GST-972 (main's bytes plus exactly the GST-972 lines). The scoped fix-check at 4bdd9d2 found nothing.

Summary

Two review-depth bugs, both proven on main 1ccab0d before the fix.

  • Gate paths: lib/review-exclude.ts and lib/default-base.ts join GATE_PATH, so an edit plans gate class at full depth.
  • Harness pins: scripts/harness-pins/** classifies as code before the test/ rule, and joins DATA_CONFIG. The classifyPath change alone wasn't enough. On a real scratch commit, the collector's unused-data rule still turned the pin into docs, because no code names a pin file by basename. Pins outside test/ planned as docs for the same reason.
  • docs/review-policy.md and docs/ship-policy.md now list both modules as gate paths and the pins as code and config.

Failing-first proof. Four new tests in test/review-depth.test.ts fail at 1ccab0d (4 fail, 0 pass) and pass on this branch.

No-loss replay (GST-972), under GST-967's bar. The committed check runs the GST-967 history grid over the four changed cases, 1,152 planReview cases. Stand-in paths reproduce main's plans at 1ccab0d byte for byte. On the real paths the branch only raises class and depth and drops no reviewer. Over the last 100 first-parent main commits to 1ccab0d, 100 commits × 288 histories (28,800 plans), 0 plans changed. The three commits touching these paths (a1da77e, 8d276f9, 14d7414) were already gate/full.

The full-depth effort shift is accepted as no-loss (GStack Minder, 2026-11-03): it's main's existing full plan, with readers only added, no reviewer dropped, and three checklists moving into a batch that also gains a separate full-effort red team.

The shift covers 56 cases and 168 checklist slots: light's batched reader carried the Red Team prompt at full effort, and full depth runs those checklists at medium with the Red Team as its own full-effort reader. lib/review-depth.ts is repinned under replay GST-972.

Test Coverage

All new code paths have test coverage: the four failing-first tests plus the no-loss check (test/review-depth.test.ts).
Tests ran: free 1566 (files, carried from Free Tests run 41701136631 at tree 6287ee3e3712)

Pre-Landing Review

No blocking issues. One informational finding was skipped as out of scope (below).
REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=1 fixed=0 scope=frozen ledgers_read=2 fix_checks=2 dispatches=4

Gate edits: none detected (4 listed, 2 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)

Outside review: completed, no findings (openai/gpt-6.1-sol, host subagent).

Review notes

  • Other gate-signal producers aren't gate paths (Red Team and Step 11, informational). bin/gstack-diff-scope, bin/gstack-gate-diff and lib/gate-diff/* produce the auth, migration and gate-scan signals, but an edit to them still plans at light depth. This gap predates the PR and is outside the brief. It's a follow-up candidate, with its own no-loss repin.
  • Pin-only repins now plan a code reader (Step 11, low). That's how a scripts/harness-version.json edit planned before v1.94.20.0 test(review): one file per review and harness pin, so independent repins merge cleanly (GST-1084) #3903, so it costs review time and loses no coverage.
  • Wording (fix-check, nit). The class list says the pins "repeat a test/ segment", but only the pins under scripts/harness-pins/test/ do.

Exploratory QA

Smoke: bin/gstack-review-plan from main and from this branch on three scratch commits off 1ccab0d. A helper plus its pin goes from tests with 0 dispatches to code with 2. Edits to lib/review-exclude.ts and lib/default-base.ts go from code/light to gate/full with 4 dispatches. All pass on current inputs.

Design Review

No frontend files changed, so design review was skipped.

Eval Results

No prompt-related files changed, so evals were skipped.

Review bot comments

No review bot comments.

Plan Completion

Plan completion audit: not run (no plan is bound to this branch and no docs/designs/ file matches).

TODOS

No TODO items completed in this PR.

Documentation

Scope: I compared the diff against 1ccab0d (lib/review-depth.ts, docs/review-policy.md, docs/ship-policy.md, the changelog fragment) with a repo-wide grep of markdown and templates for review-exclude, default-base, harness-pins and gate-path lists.

Result: The parent's edits are accurate against the code. docs/review-policy.md lists harness-pins as code class and as a data-rule config file, and lists lib/review-exclude.ts and lib/default-base.ts among the machinery gate paths. docs/ship-policy.md updates the gate-path and config kept-reason rows. The other mentions (docs/TESTING_INTERNALS.md, docs/troubleshooting.md, docs/test-audit-2026-10.md, review-policy.md's history paragraph at line 436) describe pin storage or the review_exclude_paths digest, not the path classes, so they need no change. I made no edits.

Debt: None found.

Documentation exception: accepted by GStack Minder 2026-11-03 via GSTA-36 via parent relay: docs/review-policy.md (main's auto-merge plus the GST-972 lines) and the review-depth.ts.json pin, read by the scoped fix-check at 4bdd9d2 with 0 findings, no docs re-audit

Test plan

  • bun test test/review-depth.test.ts -t "GST-972": 5 pass (4 failing-first tests fail at 1ccab0d)
  • 25 targeted review and ship test files: 790 pass, 0 fail
  • bun test test/review-packets-removed.test.ts: 9 pass
  • bun run typecheck clean; bun run typecheck:test: none new
  • Free Tests (CI carry) at tree 70f5058e60e3: green, run 41674768930
  • Rule 25 trial merge with v1.94.30.0 review: risk-scaled review depth, today's panel by default (GSTA-258 build C) #3920 (8bdc632): one pin conflict, resolved by a repin under GSTA-258-C+GST-972; typecheck clean, 289 focused tests pass on the merged tree

garrytan and others added 2 commits November 3, 2026 15:57
…s pins class as code (GST-972)

lib/review-exclude.ts and lib/default-base.ts join GATE_PATH, so an edit to
either plans gate class at full depth. scripts/harness-pins/** classifies as
code before the test/ rule and joins DATA_CONFIG, so the unconsumed-data rule
cannot move a pin to docs. Repins lib/review-depth.ts under replay GST-972.

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

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

trunk-io Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 3 commits November 3, 2026 16:23
…hs and harness pins as code (GST-972)

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

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

# Conflicts:
#	test/fixtures/review-pins/files/lib/review-depth.ts.json
…followup-review-depth

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

# Conflicts:
#	test/fixtures/review-pins/files/lib/review-depth.ts.json
@capy-ai
capy-ai Bot merged commit 38b7a23 into main Nov 4, 2026
42 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