Skip to content

v1.91.350.0 feat(review): GSTA-167 variant G reviewer stack: blocking floor in both voices, one batched specialist, data-file classifier - #3660

Merged
capy-ai[bot] merged 11 commits into
mainfrom
gsta-167-reviewers
Oct 31, 2026
Merged

capy-ai[bot] merged 11 commits into
mainfrom
gsta-167-reviewers

Conversation

@garrytan

@garrytan garrytan commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3660,
  "head": "e8fcca5d751373e04d3cc4099d1375c74e49ed85",
  "version": "1.91.345.0",
  "base": "main",
  "gate": {
    "typecheck": {
      "pass": 1,
      "fail": 0,
      "skip": 0
    },
    "guards": {
      "pass": 28,
      "fail": 0,
      "skip": 0
    },
    "review": {
      "pass": 1135,
      "fail": 0,
      "skip": 0
    }
  },
  "session_kind": "unattended",
  "head_tree": "0eb7fe5e1baff3500bfab097a5c7be382d1eaf7d",
  "product_patch_id": "d11920ceb73cf2f17f3a8ec314fe1f25f7d06648",
  "gstack_version": "1.91.345.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 438,
    "rules": "55726fab80631072",
    "base": "4eae3ef27d0e7a3f6a10366f16cd985508df9133",
    "registry": "4eae3ef27d0e7a3f6a10366f16cd985508df9133",
    "gate_scan": {
      "tagged": 0,
      "head": "e8fcca5d751373e04d3cc4099d1375c74e49ed85"
    },
    "reasons": [
      "gate-class",
      "runtime=438>50"
    ]
  },
  "pregate": "requires-remote cleared @0eb7fe5e1baf (1 checks, current for e8fcca5d7513)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/41161914710",
    "windows-free-tests.yml/windows-free-shard: https://github.com/garrytan/gstack/actions/runs/41161914701",
    "pregate.json/remote_gate: remote-gate tree=0eb7fe5e1baf tests=19038"
  ],
  "issues": {
    "fixes": [],
    "refs": [
      3648,
      3660
    ],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, AGENTS.md, CLAUDE.md, CONTRIBUTING.md against base 2127729 (37 changed files)"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 8,
    "deferred": 0,
    "noted": 7,
    "fixed": 31,
    "scope": "frozen",
    "fix_checks": 2,
    "dispatches": {
      "specialist": 12,
      "red-team": 2
    }
  }
}

What changed

Both prose voices now carry the blocking floor and end each finding with Severity and Blocks, so a blocker no longer depends on which severity word a voice picks

Both prose voices now carry the blocking floor and end each finding with Severity and Blocks, so a blocker no longer depends on which severity word a voice picks.

Before/after as text: Both prose voices now carry the blocking floor and end each finding with Severity and Blocks, so a blocker no longer depends on which severity word a voice picks
--- Before · ship/sections/adversarial.md § Claude adversarial subagent (on `DISPATCH: adversarial-native`) at 2127729 · source text
+++ After · ship/sections/adversarial.md § Claude adversarial subagent (on `DISPATCH: adversarial-native`) on this branch · source text
@@ ⋯ 13 unchanged ⋯ @@
 
 Read the diff for this branch. First list changed files: `DIFF_BASE=$(git merge-base origin/<base> HEAD) && git diff --name-status "$DIFF_BASE"`. For NON-fixture source code, read full content: `git diff "$DIFF_BASE" -- . ':(exclude)*test*' ':(exclude)*fixture*' ':(exclude)*.spec.*'`. For fixture/test files, review in SUMMARY mode only (`git diff --stat "$DIFF_BASE" -- '*test*' '*fixture*' '*.spec.*'`) — note that they changed and what they cover, but do not pull their raw payload bytes into adversarial reasoning. State explicitly in your output that fixtures were reviewed in summary mode so the coverage reduction is visible, not silent. From Step 9's pass 2 on, `DIFF_BASE=$RANGE_BASE` applies here too; `NO FINDINGS` is the expected result for a clean range.
 
+Think like an attacker and a chaos engineer. Your job is to find ways this code will fail in production. Look for: edge cases, race conditions, security holes, resource leaks, failure modes, silent data corruption, logic errors that produce wrong results silently, error handling that swallows failures, and trust boundary violations. No compliments — just the problems. For each finding, classify as FIXABLE (you know how to fix it) or INVESTIGATE (needs human judgment). A finding blocks only if it would fail a test, break production, or lose data or secrets; end each finding with `Severity: Critical|High|Medium|Low` and `Blocks: yes|no`. After listing findings, end your output with ONE line in the canonical format `Recommendation: <action> because <one-line reason naming the most exploitable finding>` — examples: `Recommendation: Fix the unbounded retry at queue.ts:78 because it'll DoS the worker pool under sustained 429s` or `Recommendation: Ship as-is because the strongest finding is a theoretical race that requires conditions we can't trigger in production`. The reason must point to a specific finding (or no-fix rationale). Generic reasons like 'because it's safer' do not qualify."
-Think like an attacker and a chaos engineer. Your job is to find ways this code will fail in production. Look for: edge cases, race conditions, security holes, resource leaks, failure modes, silent data corruption, logic errors that produce wrong results silently, error handling that swallows failures, and trust boundary violations. No compliments — just the problems. For each finding, classify as FIXABLE (you know how to fix it) or INVESTIGATE (needs human judgment). After listing findings, end your output with ONE line in the canonical format `Recommendation: <action> because <one-line reason naming the most exploitable finding>` — examples: `Recommendation: Fix the unbounded retry at queue.ts:78 because it'll DoS the worker pool under sustained 429s` or `Recommendation: Ship as-is because the strongest finding is a theoretical race that requires conditions we can't trigger in production`. The reason must point to a specific finding (or no-fix rationale). Generic reasons like 'because it's safer' do not qualify."
 
+Present findings under an `ADVERSARIAL REVIEW (Claude subagent):` header. **FIXABLE or `Blocks: yes` findings** are CRITICAL and are queued for the parent; do not edit during Step 11. **Other INVESTIGATE findings** are informational; `Blocks: no` never lowers a FIXABLE one.
-Present findings under an `ADVERSARIAL REVIEW (Claude subagent):` header. **FIXABLE findings** are queued for the parent; do not edit during Step 11. **INVESTIGATE findings** are presented as informational.
 
 If the subagent fails or times out, record native coverage as incomplete. Continue independent passes and persistence, not release.
 

git.capy.ai
✓ Logged in to git.capy.ai account garrytan (/etc/capy/gh/hosts.yml)

  • Active account: true

This PR ships GSTA-167 variant G, the certified reviewer stack for /ship, in four parts:

  1. Blocking floor in both prose voices (part 1). The native adversarial and outside-voice prompts now say a finding blocks only if it would fail a test, break production, or lose data or secrets. Each finding ends with Severity: and Blocks: yes|no. gstack-review-dispatch collect records Blocks: yes and the native voice's FIXABLE as CRITICAL, and Blocks: no never lowers a finding.
  2. One batched specialist (part 2). One reader handles every checklist at each depth: Testing and Security always, plus State-machines, Data-migration, API-contract and Design when scope asks. Maintainability, Performance and Simplification run only when forced. The Red Team reads the batched reader's findings.
  3. Specialists at medium effort (part 3). The Red Team, native adversarial and fix-check stay at full effort.
  4. Data files and untested cells (part 4). A JSON, CSV, TSV or raster file that no code names counts as docs in classifyDiff. An untested state-matrix cell is a test gap below the floor.

Why

"Are you learning that the ship review loop is too overzealous?" Reviewers are about half the cost of a gate-class /ship, and most blockers that earlier variants missed were severity labels flipping on the same defect. The floor sentence fixes the labels at no cost, which leaves room to cut readers without losing blockers.

Certification

  • Round 5 no-loss replay: 14 PRs with 29 known blockers. The shipped stack (L∘G1) found 24 of 29 against the control C′'s 21, non-inferior at p=0.035 (handoffs/GSTA-167/noloss5-results.md). The free re-score for part 4 lost 0 blockers.
  • Round 6 no-loss replay: 41 pooled blockers (the 29 above plus GSTA-2's 12 confirmed U14 units), margin δ=4. L∘G1 found 33 against C′'s 27: 9 gains and 3 losses, non-inferior at p=0.0055, so the revert condition in its addendum is not triggered. The one new loss is gbrain-7789, the NUL bypass (outside-content.ts:65, where the neutralizer runs before NUL stripping); the other two losses carry over from round 5 (handoffs/GSTA-167/noloss6-results.md, sha256 d14544ac…).
  • Brief parity: on main plus this stack, gstack-review-dispatch render produces the certified arms' briefs byte for byte (handoffs/GSTA-167/reviewers-brief-parity.md). The /ship fixes below touch only collect and the consumer scan, never a brief.

Approvals

Date Asked Exact words Outcome Covers Still pending
2026-10-30 Ship GSTA-167 variant G (blocking floor in both voices, one batched specialist, specialists at medium, data-file classifier) “Do it” (Garry) approved variant G reviewer stack, PR #3660 none
2026-10-30 Raise the parity cap 1.3136 to 1.3180 and the eight review size pins by +537 B “parity cap 1.3136→1.3180 and +537 B on the eight review size pins approved by GStack Minder as the direct cost of part 1” (GStack Minder) approved test/helpers/carve-guards.ts maxSizeRatio, test/fixtures/skill-md-size-allowlist.json none

Source: gstack-approvals record for gsta-167-reviewers (display only; not an approval citation).

Blast radius

The change touches every /ship and /review run through the rendered briefs, gstack-review-plan, gstack-review-dispatch collect and the receipt's depth recompute. It is safe because the briefs main renders with this stack match the certified arms byte for byte (script ran: handoffs/GSTA-167/reviewers-brief-parity.md), and both no-loss replays passed on those briefs (round 5: 24 of 29 against 21, p=0.035; round 6: 33 of 41 against 27, p=0.0055).

Summary

The /ship review of this PR found that collect and the data-file consumer scan could lose a blocker, and those fixes ride here. The consumer scan now reads git grep the same way under any git config, so grep.lineNumber, grep.column or color.grep can no longer make every data file look unread. collect now joins a Severity: or Blocks: line to the finding above it, keeps an inline Blocks: yes as CRITICAL, and gives each finding its own id. When the layout is unclear, it merges findings rather than dropping one.

Test Coverage

Coverage: 92% value-weighted (92% including 0 weakly covered paths), 24 of 26 new code paths (Step 7 audit at 82777f1). Both gaps are closed now: scanConsumers's grep-failure path has a test (consumer_scan_failed), and a missing --checklists name was probed in QA (checklist not found, exit 1). Test value: 0 tests written by the audit; the /ship fixes added regression tests, and each fails at the commit before its fix and passes after it (grep config, inline Blocks: yes, paragraph and field layouts, one-line native FIXABLE).

Tests ran: typecheck count unavailable
Tests ran: guards 28
Tests ran: review 1135

Pre-Landing Review

Pass 1 (full, gate class, 6 specialists plus Red Team) found one blocker: the consumer scan failed open under grep.lineNumber/grep.column (fixed in 8fb3b41). Pass 2 on the range (6 specialists, Red Team, native adversarial, cross-family outside voice) found that the pass-1 parser rewrite could drop an inline Blocks: yes, merge separate findings, or attach a later finding's fields to an earlier one (fixed in 7a3e6d9 and a72d862). Fix-check 1 found a one-line native FIXABLE collecting below CRITICAL (fixed in 7a6de9c). Fix-check 2 came back clean.

REVIEW_LOOP: passes=2 blocking_found=8 deferred=0 noted=7 fixed=31 scope=frozen fix_checks=2 dispatches=14

Gate edits: none detected (tagged=0)

Outside review: completed by a cross-family subagent on openai/gpt-6.1-sol (no Codex CLI on this machine); 2 findings, both fixed.

Review notes

  • Noted, not fixed: the security reviewer's concern that a dynamically loaded data file (readdirSync, a glob, a template path) never matches the basename grep, so it reviews as docs (lib/review-depth.ts:137, a pinned certified file; changing it needs a no-loss replay).
  • Noted: --no-column needs git 2.19 or later; older git fails the scan closed (every data file stays code).
  • Noted: collect keeps the outside voice's High, P0 and P1 as written (main's collect keeps raw labels contract), so lead judgment still applies that half of the label rule.
  • Noted, fail closed: a line's strongest label wins, so Severity: Low (not High) collects as High; a top-level - Severity: bullet with no file:line joins the open finding; a continuation line naming another file:line, or a ratio such as 0.5:1, starts a new finding. No blocker is lost in any of these.
  • Noted: test/review-dispatch.test.ts:297's title still names the dropped explicit-Severity rule.

Exploratory QA

CLI surface, 17 probes plus 6 Blocks: variants at 82777f1 (Step 9.2.1): gstack-review-plan JSON and --force, render --checklists by name and path and its rejections, collect on JSON and prose voices, and state-matrix findings all passed. No defects were verified. The gstack-ship-preflight probe was blocked, so preflight is only partly covered; it ran end to end in this /ship's own Step 0.9.

Plan Completion

Plan items: parts 1-4 and the #3648 dispatch wiring, rebased as four commits onto main with git range-diff 4 of 4 equal; all shipped here.

Verification Results

Remote pregate at e8fcca5: 19,038 tests, 0 failed, on Ubicloud ($0.10); the macOS and Windows lanes are cleared by CI runs 41161914710 and 41161914701. CI at e8fcca5: every check passed.

Issues

Refs #3648
Refs #3660

TODOS

No TODO items completed in this PR.

Documentation

Status: current. The docs already match the change, and no edits were needed.

Scope: base 2127729 to head e8fcca5 on gsta-167-reviewers, 37 committed files, with no staged, unstaged or new files. Authored docs reviewed: docs/review-policy.md, docs/model-policy.md, docs/skills.md, capy/skill/gstack/SKILL.md, ship/sections/review-army.md.tmpl and changelog.d/gsta-167-reviewers.md, plus the generated review-army and adversarial sections. README, CONTRIBUTING, AGENTS.md and docs/ were searched for stale reviewer and effort claims, and none were found.

Documentation health:

  • docs/review-policy.md: current (batched checklists, depth table, data-file rule, effort, Blocks collection, test-gap precedence)
  • docs/model-policy.md: current (specialists at medium, tiers off covers specialists)
  • docs/skills.md: current (Step 9 names the one batched specialist)
  • capy/skill/gstack/SKILL.md: current (reader reasoning from effort=)
  • ship/sections/review-army.md.tmpl: current
  • changelog.d/gsta-167-reviewers.md: reviewed, not edited

Coverage debt: the data-file rule and the Blocks: floor have reference coverage only, with no how-to. No diagram drift was found.

Test plan

  • bun run typecheck: exit 0
  • bun test test/parity-suite.test.ts test/skill-md-size-guard.test.ts test/module-size-ratchet.test.ts test/spawnsync-timeout-tripwire.test.ts test/bun-entry-isolation.test.ts test/state-root-ratchet.test.ts: 28 pass, 0 fail
  • bun test --timeout 60000 on the 13 review, ship and skill test files: 1135 pass, 0 fail
  • UBI_OWNER=gsta167 gstack-pregate --stage tests --remote --spend-cap 2: 19,038 tests, 0 failed

garrytan and others added 5 commits October 31, 2026 01:12
…classifyDiff, untested state-matrix cells map below the floor per cell (GSTA-167 PR-a)

Part 4a: lib/review-depth.ts owns DATA_PATH (JSON, JSONL, NDJSON, CSV, TSV, raster
images; YAML, TOML and SVG stay code) and applies the data rule only in classifyDiff,
to candidates lib/review-collect.ts finds no non-docs consumer for (git grep of
basenames at head, merge base and, live, the working tree; data-to-data chains four
deep; over 2,000 candidates keeps all code; a grep failure fails closed). classifyPath
and every path-only caller are unchanged; the receipt gate scan decides through
gateScanNeeded (path-only), so it cannot be skipped. gstack-ship-preflight computes
RUNTIME_LINES with classifyDiff over gstack-review-plan --json (now with consumed).

Part 4b: lib/review-scope.ts mapStateMatrixOutput maps an "untested cell" finding to
INFORMATIONAL when its cell has test null in the same output's matrix and it is the
only finding on that cell; gstack-state-matrix findings prints it for Step 9.2 before
the merge. state-machines.md is byte-identical; check still reads the raw output.

Reviewer-brief pins repinned under no-loss replay PR-a (Arm 4: plan identity at the 14
cohort heads; free exact re-score of saved C, D and A' findings).

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…oices, specialists at medium (GSTA-167)

Part 1: the native adversarial and outside-voice prompts end with the blocking
floor ("would fail a test, break production, or lose data or secrets") and ask
each finding for Severity and Blocks: yes|no. Additive rule: a finding is
CRITICAL when its label rule says so or it says Blocks: yes; Blocks: no never
lowers one (proseVoiceSeverity, BLOCKING_FLOOR in lib/review-scope.ts).
Part 3: ROLE_EFFORT puts specialists at medium; Red Team, native adversarial
and fix-check stay full; light's batched specialist (carries the Red Team
prompt) stays full; --no-tiers sends specialists to host.

Repinned reviewer briefs with no-loss replay G1 (live Arm G1, not yet run):
ship/sections/review-army.md, ship/sections/adversarial.md,
review/sections/adversarial.md, lib/review-depth.ts. Merge only on G1's pass.
Review-skill parity ratio 1.3136 -> 1.3180 and the gstack-review size pins
+537 for the approved +0.3k tokens per voice.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… at every depth (GSTA-167)

planReview dispatches one 'specialist batched' at standard and full depth (and
light, which adds the Red Team checklist): Testing and Security always on code
and gate class, plus State-machines, Data-migration, API-contract and Design
when scope asks; a forced checklist always joins. Maintainability, Performance
and Simplification are read only when forced (SKIP names them). LIGHT_FIXED is
[testing, security]; BATCH_SCOPED joins DEPTH_RULES so old receipts re-plan.
The Red Team rule and prompt are unchanged; it reads the batched reader's
merged findings. specialistsFor stays as the legacy selection the dispatch
compare script models.

Repinned reviewer briefs with no-loss replay L (live Arm L, scored L∘G1 vs G1;
not yet run): ship/sections/review-army.md, lib/review-depth.ts. Merge only on
L's pass.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…CRITICAL, batched checklists by name (GSTA-167)

Integrates parts 1 and 2 with gstack-review-dispatch (#3648):
- lib/review-ledger.ts parseFindings: a prose voice's "Blocks: yes" makes its
  own line, or the finding on the line just before it, CRITICAL in
  merged.jsonl (normalizer v2, certified by round 5's G1), so judge refuses a
  lead that keeps it below the floor; with no finding before it the Blocks
  line is its own CRITICAL finding. "Blocks: no" never lowers a label.
- lib/review-brief.ts: the outside-voice brief no longer appends "Give each
  finding a severity"; the section's prompt now asks for Severity and Blocks,
  so the brief is the certified section prompt plus the branch diff.
- bin/gstack-review-dispatch render --checklists takes the plan's
  checklists= names (review/specialists/<name>.md) as well as paths and
  refuses an unknown one, since the batched reader is now every depth's
  specialist dispatch.

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 Oct 31, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 6 commits October 31, 2026 02:15
…ect reads separate-line Severity/Blocks

/ship pass 1 (PR #3660): the Red Team CRITICAL at lib/review-collect.ts:120 and the
informational findings in the same batch. proseVoiceSeverity had no caller and is
removed; the normalizer v2 table now runs through parseFindings, the path collect uses.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
/ship pass 2 (PR #3660): an unlabeled line carrying an inline Blocks: yes collects as
CRITICAL again; Severity/Blocks continuation needs a colon, stops at a list item, heading,
bold paragraph opener or a repeated field, and never swallows a top-level bullet or its
section label; the native voice's FIXABLE collects as CRITICAL under its role with or
without a dispatch name; the consumer scan adds --no-color.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…; explicit Severity wins its line

/ship pass 2 Red Team (PR #3660): prose after a finding's Severity/Blocks field, a
post-blank paragraph or a line in an indented block starts the next finding, and a
line's explicit Severity: label decides it over other label words on the line.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… keeps its own id and subject

/ship fix-check (PR #3660): labels are named before the strongest is taken, so a one-line
native FIXABLE ... Severity: Medium collects as CRITICAL; a later finding starts at a
file:line after the open finding's fields, field bullets stay on their finding, a field
line may omit the colon, and continuation prose never replaces a list item's subject.

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

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@github-actions github-actions Bot changed the title feat(review): GSTA-167 variant G reviewer stack: blocking floor in both voices, one batched specialist, data-file classifier v1.91.350.0 feat(review): GSTA-167 variant G reviewer stack: blocking floor in both voices, one batched specialist, data-file classifier Oct 31, 2026
@capy-ai
capy-ai Bot merged commit 8966f36 into main Oct 31, 2026
62 checks passed
garrytan added a commit that referenced this pull request Oct 31, 2026
… changed briefs under a pending GSTA-160 replay entry

The resolver floor now extends lib/review-scope.ts BLOCKING_FLOOR (the prose voices' copy) with
the security clause, so every copy contains #3660's floor words and the voices stay at G1 bytes.
fix-check carries the sentence literally for the F10 copy check. Two review-skill lines are
shortened to keep the generated SKILL.md size pins from growing.

Replay: 4c53e80a (pre-#3660 wording); GSTA-167 cohort no-loss arm on these bytes pending.
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