Repository navigation
review-plan: a docs claim added after the loop plans one targeted-only reader (GST-1598) - #4062
Merged
Merged
Conversation
…has no targeted-only reader) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…y reader (GST-1598) After a finished review loop, a docs change with a money, security or numeric claim left the receipt unable to carry the targeted record and the plan at done, so nothing could dispatch the reader the receipt asks for (harness-evals #225). With --range-base naming the commit the targeted reader read and --targeted-ran its patch, a docs-only change since then now plans NEXT: targeted: one targeted reader on HEAD for the head classes, with TARGETED_DELTA printed. Code changes keep done; --force targeted refuses and names the route; gstack-review-dispatch pass builds the one-reader manifest. Repins lib/review-depth.ts under replay GST-1598 (one Step union member; the GST-967 and GST-972 grids hash unchanged). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…#4058) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
targetedDelta counts a path whose branch hunks are unchanged and only the base moved lines beside them (comparePath context) as unchanged, so a main merge next to a reviewed hunk no longer hides the targeted-only read (GST-1598). Review-Finding: p1/outside-voice#1 reader=outside-voice Review-Finding: p1/adversarial-native#2 reader=adversarial-native 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>
4 tasks done
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.
After a finished review loop, a docs change with a money, security or numeric claim (a changelog fragment with dollar figures, harness-evals #225) left no way through:
gstack-ship-receipt writewould not carry the targeted record across it, andgstack-review-planprinteddone, so nothing could dispatch the reader the receipt asked for (--grantonly acts on a stop,--force targeteddispatched nothing, and the brief renders only inside a pass manifest).What changes
NEXT: targeted. When the loop is done,--range-basenames the commit the targeted reader read and--targeted-ranis that commit's targeted patch-id, and the only change to the branch's own patch since then (compared on each side's merge base) is non-binary docs that is not plain docs (plainDocsSincefalse), the plan dispatches exactly onetargetedreader for the head's targeted classes and printsTARGETED_DELTA: range_base=<sha> paths=<paths> classes=<classes>(targeted_deltain--json). The reader reads the whole merge-base diff at HEAD like every targeted reader, so its record binds the receipt with no receipt change. It applies no fix, so it is not a review round and needs no grant; a--grantthe approval record does not hold still refuses (exit 3).donewithSKIP: targeted-only read (<reason>): a code or binary change (the review loop, as today), plain docs (the record carries), a range_base the--targeted-ranpatch does not match, uncommitted edits.--force targetedrefuses (exit 2) and names the route instead of dispatching nothing.gstack-review-dispatch passbuilds the one-reader manifest (voices stage, merge base, theTARGETED_DELTAline in its plan lines).review_targeted;docs/review-policy.mdgains "Targeted-only read after the loop".lib/review-depth.tsgains oneStepmember,'targeted', repinned under replayGST-1598: planReview never returns it, and the GST-967, GST-972 and section grids hash unchanged.Tests
test/review-plan-targeted-delta.test.ts: the #225 shape dispatches one targeted reader, then plansdoneonce its id comes back, andparseReviewTargetedrefuses the pre-claim record and binds the one read at HEAD; a code delta keepsdone; plain docs and a mismatched range_base dispatch nothing; a fabricated grant refuses;--force targetedrefuses;passbuilds the manifest and its voices stage renders the brief on the merge base at HEAD. Five of the six failed on main 01572de before the change.What changed
--force targeted now refuses and names the post-loop route (--range-base plus --targeted-ran) instead of planning as if targeted were a specialist.
Before/after as text: --force targeted now refuses and names the post-loop route (--range-base plus --targeted-ran) instead of planning as if targeted were a specialist
Why
On harness-evals #225 a changelog fragment with dollar figures, added after the review loop had finished, left /ship stuck: the receipt refused the old targeted record, and the plan printed
NEXT: done, so nothing could run the reader the receipt asked for. Now, when the loop is done and the only change since the targeted read is docs with a money, security or numeric claim, the plan printsNEXT: targetedand dispatches one targeted reader on HEAD. A main merge that only edits lines next to a reviewed hunk no longer counts as a branch change.Blast radius
The change touches
gstack-review-plan(one newNEXT:value and a new refusal for--force targeted),gstack-review-dispatch pass(builds the one-reader manifest) and theSteptype in lib/review-depth.ts. It is safe because the new branch runs only when--range-baseand--targeted-ranare both passed and the loop already saysdone, and Step 9 never passes--targeted-ran. The adversarial reviewer read that path and confirmed it (file:line read), and test/review-plan-targeted-delta.test.ts covers it (7 tests ran green).Approvals
APPROVALS_RENDER: redacted (repository visibility public); gstack-approvals list shows the full record
No approvals recorded for branch gst-1598-targeted-delta.
Summary
After a finished review loop, a docs-only claim had no route to the targeted reader the receipt needs. This PR adds that route (
NEXT: targetedwith aTARGETED_DELTA:line), keepsdonewith a stated reason for every other delta, and makes--force targetedrefuse and point at the route. This /ship run added two commits. 39165d4 fixes a pre-landing review blocker:targetedDeltacounted comparePath'scontextverdict (the base moved lines next to an unchanged branch hunk) as a branch change, so a main merge recreated the dead end. A failing-first test covers it. 3b971e0 adds the changelog.d fragment.Test Coverage
Coverage audit (Step 7, audit-only, at 3b2577b): 9/17 paths (53%). QUALITY: ★★★ 4, ★★ 5. GAPS: 8 (0 E2E, 0 eval).
Tests: 6 → 7 (+1 new: the context-only base merge case, added with the review fix in 39165d4).
Coverage: 53% value-weighted (53% including 0 weakly covered paths)
Test value: 1 test written, 2 rejected by the authoring gate, 0 existing tests extended, 0 paths weakly covered (weak = ★, gate-failing or unrated).
Remaining gaps the audit proposed (not written; audit-only): an uncommitted-edits skip, an off-branch range_base skip, an unchanged-patch skip and a binary docs skip in targetedDelta.
Tests ran: targeted 496
Tests ran: parity 2
Tests ran: typecheck count unavailable
Pre-Landing Review
Pre-Landing Review: 8 issues — 1 fixed (outside voice and native adversarial, the same defect), 0 asked, 0 deferred, 7 noted
REVIEW_LOOP: passes=2 blocking_found=1 deferred=0 noted=5 fixed=1 scope=frozen unbound=1 ledgers_read=4 dispatches=8
Gate edits: none detected (4 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Outside review: openai/gpt-6.1-sol (host subagent, certified configuration) completed. It found one finding marked blocking, fixed in 39165d4.
Review plan: full panel (gate class, full depth). Pass 1 ran the batched specialist (testing, security, state-machines), red team, native adversarial and outside voice. Pass 2 ran the specialist and red team on the fix range 3b2577b..39165d4 and found nothing blocking.
The
unbound=1is the fix commit's secondReview-Finding: p1/adversarial-native#2trailer. That finding is the same defect as p1/outside-voice#1, and no review row holds it because Step 11 logs voices without findings.Review notes
Below the blocking floor ("would fail a test, break production, or lose data or secrets"). These are notes, not fixed here:
--range-basedoubles as the fix-range base. After a main merge that touched a gate path, the plan printsNEXT: stopinstead oftargeted. It fails closed, but it sends the lane to a grant ask. A possible fix is a dedicated--targeted-read <sha>flag.git diffundercore.quotePath=false, whiletargetedPatchIduses git's default. On a branch with a non-ASCII path the ids never match, and the skip blames--targeted-ran. It fails closed. (The native adversarial voice reported the ids match byte for byte on ASCII paths.)comparePathruns on every branch path, without thetouchedPathsprefilter the receipt uses. A branch with thousands of paths could hit the 180 s plan timeout.contextfilter also accepts comparePath's baseEditOnlycontext(the base rewrote the lines a reviewed hunk replaces), and no test covers it. The red team found no unreviewed path through it, because the targeted reader reads the whole merge-base diff at HEAD.targeted.Exploratory QA
Functional CLI smoke on the branch binary (300 s / 12-probe budget). On 3b2577b,
./bin/gstack-review-plan --base mainexited 0 with NEXT: full, and--force targetedexited 2 and named the route. One capture ran the installed main binary by mistake; it was superseded, so that probe dir's verdict reads inconclusive. Revalidated on the fixed tree 39165d4: both probes pass (evidence verdict: pass). The post-loopNEXT: targeteddispatch is covered by the test file, not by a live probe.Design Review
No frontend files changed — design review skipped.
Eval Results
No PR-pass evals were selected. The selector at origin/main f7015fa chose no quality judges, and its 152 selected behaviors remain scheduled or release coverage, not PR passes. Evals skipped.
Review bot comments
No review bot comments.
Scope Drift
Scope Check: CLEAN
Intent: give a docs claim added after a finished review loop a targeted-only read (GST-1598).
Delivered: the
NEXT: targetedroute, its skip reasons, the--force targetedrefusal, docs and tests, plus one review fix to the same module.Plan Completion
Plan completion audit: not run (no plan is bound to this branch and no docs/designs/ file matches). Fix: add "Plan: " to the PR body, or run /autoplan.
Issues
Refs #225
Refs #4058
Refs p1/adversarial-native#2
Refs p1/outside-voice#1
Verification Results
No plan-specific verification items (no plan bound): VERIFY_RESULT=skipped.
Remote pregate
CI_CARRY: accepted ci-carry tree=f3358396f794 tests=35901 runs=42208683797/1 profiles=ci-reuse/free-tests heads=3b971e0890d1 verified=2026-11-06T11:13:56.337Z
PREGATE: verify ok on the stamped tree (requires-remote cleared: macos-named-regressions run 42208683797/1, windows-smoke run 42208684161/1, remote_gate carried from run 42208683797/1)
TODOS
No TODO items completed in this PR.
Documentation
Status: current. No edits were needed, and I changed no files.
Scope: audited the candidate's base
f7015fathrough head3b971e0on branch gst-1598-targeted-delta. It has 13 committed files and no staged, unstaged or untracked ones. I read the bin, lib, ship, docs and changelog-fragment changes and grepped the docs and templates for the review plan'sNEXT:values and flags. The repo keeps no banned-terms list.Documentation health:
NEXT: targetedstep, theTARGETED_DELTAline, the--range-baseand--targeted-ranflags and the--force targetedrefusal, matching the code.targetedfrom its NEXT-to-Step mapping. It is skill-prompt prose, so I left it for the parent or author.Coverage debt: the
NEXT: targetedroute has reference and how-to coverage in review-policy.md and pr-body.md, with no tutorial or explanation. I did not fill the gap. Diagram drift: none found.Test plan
bun test test/parity-suite.test.ts: 2 tests ran, exit 0bun run typecheck: exit 0🤖 Generated with Claude Code