Repository navigation
v1.91.358.0 review: targeted read-only pass on money, gate, auth and secret code (GST-257 part 1, report-only) - #3671
Merged
Merged
Conversation
… (GST-257 part 1, report-only) lib/review-targeted.ts classifies a diff's added and deleted lines into money, gate, auth and secret (token-bounded, docs and tests excluded, fails closed to all four). gstack-review-plan prints TARGETED and dispatches one read-only targeted reader at full effort when a class hits; review/specialists/targeted.md is its brief. The receipt records review_targeted bound to product_patch_id, a carry keeps it, and gstack-ship-queue ready / train build print a report-only REVIEW_TARGETED line that refuses nothing. No-loss evidence: the dispatch-superset test in test/review-targeted.test.ts runs gstack-review-plan on 18 fixture diffs and requires every reviewer main dispatched at 8be7f21, unchanged, plus only the targeted reader. Brief identity: gstack-review-dispatch render on this tree and origin/main 2356792 gives 13 of 13 existing reviewer briefs byte-identical (handoffs/GSTA-160/gst257-briefcmp/SUMMARY.txt). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… binds the diff it read, role list pin) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ecord test Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… Step 11 says the merge base; docs gate-path list Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
garrytan
added a commit
that referenced
this pull request
Oct 31, 2026
…he targeted reader with the voices Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This was referenced Oct 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Step 11 now also runs the read-only targeted reader when the review plan prints
DISPATCH: targeted(money, gate, auth or secret code), on the merge base every pass.verify --targeted-outfeeds the receipt'sreview_targeted. No other reviewer brief changed: 13 of 13 render byte-identical to main (see Verification).lib/review-targeted.ts(new) names the classes a diff touches from added and deleted lines: money, gate (the gate scan's tagged hunks), auth (SCOPE_AUTHon an auth path) and secret. It is token-bounded, skips docs and tests, and fails closed to all four classes.gstack-review-planprintsTARGETED: classes=… rules=… brief=… targeted_patch_id=…and, on a class hit,DISPATCH: targeted targeted effort=fullat every depth;--targeted-ran <id>skips it only for the same whole diff.review/specialists/targeted.md(new) is the reader's brief: one block per class, the blocking floor, and the checklist's Forced-CRITICAL uncapped-spend rule.gstack-review-dispatch render --role targeted/verify --targeted-out, andgstack-ship-receipt write --review-targetedstorereview_targeted; a carry keeps it.gstack-ship-queue readyandtrain buildprintREVIEW_TARGETED: required=… receipt=… verdict=ok|missing. Nothing refuses on it in this PR.Why
Review depth decides how many reviewers read a diff, but not whether anyone reads the money, gate, auth or secret code with that code in mind. GST-257 adds one read-only reader with a short brief for exactly those hunks. This is PR 1 of 2: it writes and reports the record so we can measure it; PR 2 makes the queue refuse READY receipts without it.
Blast radius
review_targetedfield; receipts without it readlegacy. Queue output gains one line. No exit code changes.lib/review-depth.tsandship/sections/adversarial.mdare repinned intest/review-packets-removed.test.tsunder the GST-257 replay.Approvals
Source: gstack-approvals record for gst-257-targeted-review (display only; not an approval citation).
Summary
Plan: GST-257 autoplan run-20261031012536 (approved, gate_rev 2). Writer half only.
Test Coverage
test/review-targeted.test.ts(15 tests): classes with deleted lines, token boundaries, docs/tests exclusions, fail-closed, the dispatch at light/standard/full,--targeted-ran(same diff, test-only gate fix, dirty tree), the production path render → sent → collect → judge → verify → write → summary →REVIEW_TARGETED(including a later commit and a dirty tree turning the recordfailed, and the merge-base guard), carry, and attribution. No-loss evidence: its dispatch-superset test runsgstack-review-planon 18 fixture diffs and requires every reviewer main dispatched, unchanged, plus only the targeted reader. Coverage audit: 83% of changed paths (gaps: queue-line wiring inready()/train,AUTH_PATH_PREFIXESnow covered).Pre-Landing Review
REVIEW_LOOP: passes=2 blocking_found=0 deferred=0 noted=1 fixed=6 scope=frozen
Pre-Landing Review: full depth (gate class). Pass 1: batched specialist (testing, security, api-contract, state-machines), Red Team, coverage audit, core checklist. Pass 2 on the range: batched specialist, Red Team. Fix-check, then Step 11: native adversarial (Opus) and outside voice (GPT-6.1 Sol, a Capy subagent; the Codex CLI is not available here). What was fixed and what was noted is listed under Review notes. Two deviations: pass 2's two below-floor findings and the fix-check's two were fixed rather than only noted, because PR 2 depends on that record; and pass 2's Red Team got pass 1's findings, not pass 2's specialist output, so the two ran in parallel.
Gate edits: 5 listed, 3 read, 0 findings (the two repins in
test/review-packets-removed.test.ts, justified by the dispatch-superset test and the brief identity check, and the role-list pin intest/ship-budget-chain.test.ts).Review notes
Below the blocking floor today, because
REVIEW_TARGETEDonly reports in this release. The review loop stopped at its cap (frozen scope, pass 3), so these are named here, not fixed. Items 1 to 6 must be fixed before PR 2 starts refusing on the line.lib/ship-receipt-depth.ts:132(outside voice and native adversarial, both): an exported--targeted-outrecord carries no patch identity, sowrite --review-targeted @old.jsonbinds a stale record to a later product patch. Fix: carry the read patch in the record and compare at write.ship/DRIVER.md.tmpl(adversarial, outside the diff): the driver's Step 11.5verifycall does not pass--targeted-out, so a record written later, after the VERSION, CHANGELOG and docs commits, readsfailed.lib/review-brief.ts:124(outside voice):render --role targetedhonors--exclude, so the reader could skip the very file its record covers.lib/review-targeted.ts:87(outside voice): a Git-quoted filename leaves the added/removed line maps keyed differently frompaths, so line classes miss without failing closed.bin/gstack-review-dispatch:152(adversarial):verifywritesdoneeven whenVERIFY: dirty, and leaves an old--targeted-outfile in place when the ledger has no targeted render.lib/review-targeted.ts:70,72(adversarial): pass the ledger's diff base after--end-of-options, and report git older than 2.39 the way carry does (RECEIPT_GIT_TOO_OLD) instead of quietly returningnone.bin/gstack-ship-receipt:214(adversarial):reviewedProduct()now runs outside thetry, so a throw there prints a stack trace instead of a usage exit.lib/ship-receipt-depth.ts:160(adversarial):bindShippedReceiptnow runscollectCommitandgstack-diff-scopefor legacy receipts too, which adds latency per slot.${{ secrets.X }}in workflows andprocess.env[name]are not matched; a carry keepsreview_targetedacross test-only changes.Fixed during review (with failing-first tests): the
--targeted-ran noneskip on test-only gate diffs; the skip key now hashes the whole diff, tests included (targeted_patch_id, no longer named like the receipt'sproduct_patch_id); the record isdoneonly while the committed diff it was rendered on is unchanged; the targeted render refuses any diff base but the merge base (pass 2+ would have read only the fix range), takes--base, and accepts an abbreviated sha; Step 11 says so; the role-list pin intest/ship-budget-chain.test.tsthat the first remote pregate caught.Verification Results
PREGATE_REMOTE: tree=c0dfcb488fd5 tests=19850 failed=0 spent=0.07; VM destroyed (left=0). macOS and Windows requires-remote lanes cleared from this PR's CI runs:PREGATE_VERIFY: ok pregate requires-remote cleared is current for tree c0dfcb488fd5.gstack-review-dispatch render): 13 of 13 existing briefs byte-identical; outside voice identical outside its embedded diff (handoffs/GSTA-160/gst257-briefcmp/SUMMARY.txt).bun run typecheckclean;gen:skill-docs --host allleaves no diff.claudeCLI is missing).Documentation
Docs audit (Sonnet, read docs/ and the fragment): updated
docs/review-policy.md(gate-path list now nameslib/review-targeted.tsandreview/specialists/targeted.md). Targeted-pass section, receipt row and dispatch roles were already current. Debt: no how-to or tutorial covers the targeted reader yet.Test plan
bun test test/review-targeted.test.ts(15 pass)