Skip to content

v1.92.45.0 /ship review scales to risk, with a 2-round cap (R51) - #3820

Merged
capy-ai[bot] merged 8 commits into
mainfrom
gsta-167-r51-risk-tiers
Nov 1, 2026
Merged

capy-ai[bot] merged 8 commits into
mainfrom
gsta-167-r51-risk-tiers

Conversation

@garrytan

@garrytan garrytan commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3820,
  "head": "f4cd041c3d0728491cd1aa45addffada2ab2afef",
  "version": "1.92.37.0",
  "base": "main",
  "gate": {
    "remote_gate": {
      "pass": 20548,
      "fail": 0
    }
  },
  "session_kind": "unattended",
  "head_tree": "ce52910031845795f8af2e271f3bbe4cc76c4b3e",
  "product_patch_id": "fa4b32f71b0ead3e69e973dba393307477e3a88a",
  "gstack_version": "1.92.37.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 267,
    "rules": "97c1e5fe49607f73",
    "base": "ab2852fb40219669c583f34a6f69b08f623543b4",
    "registry": "ab2852fb40219669c583f34a6f69b08f623543b4",
    "gate_scan": {
      "tagged": 0,
      "head": "f4cd041c3d0728491cd1aa45addffada2ab2afef"
    },
    "reasons": [
      "gate-class",
      "risk:money",
      "risk:secret",
      "risk:security",
      "risk:data",
      "runtime=267"
    ],
    "risk": [
      "money",
      "secret",
      "security",
      "data"
    ]
  },
  "pregate": "requires-remote cleared @ce5291003184 (1 checks, current for f4cd041c3d07)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/41345685210",
    "windows-free-tests.yml/windows-free-shard: https://github.com/garrytan/gstack/actions/runs/41345685260",
    "pregate.json/remote_gate: remote-gate tree=ce5291003184 tests=20548"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "updated",
    "scope": "docs/, README.md, AGENTS.md, CONTRIBUTING.md and the changelog fragment against base 1ea86923"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 5,
    "deferred": 0,
    "noted": 2,
    "fixed": 9,
    "scope": "frozen",
    "fix_checks": 2,
    "rounds": 4,
    "dispatches": {
      "specialist": 6,
      "red-team": 2
    }
  },
  "review_loop_exception": {
    "accepted_by": "GStack Minder (Captain)",
    "date": "2026-11-01",
    "via": "GSTA-167",
    "reason": "Captain granted one scoped fix-check after round 2 and chose scope cut A; the second fix-check reviewed de056b07, and its two findings were repaired in aecb284e, which was proved by diff and accepted by the Captain in place of another reader",
    "fix_check": {
      "head": "de056b0776e512eca9472d4b2b6aba612b217960",
      "findings": 2,
      "files": [
        "docs/review-policy.md",
        "lib/review-risk.ts"
      ]
    }
  },
  "review_targeted": {
    "classes": [
      "money",
      "secret"
    ],
    "rules": "baeb8f7ef7da92d0",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "fa4b32f71b0ead3e69e973dba393307477e3a88a",
    "status": "done",
    "findings": 0,
    "raised_by": "targeted"
  }
}

/ship review depth now follows risk instead of diff size, and a ship runs at most two review rounds. Code that touches security, user data, money, secrets, auth or the merge checks gets the full panel; other code is light at any size; docs, tests and eval write-ups get one reader. Implements Garry's R51 rule (2026-11-01).

R51 before/after
Before and after of the depth rules and round cap, with the free replay results. Why: R51 says review should scale to risk, not size.

What changed

  • lib/review-risk.ts (new) holds the money, auth and secret matchers the targeted pass already used, plus security signals (trust boundaries, shell and HTML sinks, argv shells, recursive deletes, eval) and user-data signals (persistence paths, DELETE FROM in any case, deleteMany, destroy_all).
  • lib/review-depth.ts picks the tier from the risk class. A larger diff never raises depth by itself. The depth refusal in gstack-ship-queue ready is kept.
  • Round cap: a fix-check counts as a round. A blocker open or fixed in round 2, or a round-2 fix that edits gate code, stops for the owner, who may grant one scoped fix-check. There is no round 3.
  • Receipts carry review_loop.rounds and review_depth.risk; the summary line prints rounds=.
  • ship/SKILL.md(.tmpl), the four ship goldens, docs/review-policy.md and docs/ship-policy.md describe the new tiers and cap.

Proof

Check Result Source
No-loss replay, 26-unit panel 0 historical blockers lost; u14:7789 and u14:3381 drop to light; both held blocker B1, which the adversarial-native reader still catches at light depth rules at f4cd041 (tree ce5291003184), ~/.capy/work/r51/replay.out and roles.out
Last 100 main commits ending 1ea8692 standard→full 9, light→full 3, standard→light 8; risky commits moving down 0; reviewer roles 382→386 estimate from replaying the depth rules at f4cd041, ~/.capy/work/r51/hist.json
Remote pregate at f4cd041 (tree ce5291003184) 20,548 tests, 0 failed, $0.07 PREGATE_REMOTE: tree=ce52910031845795f8af2e271f3bbe4cc76c4b3e tests=20548 failed=0 spent=0.07
Guard checks at f4cd041 typecheck clean; skill docs fresh; parity, module-size, skill-md-size, skill-size-budget, catalog, context-budget, review-packets-removed, spawnsync tripwire: all 33 green local

The replay is a free routing re-score of the depth rules, not a live preregistered no-loss replay with model reviewers.

Scope cut (Captain choice A)

The UI-text and chart-SVG light paths were removed after the round-2 voices found namespaced <s:script> SVG and Vue :title bypasses. UI text and SVG stay code-tier for now. GSTA-2's SVG and write-up input (gstack-evals#113) is deferred to an allowlist classifier follow-up, GST-850.

Review loop

Review-loop exception: accepted by GStack Minder (Captain) 2026-11-01 via GSTA-167: Captain granted one scoped fix-check after round 2 and chose scope cut A; the second fix-check reviewed de056b0, and its two findings were repaired in aecb284, which was proved by diff and accepted by the Captain in place of another reader (fix-check at de056b0, 2 findings)

The second fix-check reviewed de056b0. Its two findings were repaired in aecb284, which no reader reviewed: the repair was proved by diff and accepted by the Captain in place of another reader.

Open notes (below the blocking floor, not fixed)

  • The rm/argv matchers miss rm -Rf, split flags (rm -r -f), fs.rm and the env wrapper.
  • No collector test for created (likely moot now: lib/review-collect.ts is reverted to main under choice A).
  • Outside voice (Medium, marked blocking): Node exec from a named node:child_process import (import { exec } from "node:child_process") is not matched as a shell sink. The Captain accepted it as a known gap for GST-850.
  • Adversarial: preflight RUNTIME_LINES can disagree with the planner's classification.
  • Adversarial: receipts already in flight when this lands may get DEPTH_RAISED on ready and need a re-review.

Merge order

Merges only after #3696 and #3698 land (#3803 landed as 216493f). #3702 conflicts in docs/review-policy.md, lib/review-depth.ts (DEPTH_RULES), test/review-depth.test.ts, test/review-packets-removed.test.ts and test/review-targeted.test.ts: the second PR to land rebases, unions DEPTH_RULES and repins under its replay, and R51's full panel follows main's first-pass Red Team rule.

Documentation

Scope: the committed diff on gsta-167-r51-risk-tiers (27 files, base 1ea8692) plus the docs that mention review depth, round caps and receipts. Result: docs/review-policy.md and the changelog fragment already cover the R51 tiers, risk classes, 2-round cap and receipt fields. One stale claim fixed in docs/ship-policy.md (review-loop item 3): it said "Two full passes plus one fix-check", and now says two rounds, with a fix-check counting as a round and the owner able to grant one scoped fix-check. Debt: none found. ship/sections/review-army.md.tmpl only names the fix-check step and carries no stale cap text.

Approvals

Date Asked Exact words Outcome Covers Still pending
2026-11-01 Approve the plan "R51: /ship review scales to risk, not size" (autoplan run autoplan-20261101163538, 5 decisions) “Run /autoplan sized small: one round, recommended answers taken, since Garry already approved the principle.” (Garry, relayed by agent:GSTA-167) approved the reviewed plan (sha256 82787cf36bb8), every recommendation taken none
2026-11-01 Grant one scoped fix-check on 170d0e0 and raise the lane cap “The Captain approved both asks: One scoped fix-check on 170d0e0 (the joined-file SVG attribute fix) is granted. Your cap rises from $250 to $320 (root counter).” (GStack Minder (Captain, via GSTA-167)) approved PR for gsta-167-r51-risk-tiers: one scoped fix-check after round 2; lane spend cap $320 none
2026-11-01 Choose how to handle the Step 11 UI-text and SVG bypasses (A: cut the paths) and raise the lane cap “The Captain chose A and raised your cap to $340 (root counter).” (GStack Minder (Captain, via GSTA-167)) approved remove uiTextOnly and chartSvg; a round-2 gate edit stops for the owner; close the SQL case gap; one scoped fix-check; lane cap $340 none
2026-11-01 Repair the fix-check's two findings with a diff proof instead of another reader, and raise the lane cap “The Captain approved the diff-proved repair and raised your cap to $370 (root counter).” (GStack Minder (Captain, via GSTA-167)) approved restore docs/review-policy.md from 170d0e0 keeping only the intended edits; restore the case-sensitive DELETE FROM alternative with five spelling tests; no further reader; lane cap $370 none
2026-11-01 Fund a record and audit pass at f4cd041 (targeted reader rerun, cross-family trail review) “The Captain approved a cap of $420 (root counter) for a record and audit pass. This is not a third review round.” (GStack Minder (Captain, via GSTA-167)) approved targeted reader rerun bound to the receipt, gpt-6.1-sol trail review, Approvals edit, ready rerun; no code changes; lane cap $420 none

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

Deferred to GST-850: CEO F2 (SSRF, archive and path traversal signals) and both GSTA-2 inputs (the SVG classifier and the write-up path).

garrytan and others added 8 commits November 1, 2026 19:00
…R51, GSTA-167)

Non-risky code is light at any size; a risk class (money, auth, secret,
security, user data) or gate code makes it full. UI or game text counts as
docs. A fix-check counts as a round and round 2 never earns a third. The
receipt records review_loop.rounds and review_depth.risk.

Repins lib/review-depth.ts and pins lib/review-risk.ts under no-loss replay
R51 (test/review-packets-removed.test.ts): the saved panel findings re-scored
against this plan lose no blocker, and every gate, security, user-data and
money fixture keeps main's reviewers plus the full panel.

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>
… owner; SQL deletes match in any case (R51, Captain choice A)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…epair, Captain grant)

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 1, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

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