Repository navigation
ship finish: FIX_CHECK names the grant that covers the fix-check (GST-1610) - #4070
Merged
Merged
Conversation
…s at different heads (GST-1610) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…x-check range (GST-1610) 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>
|
😎 This pull request was merged. |
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.
finish's
FIX_CHECK: reviewedline credited a counted fix-check to the first approvedreview_loop_grantwhose stop head fell anywhere in the fix-check'srange_base..commit. A run with two granted fix-checks puts both stop heads in that range. On gstack-evals#244 the line credited fc4 to a-ab110530e792, the earlier fix-check's grant, but fc4's own grant was a-eaa651ef9ed3. The fix-check itself was valid; only the trail pointer was wrong.finish now names the grant whose stop head is newest in the range, the stop the fix-check answered. Whether a fix-check counts, and which paths it covers, are unchanged.
A test written failing-first in
test/ship-finish-ruled-notes.test.tsrecords two grants at different stop heads and two fix-checks. Before the change the line named the first grant; it now names the second. docs/review-policy.md states the rule.Fixes GST-1610.
What changed
finish's
FIX_CHECK: reviewedline now names the approvedreview_loop_grantwhose stop head is newest (by git ancestry) inside the fix-check'srange_base..commit, instead of the first approved grant naming any commit in that range. Whether the fix-check counts, and which paths it covers, are unchanged.Image: none. There is no visible surface, and the change is one selection rule in
route(), so this is the text version.Text before/after
The fixture in
test/ship-finish-ruled-notes.test.tsrecords grant A at the pass head (fix-check fc3), commits the fc3 fix, records grant B at the fc3 head (fix-check fc4), commits the fc4 fix and logs the fc4 fix-check.Before (the failing-first run):
After:
Why
On gstack-evals#244 the FIX_CHECK line credited fix-check fc4 to a-ab110530e792, the earlier fix-check's grant, when fc4's own grant was a-eaa651ef9ed3. The fix-check was valid, but the trail pointed at the wrong owner approval. Now the line names the grant for the stop the fix-check answered.
Blast radius
The change only picks which grant id the
FIX_CHECK: reviewedline prints. The not-counted reason still asks only whether a covering grant exists, so counting and covered paths are unchanged. I read that at lib/ship-release.ts:301-315, and the 10 cases in test/ship-finish-ruled-notes.test.ts (including the GST-1537 single-grant cases) passed at this head. Nothing else reads the grant variable.Approvals
No approvals recorded for branch capy/gst-1610-fix-check-grant.
Summary
When a branch had two granted fix-checks, finish credited the later one to the earlier grant, because it took the first approved grant whose stop head fell anywhere in the range. finish now takes the grant whose stop head is newest in the range. A failing-first test covers two grants at different stop heads, and docs/review-policy.md states the rule in one sentence.
Test Coverage
The Step 7 audit ran audit-only, because the PR already carries its failing-first test and the unattended run edits code only in review fix rounds.
Tests: 1733 → 1733 (+0 new)
Coverage: 67% value-weighted (67% 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).
Regression proof — fails at HEAD: manual (the PR's failing-first run named the first grant) · passes at base: unavailable (audit-only) · passes after fix: yes
Tests ran: free 1608 (files), carried from CI run 42219274099/1 (35,913 tests at tree 5e261301df0e)
Pre-Landing Review
Review plan: class code at light depth (runtime_lines 9), 2 dispatches: one batched specialist (testing, security, state-machines, red-team checklists) and the native adversarial pass. The outside voice was skipped by the plan (code class, no numeric claims).
Pre-Landing Review: No issues found.
Step 11 native adversarial: 4 findings, all Severity Low and Blocks: no. They are below the blocking floor and are listed as review notes below.
REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=0 fixed=0 scope=frozen ledgers_read=2 dispatches=1 est_input_tokens=2358
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: skipped (review plan: code class, no numeric claims); the Codex CLI is not installed on this machine.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
lib/ship-release.ts:300Newest-stop pick is record-order dependent when stop heads are incomparable across a merge in the fix-check range; only the grant id on the FIX_CHECK line can differ, counting is unchanged. Lane branches are linear (no merges of main), so the case does not arise on this workflow.lib/ship-release.ts:300Two approved grants naming the same stop head: the later row now wins (is-ancestor X X is true) where find() named the first; attribution only, counting unchanged.lib/ship-release.ts:299Every 7-40 char hex token in a grant's ask/scope is a candidate stop head (pre-existing regex); newest-in-range across grants raises the chance a stray in-range hash outranks the real stop. Attribution only; an explicit stop= field would remove the guess.lib/ship-release.ts:299finish now runs rev-parse plus is-ancestor for every hash in every approved grant instead of stopping at the first covering one; negligible at current record sizes.Exploratory QA
Target: finish's FIX_CHECK grant choice in lib/ship-release.ts route() (functional surface, CLI through the real bins in an owned fixture). Smoke budget 300 s / 12 probes; 2 captures used. Writes limited to this probe directory and the fixture's own temp root. Report template not read (concise report; fields below).
bun test test/ship-finish-ruled-notes.test.ts, 10 pass 0 fail, exit 0 (the new GST-1610 two-grant case and the GST-1537 single-grant cases).Verdict from gstack-qa-evidence materialize: pass (open: none).
Limits: forked (non-comparable) stop heads not probed (a linear branch cannot produce them without a merge); a grant whose text names both an in-range and an out-of-range sha not probed end to end.
Design Review
No frontend files changed — design review skipped.
Eval Results
No prompt-related files changed — evals skipped.
Review bot comments
No review bot comments.
Scope Drift
Scope Check: CLEAN
Intent: the FIX_CHECK line names the grant that covered the fix-check when several grants fall in its range (GST-1610).
Delivered: the same, plus a failing-first test, one docs sentence and a changelog fragment.
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.
Verification Results
No plan-specific verification items (no plan is bound). Automatic QA: 2 PASS, 0 FAIL, 0 BLOCKED, 0 NOT RUN.
TODOS
No TODO items completed in this PR.
Documentation
Status: current. No documentation edits were needed.
Scope: 37f81cf..e30dde8 on capy/gst-1610-fix-check-grant: 4 committed files, with nothing staged, unstaged or new. The audit searched the authored docs and templates for the FIX_CHECK grant contract.
Documentation health
docs/review-policy.md: current. The branch already documents that the FIX_CHECK line names the grant whose stop head is newest in the range (GST-1610).changelog.d/capy-gst-1610-fix-check-grant.md: current. The fragment matches the change.ship/sections/review-army.md.tmpl: current. It does not describe which grant is named.Coverage debt: none. The changed behavior is internal finish routing and already has reference coverage in review-policy.md. Diagram drift: none.
Test plan
🤖 Generated with Claude Code