Repository navigation
Keep a numbered review finding's closing paragraph on that finding after a nested list (GST-2174) - #4237
Merged
Conversation
…ter a nested list (GST-2174) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…CAL item The join that keeps a numbered native finding's closing paragraph now ends after that first paragraph, skips bold-led margin paragraphs and verdict lines, applies only to the native voice's items, and never lowers an item that names CRITICAL or P0. Each of these let a separate finding's Severity and Blocks: no lower a FIXABLE blocker to Low (GST-2174). Review-Finding: review/specialist-batched#1 reader=testing Review-Finding: review/red-team#2 reader=red-team Review-Finding: review/red-team#3 reader=red-team Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…entry docs/review-policy.md now says how the collector keeps a native numbered finding's first closing paragraph after a nested list (GST-2174). 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.
/ship's review gate no longer blocks a merge on a Low finding just because the native reviewer wrote it as a numbered item with a nested list and a closing paragraph. This serves gstack's goal of a review loop that stops only on real blockers.
What changed
Before: the closing paragraph split off and the Low finding blocked /ship as CRITICAL. After: one Low record, no blocker.
Before/after as text: Before: the closing paragraph split off and the Low finding blocked /ship as CRITICAL. After: one Low record, no blocker.
Why
An alphaclaw /ship run stopped on a finding its own reviewer rated "Severity: Low. Blocks: no." The reviewer wrote six findings and the gate collected nine, because the closing paragraph of each numbered item split off into its own record and left the item's FIXABLE label to count as CRITICAL. Now that paragraph stays on its finding, so a Low FIXABLE collects at Low and /ship keeps going.
Blast radius
Only
parseLabelledin lib/review-ledger.ts changed, and every reviewer's output goes through it. The new join runs only for the native reviewer's numbered items with no fields of their own and stops after the first closing paragraph, so other readers' output parses exactly as on main. The 22 test files that import the ledger pass (216 tests in the 14-file collector lane, run at 3159fbe and again at the final tree), and the new test fails on the previous head.Summary
The native reviewer often writes a finding as
1. **FIXABLE. …**, a short sub-list, then a closing paragraph that holdsSeverityandBlocks. The collector treated that paragraph as a new finding, so the item kept no fields and its FIXABLE label made it a blocker. The collector now keeps the indented lines and the first closing paragraph on the numbered item, so the paragraph's fields bind to it.The first review round found three ways the first version of that join could hide a real blocker. It took in a separate bold-led finding, it kept absorbing later paragraphs, and it applied to every reader and could lower an item that names CRITICAL. The join is now narrow. It applies only to the native reviewer, ends after the first closing paragraph, never takes in a bold-led paragraph or a verdict line, and never lowers an item that names CRITICAL or P0. A new test covers each case.
Test Coverage
All new code paths have test coverage (deterministic coverage audit: the one changed runtime file has a changed test naming it).
Regression proof: test/review-native-nested-list.test.ts fails at main f75ce6f (2 of 2), and its third test fails at 1109bf5, the head before the review fixes. All three pass now.
Tests ran: collector 216
Pre-Landing Review
Pre-Landing Review: 9 issues — 0 auto-fixed, 3 asked (3 fixed, 0 skipped), 0 deferred, 6 noted
Round 1 (full panel: batched testing/security/state-machines specialist and Red Team) found three blockers in the join, all fixed in 3159fbe:
Severity: LowandBlocks: nolowered the FIXABLE blocker;Round 2 (the same panel on the fix range) found no blocker. The Step 11 voices (native adversarial reviewer, outside voice on openai/gpt-6.1-sol and the targeted money-path reader) ran on the final code tree.
REVIEW_LOOP: passes=2 blocking_found=8 deferred=0 noted=9 fixed=3 scope=frozen ledgers_read=4 dispatches=8
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: completed (host subagent, openai/gpt-6.1-sol), 1 finding, listed under Review notes. Targeted reader: NO FINDINGS.
Review notes
These are open notes, shipped after the two-round cap. None would fail a test, break production or lose data; the first two can make the gate block on a finding that is not real (it fails closed), and none can hide a real blocker.
lib/review-ledger.ts:281(outside voice, native reviewer): an indented paragraph after the nested list uses up the one allowed join, so fields in a later margin paragraph split off and the item collects a false CRITICAL. The suggested fix (afterGap && !indented) reopens round 1's fail-open case and fails test/review-native-nested-list.test.ts, so it was not taken.lib/review-ledger.ts:278(native reviewer): a closing section of two margin paragraphs before own-line fields splits again, as it did before 1109bf5. Picking the better default needs a replay of real native outputs.lib/review-ledger.ts:183(native reviewer, round 2 Red Team): the comment says an item naming CRITICAL is never lowered, butSeverityandBlockson their own lines still lower it through the existing field-line path and ruling A's relaxed pass. That behaviour is unchanged since main; only inline fields in the joined paragraph are pinned.lib/review-ledger.ts:279(round 2 Red Team): the verdict-line exclusion also applies to indented lines, so an indented verdict inside an item splits off and takes the item's later field lines (a false CRITICAL, fail-closed).lib/review-ledger.ts:301(native reviewer): non-native readers no longer get the join, by design after round 1; their output parses as on main.SeverityandBlocks: nostill binds to the item; no parser rule can tell it from the intended shape.Exploratory QA
Functional smoke, 3 probes on
parseFindingsagainst synthetic reviewer replies (verdict: pass):Severity: Low. Blocks: no.) collects one Low record: pass;Limit: collect and ledgerBlockers are covered by the unit test, not by a QA capture.
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
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 obligations: 0 PASS, 0 FAIL, 0 BLOCKED, 0 NOT RUN.
TODOS
No TODO items completed in this PR.
Documentation
Status: updated. One factual edit to docs/review-policy.md, no blockers.
Scope: base f75ce6f to head 3159fbe on capy/keep-a-numbered-review. Audited lib/review-ledger.ts, test/review-native-nested-list.test.ts and the new changelog.d/capy-keep-a-numbered-review.md fragment. Nothing was staged or unstaged.
Documentation health:
Coverage debt: none. The collector rule is internal and has reference coverage in docs/review-policy.md. Diagram drift: none.
Test plan
bun test --timeout=60000over the 14 collector files (review-native-nested-list, review-native-finding-heading, review-gst1031, review-ledger-invariant, review-closing-summary, review-ledger-verdict-line, review-fixable-class, review-negated-severity, review-prose-severity, review-scope-ledger-count, review-loop-binding, review-pass, review-dispatch, module-size-ratchet): 216 pass, 0 fail🤖 Generated with Claude Code
Agent notes
Refs GST-2174
Approvals
No approvals recorded for branch capy/keep-a-numbered-review.
Plan: exempt: bug fix
Plan check: exempt bug fix
REVIEW_LOOP: passes=2 blocking_found=8 deferred=0 noted=9 fixed=3 scope=frozen ledgers_read=4 dispatches=8
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)