Skip to content

fix(review): a real bug is CRITICAL for what it breaks, not where it was found - #3668

Closed
garrytan wants to merge 6 commits into
mainfrom
gsta160-severity-floor
Closed

garrytan wants to merge 6 commits into
mainfrom
gsta160-severity-floor

Conversation

@garrytan

@garrytan garrytan commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3668,
  "head": "8c261a95ebf0c91c54c1b8a7664b01b46f0955a9",
  "version": "1.91.345.0",
  "base": "main",
  "gate": {
    "free": {
      "pass": 18852,
      "fail": 0,
      "skip": 0
    }
  },
  "session_kind": "unattended",
  "head_tree": "1f843eba38c3ba16b08a530181f9f3b6dc1705f9",
  "product_patch_id": "307e3296492f0f63d9d47ae857bb78e97201559c",
  "gstack_version": "1.91.345.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 87,
    "rules": "55726fab80631072",
    "base": "21277291c850765052ea9f80f6be4ccf1f1eb191",
    "registry": "21277291c850765052ea9f80f6be4ccf1f1eb191",
    "gate_scan": {
      "tagged": 0,
      "head": "8c261a95ebf0c91c54c1b8a7664b01b46f0955a9"
    },
    "reasons": [
      "gate-class",
      "runtime=87>50"
    ]
  },
  "pregate": "requires-remote cleared @1f843eba38c3 (7 checks, current for 8c261a95ebf0)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/41172598017/job/124453539940",
    "windows-free-tests.yml/windows-free-shard: https://github.com/garrytan/gstack/actions/runs/41172600918",
    "pregate.json/remote_gate: remote-gate tree=1f843eba38c3 tests=18852 receipt=/home/user/.capy/work/gsta160/ship1/remote-receipt.txt sha256=dfd5578b08c1"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, changed skill templates and checklists (range 21277291..939790f1)"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 3,
    "noted": 1,
    "fixed": 1,
    "scope": "frozen",
    "fix_checks": 1
  }
}

What changed

The checklist's severity section now opens with the blocking floor: a Pass 2 finding that breaks production is CRITICAL, and the pass only sets check order

The checklist's severity section now opens with the blocking floor, so a Pass 2 finding that breaks production is CRITICAL and the pass only sets check order.

Before/after as text: The checklist's severity section now opens with the blocking floor: a Pass 2 finding that breaks production is CRITICAL, and the pass only sets check order
--- Before · review/checklist.md § Severity Classification at 2127729 · source text
+++ After · review/checklist.md § Severity Classification on this branch · source text
 ## Severity Classification
+CRITICAL is the blocking floor: a finding that would fail a test, break production,
+lose data or secrets, or open a security hole (injection, auth bypass, secret exposure).
+Everything else is INFORMATIONAL.
+
+A category says what to check and in which order; it never sets severity. Rate every
+finding (core Pass 1 or Pass 2, a specialist, the Red Team) by the floor above. Gate
+Integrity: a read hunk that fails its one question is CRITICAL (the relaxation silences
+a failing gate); a hunk that passes it is not a finding.
+
 ```
+PASS 1 (check first):             PASS 2 (check second):           SPECIALIST (parallel subagents):
-CRITICAL (highest severity):      INFORMATIONAL (main agent):      SPECIALIST (parallel subagents):
 ├─ SQL & Data Safety              ├─ Async/Sync Mixing             ├─ Testing specialist
 ├─ Race Conditions & Concurrency  ├─ Column/Field Name Safety      ├─ Maintainability specialist
 ├─ LLM Output Trust Boundary      ├─ Dead Code (version only)      ├─ Security specialist

Why

"/review severity rubric demotes real bugs": on GSTA-11's 12 real gstack bugs, /review found most of them but filed them as INFORMATIONAL because the checklist section that caught them was labeled INFORMATIONAL, so they never blocked a merge. Now every reviewer rates a finding by what it breaks (a failing test, broken production, lost data or secrets, a security hole), and the category only decides what to check first.

Approvals

Approvals

Date Asked Exact words Outcome Covers Still pending
2026-10-29 Approve the plan "Plan: /review severity follows the blocking floor, not the category (GSTA-160)" (autoplan run autoplan-20261029051043, 10 decisions) “Do it. Order priority by what saves money fastest” (Garry Tan, relayed by agent:jam_01M630HP2SHT9KMT83TV15H18Z) approved the reviewed plan (sha256 e9c94fd2a7cf), every recommendation taken none
2026-10-29 Approve the plan "Plan: /review severity follows the blocking floor, not the category (GSTA-160)" (autoplan run autoplan-20261029051043, 3 decisions) “Do it. Order priority by what saves money fastest” (Garry Tan, relayed by agent:jam_01M630HP2SHT9KMT83TV15H18Z) approved the reviewed plan (sha256 e9c94fd2a7cf), every recommendation taken none
2026-10-31 Approve the plan "Plan: a targeted review pass on money, gate, auth and secret code (GST-257, GSTA-160)" (autoplan run run-20261031012536, 7 decisions) “Do it” (Garry Tan, relayed by agent:jam_01M630HP2SHT9KMT83TV15H18Z) approved the reviewed plan (sha256 92bb322c53ef), every recommendation taken none
2026-10-31 Ship the GSTA-160 severity floor although its preregistered P1 bar failed (Opus CRITICAL 4 -> 6 of 36, bar 10), with a follow-up for the should tier “do it” (Garry Tan (relayed by GStack Minder, GSTA-36)) approved P1 exception for PR gsta160-severity-floor; follow-up GST-389 none

Source: gstack-approvals record for gsta160-severity-floor (display only; not an approval citation).

Summary

A real bug now gets the CRITICAL label because of what it breaks, not because of the checklist section or reviewer lens that found it. One sentence, BLOCKING_FLOOR in scripts/resolvers/review-floor.ts, feeds the specialist schema line and the fix-check prompt, and the checklist, /review, docs/review-policy.md and docs/ship-policy.md carry it word for word. The checklist's two passes are renamed "check first" and "check second" so neither implies a severity. Shell injection now covers bash eval, source and sh -c built from outside input, a state swap before a step that can fail without rollback is a Pass 1 check (GSTA-159's miss), and the Testing specialist files a floor-level product defect as correctness so it blocks.

On the preregistered replay (prereg 4c53e80a, 144 of 144 units, $32.41 of a $45 cap), Opus 5.5 with gstack's /review prompts went from 4 to 6 CRITICAL catches out of 36 trials, and false alarms on clean decoys fell from 5 to 3 of 24 (Haiku 7 to 4). The main bar was 10 catches, so P1 failed; P2, G1 and G2 passed. Garry approved shipping below the bar with the remaining gap filed as GST-389.

Blast radius

The floor sentence reaches every /review and /ship reviewer prompt plus the four generated ship SKILL.md goldens, and five pinned reviewer briefs in test/review-packets-removed.test.ts change. That is safe because the briefs were repinned on the GSTA-160 no-loss replay that measured them (4c53e80a), and the remote free lane ran all 18852 tests at tree 1f843eba with 0 failures (script ran).

Test Coverage

All new code paths have test coverage. test/review-severity-floor.test.ts (new) checks the floor in every copy, that no checklist heading names a severity, bash shell injection, the state-swap check, and that a Testing-specialist correctness CRITICAL stays blocking through classifyFindings.
Tests ran: free 18852

Pre-Landing Review

No blocking issues found. Depth full (class=gate), 9 dispatches: five specialists returned NO FINDINGS, maintainability 2 informational, Red Team 3 informational, the adversarial voice 0 at the floor and 4 below it, and the outside voice 1 Medium (ship Step 9's pass labels). One informational fix landed in 939790f; the fix-check returned NO FINDINGS.
REVIEW_LOOP: passes=1 blocking_found=0 deferred=3 noted=1 fixed=1 scope=frozen fix_checks=1
Gate edits: none detected (listed=15 eligible=13 inspected=13 unread=0, no RH tag; the hunks are the ship goldens and the replay-cited brief repins)
Outside review: ran, 1 Medium below the floor, deferred to GST-389.

Deferred findings

  • ship/sections/review-army.md.tmpl:63 (maintainability): changes a pinned /ship brief outside the preregistered replay. GST-389.
  • scripts/resolvers/review-army.ts:321 (Red Team): the Red Team prompt change needs its own replay. GST-389.
  • capy/skill/gstack/factory.md:7 (Red Team): factory.md is at its 3,300-byte budget. GST-389.

Review notes

  • review/specialists/testing.md:7 (Red Team, unchanged code): noted, below the floor.

Eval Results

Preregistered replay 4c53e80a (paid, 144/144 units, $32.41): VERDICT FAIL on P1 only (Opus CRITICAL 4 to 6 of 36, bar 10); P2, G1 and G2 pass; held-out bugs 3 to 3. eval:bg:pr did not run: this gh account cannot dispatch the eval workflow and the local fallback has no claude CLI. The changelog.d fragment also makes the selector restore all 85 gate shards, which is the train gate's full census.

Design Review

No frontend files changed — design review skipped.

TODOS

No TODO items completed in this PR. GST-389 is added for the deferred floor items.

Documentation

Status: current. The docs match the GSTA-160 severity-floor change; no edits and no blockers.

Scope: the committed range 2127729..939790f (25 files; no staged or unstaged changes) plus the new file changelog.d/gsta160-severity-floor.md. I searched all tracked Markdown and templates for the old floor wording.

Documentation health:
docs/review-policy.md Current (carries the new floor sentence word for word)
docs/ship-policy.md Current (word for word)
review/checklist.md Current (pass headings and Severity Classification match)
review/SKILL.md.tmpl Current
ship/SKILL.md.tmpl Current (paraphrases the floor; see note)
review/specialists/testing.md Current
capy/README.md Current (quotes Garry's earlier floor wording; left as a quote)
capy/skill/gstack/factory.md Current (paraphrases the rule without the security clause; advisory)

Note: the changelog fragment says ship/SKILL.md carries the floor sentence word for word; it paraphrases it instead.

Coverage: all shipped behavior has reference coverage in docs/review-policy.md and review/checklist.md. BLOCKING_FLOOR (scripts/resolvers/review-floor.ts) is internal. No diagram drift.

Test plan

  • UBI_OWNER=gsta160 gstack-pregate --stage tests --remote --spend-cap 2 --timeout 2700 --allow-repo-commands: 18852 tests, 0 failed, tree 1f843eba ($0.07)
  • bun test test/review-severity-floor.test.ts test/capy-skill-wrapper.test.ts test/gen-skill-docs.test.ts: 539 pass, 0 fail
  • bun run typecheck: clean; bun run gen:skill-docs --host all: no diff
  • macOS named regressions and Windows free shard: dispatched at 8c261a9 (runs 41172598017, 41172600918)

🤖 Generated with Claude Code

garrytan and others added 4 commits October 31, 2026 01:11
…ass or category (GSTA-160)

The checklist bound severity to its passes (Pass 1 CRITICAL, Pass 2 INFORMATIONAL)
and the core floor had no security clause, so GSTA-11's replay saw real bugs filed
INFORMATIONAL. One floor sentence now reaches every reviewer prompt; the passes set
check order only; shell injection covers shell sinks; a state-swap-before-failure
check joins Pass 1 (GSTA-159); the Testing specialist reports a floor-level product
defect as category correctness so classify keeps it blocking.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… the verbatim-render anchor to the shortened test_stub line

Replay: GSTA-160 after-arm replay, prereg 4c53e80a (handoffs/GSTA-160/eval/verdict.json). No-loss guards G1 and G2 pass: Opus catches at any severity 16 -> 18 of 36, and decoy alerts fall. The replay rendered review/checklist.md, review/SKILL.md and review/sections/review-army.md at these bytes. The pinned review/ inputs are unchanged between its base ad8e12d and this rebase.
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…or comment names only the reviewers that carry it

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

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

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

garrytan and others added 2 commits October 31, 2026 05:52
…grant for #3668)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… 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>
@capy-ai

capy-ai Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Closing without merging. This PR's preregistered no-loss arm (GSTA-167, arm A3668, on the fixed 41-blocker panel) failed non-inferiority: it found 28 blockers to the recorded L∘G1 baseline's 33 (6 losses, 1 gain, net −5 against a margin of 4; one-sided p = 0.649). The floor sentence also didn't reduce false blockers (336 unmatched CRITICAL lines vs ~346 for the baseline). #3660, now on main, already puts the blocking floor in both reviewer voices. Results: GStack Minder drive, handoffs/GSTA-167/noloss-3668-results.md. Per the decision, this won't be rerun or reworded.

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