Repository navigation
v1.93.9.0 fix(receipt): --check-prose skips the required Review-loop exception line (GST-977) - #3863
Merged
Merged
Conversation
…line (GST-977)
write --review-loop-exception requires the PR body to carry the exception line word for word, and read --check-prose read the owner reason in it as counter claims ("outside 1 and 2 skip detector" as 2 skip against 70, gstack-evals #139). The prose check now skips the line that matches the receipt exception exactly, as it skips the rendered Approvals block.
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…T-977 review) 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.
What changed
gstack-ship-receipt read --check-proseon a body that carries the receipt's ownReview-loop exception: …line. On main the owner's reason inside that line is read as a counter claim and the check fails. On this branch that exact line is skipped and the rest of the body is still checked. (The image render failed withSHOT_PNG: failed, so this is the text version.)Before/after as text: read --check-prose on a body that carries the exception line from gstack-evals PR 139: main reads the owner's reason as a counter claim; this branch skips that exact line
Why
On gstack-evals PR 139 (GEVA-2), the owner accepted a review-loop stop with a reason that named the skip detector by number ("outside 1 and 2 …").
write --review-loop-exceptionrequires the PR body to carry that whole line word for word, butread --check-proseread the number before "skip" as a claim against the receipt's gate skip counter and failed, so no body could pass both checks. Now the prose check skips the line that matches the receipt's exception exactly, the same way it already skips the rendered Approvals block.Blast radius
Only
checkReceiptProseinlib/ship-receipt-prose.tschanges, and its one caller isbin/gstack-ship-receipt(read --check-prose);bin/gstack-ship-receiptitself is untouched. A receipt with noreview_loop_exception, or one that does not parse, returns the body unchanged, so every other body reads exactly as before (file:line read, and the third assertion in the new tests). The skip uses the same trimmed-line equality aswrite'scarries()check inlib/ship-receipt-depth.ts, so the two checks accept the same lines (script ran: the CLI probe below).Approvals
No approvals recorded for branch gst-977-prose-skips-exception-line.
Summary
withoutExceptionLinebuilds the rendered line withparseReviewLoopExceptionandreviewLoopExceptionLine(both already exported bylib/ship-receipt-depth.ts) and replaces any body line whose trimmed text equals it with a marker line, so the text on either side never joins into a claim. The same words inside a longer line, or a line for a different exception, are still checked. A copy of the exact line inside a code fence is skipped too, aswriteaccepts one; the docs now say so.Failing-first proof (
~/.capy/work/gst977-failing-first.txt, the new tests run against main'slib/ship-receipt-prose.ts): main returned the mismatchgate.unit.skip body=2 receipt=70for the exact exception line. A CLI probe ofread --check-prosegave the same result on main and a clean match on this branch, and it still flags a wrong number elsewhere and an inline copy of the line.Security read: no network calls, no environment or secret reads, no permission, workflow, setup, install or dependency changes.
Test Coverage
The Step 7 audit (audit-only, nothing generated) found 6 of 7 code paths covered (86%). The one gap is a
review_loop_exceptionthat fails to parse, which falls back to checking the whole body, the same as main. The CLI path is covered by the existingread --check-prosetest for wiring and by the smoke probe below for the exception line.Tests: 9 → 11 in
test/ship-receipt-prose.test.ts(+2 new)Tests ran: prose 11 (Step 16 lane at the pin)
Remote pregate at db666b1 (tree 95cf441fd7f2): 1027 tests in 51 selected files, 0 failed, $0.04 on Ubicloud (VM destroyed). It included
test/gstack-ship-receipt.test.ts, whose carry test times out at 5 s on the 4-core lane machine; it passed on the VM.test/brain-sync.test.ts(#2549 queue integrity) fails on main too and was not selected.Pre-Landing Review
/ship's planner classed the diff as gate (the receipt prose check is a READY check), so round 1 ran the full panel at full depth: batched specialists (testing, security, api-contract, state-machines), a Red Team, native adversarial, a targeted gate reader, and an outside voice (openai/gpt-6.1-sol, no actionable findings, recommends approve). Nothing reached the rule 23 floor.
writeaccepts it. Fixed as wording in db666b1 (docs/ship-policy.md, the lib doc comment and the changelog fragment; no behavior change).REVIEW_LOOP: passes=3 blocking_found=0 deferred=0 noted=0 fixed=0 scope=frozen
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)
Review notes
Open notes, below the blocking floor and not looped (lane brief and crew rule 30):
lib/ship-receipt-prose.ts).writealso requiresDocumentation exception: accepted by … via …: <reason>word for word, and--check-prosestill reads its reason as prose. This predates the PR. Filed as GST-983: skipdocsExceptionLine(parseReceiptDocs(receipt.docs))the same way, with a matching test.review_loop_exceptionthat fails to parse is not exercised by a test; it falls back to the full check, as on main.Decision trail:
reports/GSTA-234-977-decisions.tsvin the GStack Minder drive, reviewed by openai/gpt-6.1-sol (read-only, at db666b1). Its four flags are all below the rule 23 floor: the extra round-2 run above, evidence pointers that did not resolve (since superseded with archived results), the cross-family read that was skipped and is now done, and a cost overrun past the lane's stop line. The trail records each one with a superseding row.Exploratory QA
Smoke ran the real
bin/gstack-ship-receipt read --body … --check-proseat this branch and at main with the exception from gstack-evals PR 139: the exact line beside a matching gate claim passes on this branch and fails on main withbody=2 receipt=70; a wrong gate number elsewhere and an inline copy of the line both still fail on this branch. No browser surface. No separate QA report.Design Review
No frontend files changed, so design review was skipped.
Eval Results
No prompt-related files changed, so evals were skipped.
Plan Completion
Plan completion audit: not run (no plan is bound to this branch and no docs/designs/ file matches). This is a Captain-specified fix under the fix-lane exemption.
TODOS
No TODO items completed in this PR.
Documentation
Status: current. The docs already match the change, so no edits were made.
Scope: base 69c14b1, head db666b1 on gst-977-prose-skips-exception-line, 2 commits, 5 files:
lib/ship-receipt-prose.ts(skips the receipt's requiredReview-loop exception: …line, fenced copies included), its test,docs/ship-policy.md,docs/troubleshooting.mdand a changelog fragment. There were no staged or unstaged changes and no new files. Docs were checked by diff hunk and by grepping for--check-prosereferences, not by full read of all 136 inventoried docs.Documentation health:
docs/ship-policy.md: current, with the exception-line skip and the exact-match rule documented.docs/troubleshooting.md: current, with the meaning note covering the exception line.changelog.d/gst-977-prose-skips-exception-line.md: current, reviewed and not edited.docs/review-policy.md,CHANGELOG.md: reference--check-prosegenerically, no change needed.Coverage debt: no zero-coverage items. The change is a behavior fix with reference docs in ship-policy and troubleshooting. There are no tutorial or how-to docs for
--check-prose, which is a minor gap. Diagram drift: none.Test plan
bun test test/ship-receipt-prose.test.ts: 11 pass, 0 failbun run typecheck: 0 errorsgstack-pregate --stage tests --remote, UBI_OWNER=gsta234) at db666b1: 1027 tests, 0 failed