Repository navigation
fix: the receipt and the review plan agree on stamp and docs carry for review_targeted (GST-1689) - #4099
Merged
Conversation
…r review_targeted (GST-1689) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
A restamp after a base merge now carries the targeted record: the CHANGELOG is read against the read commit's merged with the base's, so a sibling release's section is not counted as the PR's docs change. Adds the stamps-only and base-merge restamp cases. Review-Finding: p1/red-team#1 reader=red-team Review-Finding: p1/specialist-batched#1 reader=testing Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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.
GBRA-345 (gbrain #8727): after a clean money-class targeted read, /ship's Step 12 restamp plus the Step 14.5 docs audit changed only stamp, CHANGELOG and docs files.
gstack-ship-receipt writerefused review_targeted ("the product changed after the read"), whilegstack-review-plan --range-base <read> --targeted-ran <patch>printedNEXT: done, so only--post-review(adversarial plus the outside voice) could finish: a third round over unchanged code.What changed
A restamp after a base merge now keeps the targeted record: the new case fails at 8db9130 and all five pass at 9550847.
Before/after as text: A restamp after a base merge now keeps the targeted record: the new case fails at 8db9130 and all five pass at 9550847
docsChangeSinceinlib/ship-receipt-depth.tsdecides what the PR's own change since the targeted read is: release stamps, plain docs, a docs claim, or code.gstack-ship-receipt write(throughplainDocsSince) and the review plan's targeted-only read (lib/review-targeted-delta.ts) both call it, so they cannot disagree.classifyFilesinlib/tree-receipt.ts) is kept at the read's content before the docs rule and the targeted classes read the change. After a base merge, the CHANGELOG is compared against the read commit's CHANGELOG merged with the base's, so a sibling release's section is not counted as the PR's docs change.NEXT: targeted) instead of a dead end.Tests
test/review-targeted-stamp-carry.test.ts, on a fixture with a realgstack-restampand real dispatch/verify: restamp plus a plain docs-audit edit binds at write and the plan is done (fails on main: write refuses); restamp plus a one-line code change refuses; restamp plus a docs edit with a numeric claim on a money-class PR refuses and the plan dispatches the targeted reader.Out of scope: CI carry/pregate (GSTA-366), the review-loop exception (GSTA-365).
Why
"
gstack-ship-receipt writeandgstack-review-plandisagree on whether a change after the targeted read keeps review_targeted: the plan says done, the receipt refuses" (GBRA-345, gbrain #8727). A restamp plus a docs-audit edit could only finish through a third review round over unchanged code. Now the receipt and the plan read the change the same way, so a stamp or plain-docs change after the read finishes in one step.Blast radius
The change touches the receipt's
review_targetedcheck and the review plan's targeted-only read; both now go throughdocsChangeSince, and every unreadable or unmergeable input still falls back to the read commit, which refuses as before (walked failure paths instampPathsSinceandbaseMergedChangelogCommit, plus the code-change and numeric-claim tests that still refuse).Approvals
Approved: yes (record r-68dd10847872). The full approval record stays private: this repository is public or its visibility is unknown.
Summary
The receipt and the review plan now share one classifier for the change after a targeted read, release stamps always carry the record (including a slot restamp after a base merge), plain docs carry under the GST-1195 rule, and code drops it.
Test Coverage
Coverage: 62% (8 of 13 paths, Step 7 audit-only). Tests: 3 → 5 in
test/review-targeted-stamp-carry.test.ts(+2 new: a restamp alone, and a base merge with a sibling release then a restamp).Regression proof — fails at HEAD: yes (the base-merge case fails at 8db9130 with RECEIPT_INVALID) · passes at base: unavailable (new fixture case needs this branch's helpers) · passes after fix: yes.
Leftover gaps (proposed, not written): the null verdict when the read is not an ancestor; no policy or unreadable VERSION; the local-base fallback; a binary stamp path.
Tests ran: full 1621 (files, CI run 42308464152/1)
Tests ran: targeted 5
Pre-Landing Review
Pre-Landing Review: 7 issues — 2 auto-fixed, 0 asked, 0 deferred, 5 noted
REVIEW_LOOP: passes=2 blocking_found=0 deferred=0 noted=1 fixed=2 scope=frozen dispatches=4
Gate edits: none detected (1 listed, 0 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), completed. The first Step 11 attempt raised one Medium finding (listed under Review notes); the second attempt was clean.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
test/review-targeted-stamp-carry.test.ts:101The base-merge CHANGELOG baseline has only a positive test; no negative row shows a PR-own numeric CHANGELOG claim after a base merge still refuses (scratch probes show it does), and the unmergeable fallback is untested.lib/ship-receipt-depth.ts:688mergeChangelogs is called without the merge-base CHANGELOG, so carryReleasedParent never runs; a stacked child whose [Unreleased] still holds a released parent's entry falls back tofromand fails closed into an extra targeted reader.test/review-targeted-stamp-carry.test.ts:101No negative control pins that a PR-own CHANGELOG edit riding a base merge plus restamp is still refused (probes by two readers show it is).lib/ship-receipt-depth.ts:681baseMergedChangelogCommit duplicates ownChangeSince's git runner, pinned identity env and temp-index pattern; the copies can drift.lib/ship-receipt-depth.ts:688Outside voice (openai/gpt-6.1-sol, first voices attempt) rated Medium/blocks: when the PR edited a released CHANGELOG section before the read, a base merge resolved by mergeChangelogs drops that edit, and the base-merged baseline then calls the CHANGELOG a stamp, so the record carries where the old code refused on the removed money line. Lead probe confirms (write exit 0). No unreviewed text reaches HEAD; the loss comes from the merge resolver. Below the floor by lead judgment.The Captain (GStack Minder) accepted the outside voice's CHANGELOG-section finding as a note.
Exploratory QA
Smoke through the test harness only: the five stamp-carry cases on real
gstack-restamp,gstack-ship-receipt writeandgstack-review-planbins, plus reviewer probes (a PR-own CHANGELOG claim after a base merge still refuses). QA method sections were not run.Eval Results
No prompt-related files changed — evals skipped.
Review bot comments
No review bot comments.
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 p1/red-team#1
Refs p1/specialist-batched#1
TODOS
No TODO items completed in this PR.
Documentation
Status: current. No doc edits were needed; the branch already documents the change.
Scope: the candidate base e325b6d to head 9550847 on capy/gst-1689-stamp-docs-carry: 6 committed files (lib/ship-receipt-depth.ts, lib/review-targeted-delta.ts, test/review-targeted-stamp-carry.test.ts, docs/review-policy.md, docs/troubleshooting.md and the changelog.d fragment). No staged, unstaged or new files.
Documentation health:
Coverage debt: none from this branch. Pre-existing: docs/review-policy.md is not linked from README.md, CLAUDE.md or AGENTS.md. Diagram drift: none.
Test plan
bun run test: carried from CI run 42308464152/1 at tree cc11a9adcb44 (1621 files)bun test test/review-targeted-stamp-carry.test.ts: 5 pass, 0 failOut of scope: CI carry/pregate (GSTA-366), the review-loop exception (GSTA-365).