Repository navigation
review collect: a 'Finding N' lead keeps its own Severity and Blocks lines (GST-1657) - #4089
Merged
Merged
Conversation
…lines (GST-1657) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
A located line right under a 'Finding N' lead is another finding, not that lead's fields: the inline-field join now refuses a file:line, as the blank-line branch does, so judge() cannot lower the lead with a second finding's Blocks: no (red-team#1, GST-1657). Review-Finding: p1/red-team#1 reader=red-team Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
A heading that names CRITICAL or P0 itself keeps its blocker: the no-gap inline-field join no longer attaches another paragraph's Blocks: no to it, so ledgerBlockers() still counts it, as on main (outside-voice#3, GST-1657). Review-Finding: v1/outside-voice#3 reader=outside-voice Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ng guards 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.
What changed
The captured #248 native output: the Finding 1 fields no longer split off a phantom record, so the finding collects Medium with Blocks: no instead of CRITICAL.
Before/after as text: The captured #248 native output: the Finding 1 fields no longer split off a phantom record, so the finding collects Medium with Blocks: no instead of CRITICAL
The review collector now treats a native finding lead that names its number (
**Finding 1 (FIXABLE): …**,### Finding 1 …) as a numbered finding heading, the way it already treated**1. …**(GST-1031). Its body stays on the finding until itsSeverityandBlockslines come, so those lines land on the finding they belong to. A line right under a numbered heading that carries its Severity and Blocks fields, with no other label and no file:line, joins the heading at the stronger label instead of starting a phantom record. Two review fixes narrow that join: a located line there stays a finding of its own, and a heading that names CRITICAL or P0 itself keeps its blocker.Why
gstack-evals #248 (GEVA-358, p2/adversarial-native#1) blocked /ship until someone granted a review-loop exception by hand. The native reader wrote
**Finding 1 (FIXABLE): …**, a numbered repro and two more paragraphs, thenSeverity: MediumandBlocks: noon their own lines. Because that lead was not a numbered heading, the body reset the open finding, the fields started a phantom Medium record and the finding itself collected CRITICAL from FIXABLE. Now it collects Medium with no blocker, as its reader wrote.Blast radius
parseFindingsinlib/review-ledger.tsruns in every /ship and /review collect. The fact that makes this safe is a replay that ran: GST-1628's no-loss script over its 296 captured outputs gives 0 label diffs (only the 3 newtest/fixtures/review-ledger/gst-1657/*fixtures move), and an extended replay over 585 distinct captured outputs moves only 3 outputs, all this shape, with no CRITICAL a reader rated as blocking lost. Both replays give identical results before and after the two review fixes (evidence:handoffs/GST-1657/in the GStack Minder drive). FIXABLE still raises to CRITICAL when the finding statesBlocks: yes, states a Severity with noBlocks: noon a raising class (GST-987), or states no fields. Inline fields after a blank line keep GST-1406's rule.Approvals
No approvals recorded for branch gst-1657-finding-heading.
Summary
A native finding led by
**Finding N (…)**lost its own Severity and Blocks lines to a phantom record, so it collected CRITICAL and blocked /ship. The lead now counts as a numbered heading, the fields stay on their finding, and the review fixes keep a located line and a reader-stated CRITICAL heading out of the new join. Refs GST-1657.Test Coverage
Coverage: 90% value-weighted (90% including 0 weakly covered paths), from the Step 7 audit at 3088586 (audit-only, no tests generated).
Test value: 0 tests written, 1 rejected by the authoring gate, 0 existing tests extended, 0 paths weakly covered (weak = ★, gate-failing or unrated). The review fixes then extended
test/review-native-finding-heading.test.tswith two negative controls: a located line under aFinding Nlead stays its own record and judge refuses lowering the lead (fails on 3088586, passes after 3134e1f), and a heading that names CRITICAL keeps its blocker when an unrelatedBlocks: noline follows directly.Remaining gap: the afterGap guard (a field line after a blank line under a bare heading) has no test; value card: protects=the join applies only to the line directly under its heading; fails_when=the !afterGap guard is dropped; why_new=no blank-line case; seam=none; no_claim=other lead spellings.
Tests ran: ledger 194
Tests ran: tests 1614 (test files, carried from CI run 42265852962/1 at tree 5d0cf1c88a69)
Pre-Landing Review
Pre-Landing Review: 9 issues — 2 auto-fixed, 0 asked (0 fixed, 0 skipped), 0 deferred, 7 noted
Finding Nlead folded into it with its own fields, and judge() then accepted lowering the lead → the join refuses a file:line, as the blank-line branch does; negative control added (3134e1f). QA reproduced it before the fix and passes after.Blocks: nojoined it and ledgerBlockers() stopped counting the blocker → the no-gap join skips a heading whose own text names CRITICAL or P0, matching main; control added (f5ad0d1).REVIEW_LOOP: passes=2 blocking_found=1 deferred=0 noted=7 fixed=2 scope=frozen ledgers_read=6 fix_checks=1 dispatches=8
Gate edits: none detected (4 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 by openai/gpt-6.1-sol (host subagent, certified configuration); it found one blocker, now fixed. The native adversarial reader (claude-opus-5-5) found three Low notes and nothing blocking. Targeted money reader: NO FINDINGS at 3134e1f and at f5ad0d1.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
lib/review-ledger.ts:240An inline field line under a Finding N heading keeps the stronger (CRITICAL) label instead of the stated Severity; fails closed (GST-1406), lead judgment lowers it.lib/review-ledger.ts:60NUMBERED_HEAD matches only '**Finding N' / '### Finding N'; variants (lowercase, 'docs: add README and CLAUDE.md #1', unbolded) still split as on main. INVESTIGATE: a shape rule needs a human call (AGENTS.md: no spelling per paid failure).lib/review-ledger.ts:241An unbolded 'Finding 2: … Severity: High. Blocks: no.' line directly under a Finding 1 heading joins it; wrong attribution, no blocker lost.lib/review-ledger.ts:243The LOCUS guard also splits a field line that names the heading's own file:line, leaving the FIXABLE heading CRITICAL with no fields (a false blocker, never a lost one).lib/review-ledger.ts:244The CRITICAL/P0 heading guard scans every label word in the heading text, so 'Critical section …' or 'P0 pilot …' in a FIXABLE heading blocks the join and leaves a false blocker.lib/review-ledger.ts:232A 'Finding N (CRITICAL)' heading with separate Severity: Low / Blocks: no lines collects Low through the META branch, and after a blank line an inline field line keeps CRITICAL with Blocks: no; both predate this diff, so the documented guard holds only for the no-gap inline shape.Exploratory QA
Functional surface:
parseFindingsandjudgeon synthetic reader outputs, smoke only (no plan bound). Run 1 at 3088586: capture 002 reproduced red-team#1 (product defect), so the verdict was fail. Revalidation at 3134e1f passed 3 of 3. The final revalidation at f5ad0d1 passed 4 of 4, including the outside-voice#3 shape. The blank-line variants keep main's GST-1406 behavior and are not changed here. Evidence:qa/functional,qa/functional-r2andqa/functional-r3in the run directory.Design Review
No frontend files changed — design review skipped.
Eval Results
No prompt-related files changed — evals skipped (
evals: none affected; lib/review-ledger.ts is the collector, not a prompt or judge).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 Step 8.1 obligations (no plan bound): 0 PASS, 0 FAIL, 0 BLOCKED, 0 NOT RUN.
TODOS
No TODO items completed in this PR.
Documentation
Status: current. The authored docs already match the GST-1657 parser change.
Scope: the committed diff main...HEAD on gst-1657-finding-heading (7 files: lib/review-ledger.ts, docs/review-policy.md, a changelog.d fragment, a test and fixtures). The working tree was clean.
Documentation health:
Finding Nlead, the field line that joins the heading, and the CRITICAL/P0 exception)Coverage debt: none found. No other authored doc describes the numbered-heading rule. Diagram drift: none.
Test plan
bun --no-env-file test --timeout=30000over the 13 review-ledger test files (incl. test/review-native-finding-heading.test.ts): 194 pass, 0 failbun run test(free suite): carried from Free Tests run 42265852962/1 at debf73a (tree 5d0cf1c88a69), green; macos-named-regressions cleared from the same runbun run typecheck, test/module-size-ratchet.test.ts, check-conflict-markers: pass