Repository navigation
fix: finish counts a post-review fix-check chain's first link; review-plan plans the next chained fix-check (GST-1676) - #4093
Merged
Conversation
… plans the next chained fix-check (GST-1676) Replay: GST-1676 (repins lib/review-depth.ts) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
Review-Finding: p1/red-team#1 reader=red-team Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
3 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.
What changed
finish on the founderstar#634 chain: before, link 1's grant at its own commit was rejected and the chain read as not counted; after, the two-link chain counts. Captured by running the new GST-1676 test in test/ship-finish-ruled-notes.test.ts against the merge base (a19130d) and against this branch.
Before/after as text: finish on the founderstar#634 chain: before, link 1's grant at its own commit was rejected and the chain read as not counted; after, the two-link chain counts
Why
founderstar#634 hit
FIX_CHECK: not counted (… link 1 of 2): in the post-review flow each granted fix-check's grant names the commit that fix-check reads, so link 1's grant sits at link 2's range_base, and finish refused it, which routed the whole chain as a behavior change. Now a link's grant may name its own commit, andgstack-review-plan --post-review --last fix-checkplans the next chained fix-check for a new grant instead of a stop that asked for the grant and then ignored it.Blast radius
The change touches finish's fix-check chain accounting (
lib/ship-release.tsfixChecked), one new transition inlib/review-depth.tsnextStep and the--grantbinding inbin/gstack-review-plan. Grants are still assigned newest link first and one link per grant, so a lone grant at the boundary covers only the newer link; the GST-1676 tests run both cases (script ran), and the new nextStep branch fires only when--post-reviewsets postReview, which the deterministic GST-967 and GST-972 grids never set (replay GST-1676, hashes unchanged).Approvals
No approvals recorded for branch capy/gst-1676-fix-check-chain-link-1.
Summary
Post-review fix-check chains now count their first link, and the planner plans the next link when the owner grants it, so lanes no longer hand-render the chained dispatch. The review pass also brought the CLI's
--range-basehelp and usage errors in line with the chained case, so they now name the last fix-check's commit.Test Coverage
Tests: 1743 → 1743 (+0 new in this /ship run; the GST-1676 tests were written failing-first before it)
Coverage: 100% value-weighted (100% including 0 weakly covered paths)
Test value: 0 tests written, 0 rejected by the authoring gate, 0 existing tests extended, 0 paths weakly covered (weak = ★, gate-failing or unrated).
Tests ran: free 1618 (test files, carried from Free Tests run 42284958359)
Pre-Landing Review
Pre-Landing Review: 1 issue — 1 auto-fixed, 0 asked (0 fixed, 0 skipped), 0 deferred, 0 noted
--range-basehelp and both usage errors named only this pass's / round 2's PASS_HEAD, so a lane following the CLI text in the chained post-review case could pass a stale base → they now also name the last fix-check's commit (6af3b9c). Raised by the red-team reader.REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=0 fixed=1 scope=frozen ledgers_read=5 fix_checks=1 dispatches=4
Gate edits: none detected (5 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: completed (openai/gpt-6.1-sol via host subagent): no actionable findings. Native adversarial (Step 11): 2 findings, Medium and Low, both
Blocks: no, recorded below as review notes.Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
bin/gstack-review-plan:158Chained post-review mode trusts the --range-base the lane passes; it never checks it against the newest review-fix-check row, so a stale base lets link 1's grant plan another fix-check (same defect class as p1/red-team#1, whose CLI-text cause was fixed in 6af3b9c). finish then refuses the chain or counts one union read; fails safe.lib/ship-release.ts:283fixChecked assigns grants newest link first by most-descendant stop head; on a tie the reduce takes the later candidate, so with grant Gx naming C1 and C2 and Gy naming only C2 (Gy first), link 2 takes Gx and link 1 is left ungranted although a valid assignment exists. Fails safe: the chain routes as behavior, nothing is wrongly counted.Exploratory QA
Functional surface, 4 smoke probes on the tree of 7b46da8 (report-only, evidence under the run's QA dir): the chained CLI plan test (pass), the finish chain tests (pass), a chained run with an unknown grant (exit 3 refusal, pass) and
--grantwithout--range-base(exit 2, pass). Verdict: pass. Not run: an end-to-end /ship Step 16 chain in a fixture repo, and a stale--range-basewith a recorded grant.Design Review
No frontend files changed — design review skipped.
Eval Results
No prompt-related files changed — evals skipped.
Scope Drift
Scope Check: CLEAN
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
Verification Results
No plan verification items (no plan bound; bug fix with failing-first tests).
TODOS
No TODO items completed in this PR.
Documentation
Status: current. The docs already describe the fix-check chain change for GST-1676, and this audit made no edits.
Scope: the committed diff from a19130d to HEAD on capy/gst-1676-fix-check-chain-link-1, covering bin/gstack-review-plan, lib/review-depth.ts, lib/ship-release.ts, their tests and fixtures, docs/ship-policy.md, docs/review-policy.md and one changelog.d fragment. The worktree had no staged, unstaged or untracked changes. I searched all authored .md and .tmpl files for the superseded grant rule.
Documentation health
--range-baseguidance were updated in this branch--range-base,--grantand--post-reviewhelp text was updatedCoverage debt: none found. The behavior is covered by test/review-depth.test.ts, test/review-plan-cli.test.ts and test/ship-finish-ruled-notes.test.ts.
Diagram drift: none. No diagrams cover this flow.
Test plan
🤖 Generated with Claude Code