Repository navigation
v1.92.82.0 fix(ship): verify re-derives each merged finding from the reader's output (GST-541) - #3717
Merged
Merged
Conversation
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…opy and uncollected rows (GST-541 review) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ngs (GST-541 fix-check) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…D row (Rule 25 with #3701) 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> # Conflicts: # test/review-dispatch.test.ts
…ck (GST-541 fix-check) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…skips the count check or voids an output (GST-541 fix-check 2) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…h no ids (GST-541 fix-check 3) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…verify-binding Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # test/review-dispatch.test.ts
…ames the render's tree (GST-541 red team) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ed through a symlink verifies clean Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…verify-binding Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # lib/review-ledger.ts
garrytan
added a commit
that referenced
this pull request
Nov 2, 2026
…7, after #3717) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
capy-ai Bot
added a commit
that referenced
this pull request
Nov 2, 2026
…side gate and risk reviews (GST-987) (#3869) * fix(review-ledger): a finding's Severity field sets its label, body severity words never raise it (GST-976) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(review-ledger): Severity counts only in field position, locus-first and emoji-led labels lead, an inline field floors the next (GST-976 review) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(review-ledger): linear lead-label prefix, all-caps leads before a space, fields after a parenthesis or without a colon at the line start (GST-976 review) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(review-ledger): a lead's file:line has no runaway backtracking and may be a range; a mid-line Severity field must close its clause (GST-976 review) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(review-ledger): a field at the line's start needs no closing clause; mid-line fields accept : / and → after the label (GST-976 fix-check) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs: changelog fragment and review-policy collect step for GST-976 Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(review-ledger): a Severity field's label chain (High/Critical) takes its strongest label; mid-line fields keep the clause-closing set (GST-976 scoped check) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(review-ledger): never weaker than main invariant over pinned inputs, fixtures and generated field shapes; a multi-label Severity field counts as none, lowercase fields keep their label (GST-976) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs: GST-976 re-audit, multi-label and lowercase Severity fields Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: native FIXABLE raises only on gate and risk review classes (GST-987) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: collect records fixable_raises:false so a later re-derive uses the same class (GST-987) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: GST-987 review fixes: history/floor reasons and FIXABLE-only fields keep v2; manifest must name this ledger Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: GST-987 round-2 fixes: FIXABLE relaxes only beside Blocks: no; raw FIXABLE heading; unreadable manifest keeps v2 Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: GST-987 fix-check: items under a FIXABLE heading need Blocks: no; Blocks: no-op is not Blocks: no; wrong-tree collect with an unreadable manifest Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs: GST-987 docs audit: depth section notes the native FIXABLE exception Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: a paragraph under a numbered finding heading joins it, so its fields attach (gstack-evals #149, GST-987) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: verify re-derives native labels with the collect's class (GST-987, after #3717) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: #149 join stops at a labeled or located paragraph and after the fields (GST-987) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test: GST-987 #149 sibling shapes as named never-weaker invariant fixtures Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * chore: drop the released GST-976 changelog fragment carried by the stack 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 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
A merged.jsonl edited after collect (a CRITICAL lowered to INFORMATIONAL) verified clean at main; verify now re-derives the row and reports it dirty.
Text version
Before (main c830c9b):
After:
Why
GST-541: "a forged row can rewrite a finding's label or text and still verify clean." Verify is the check that proves no reviewer's blocker was dropped on the way to the judged set, but it only compared output hashes and line counts. Now it re-reads each reader's unchanged reply and checks every merged row against it, so lowering a blocker in merged.jsonl, or editing the ledger's output event to hide one, makes verify dirty.
Blast radius
Only
verifyin lib/review-ledger.ts changes; collect, judge and the CLI output format are untouched, and a /ship run whose files nobody edited verifies exactly as before (the remote gate ran 3,582 selected tests at 5d2ba4f and 5,968 after the last main merge, all with 0 failures). The stricter rules can only turn clean into dirty. An output with no readable recorded file, or a finding count that no longer matches its ids, is now dirty. The CLI always records the file, and a reply refused for naming the wrong checkout (#3701) still verifiesNOT_REVIEWEDand is voided by a re-sent review, which the new test covers.Approvals
Source: gstack-approvals record for gst-541-verify-binding (display only; not an approval citation).
Summary
Verify re-derives each merged row by index from the unchanged reply (
merged_line_differs), and treats a missing or unrecorded output file, a judgment on a copy of merged.jsonl, merged rows collect never wrote, and a finding count that differs from the recorded ids as dirty. Main's #3701 merged in once under a Rule 19 grant; the only conflict was the test file's imports, and both sides were kept. Three cross-family fix-checks after the merge each found a way to hide a blocker by editing the ledger's output event (review: false, a forgedtree_ok: falseplus a re-sent review, and a droppedfile). Each one has a failing-first test, and verify now re-checks a wrong-tree refusal against the reply's ownREVIEWED_TREEline instead of trusting the event's fields.Main moved again (0c84f4e, v1.92.66.0) and was merged in once more under a second Rule 19 grant; the only conflict was the review-brief import line, resolved to main's line. gstack 1.92.65 then required full review depth for this money-path file. That review found two more defects, each fixed with a failing-first test: verify still trusted the output event's editable
tree_okwhen it accepted an output as a review (now re-derived from the unchanged reply everywhere), and the judge binding compared path strings, so a clean run reached through a symlinked run directory verified dirty (now compared by real path).A third Rule 19 merge brought in main 3d99c22 (v1.92.76.0) with #3845. The only conflict was one doc comment in lib/review-ledger.ts, where #3845's
ledgerBlockersblock met this PR'sreviewed()comment; both were kept. A scoped cross-family review (google/gemini-4-argon) of that splice came back clean, and the receipt was carried from 5d2ba4f.Test Coverage
All new code paths have test coverage.
test/review-dispatch.test.tsadds two tests: the forged-merged-row cases (each verified clean at main c830c9b), and the edited-output-event cases plus a genuine wrong-tree reply that staysNOT_REVIEWEDand is then voided by a re-sent review. Regression proof: the output-event test failed at 721539c, 56ed6e3 and 50dc73c (one new case each) and passes at b30df5c. After the second merge, the same test gained a refused-output-edited-to-accepted case (failed at 781b626) and a clean run collected and judged through a symlinked run directory (failed at f482012); both hold at 5d2ba4f.Tests ran: remote gate 3582 (0 failed, tree 80a2eb808922)
Tests ran: review-dispatch, review-pass, review-targeted 119 (0 failed)
Pre-Landing Review
Pass 1 (specialist, targeted, adversarial) found 5 blocking items, all fixed before the merge. After the merge, the cross-family fix-check on the NOT_REVIEWED edit (openai/gpt-6.1-sol, then google/gemini-4-argon after OpenAI's filter refused the third round) found one blocker per round in three rounds, each fixed with a failing-first test. The fourth round at b30df5c found nothing, and the targeted money reader (classes=money, from the ledger path) returned NO FINDINGS at b30df5c. After the second main merge, the full-depth review at 781b626 (batched specialist and red team) found one blocker, fixed in f482012. The Step 11 voices at f482012 (adversarial, outside voice on google/gemini-4-argon, targeted money) found one more, fixed in 5d2ba4f, plus two notes listed below. One scoped cross-family fix-check (google/gemini-4-argon, granted by GStack Minder) on the touched hunks of both fixes and the targeted money reader both returned NO FINDINGS at 5d2ba4f.
REVIEW_LOOP: passes=2 blocking_found=9 deferred=1 noted=3 fixed=11 scope=frozen fix_checks=6 dispatches=17
Gate edits: none detected (GATE_SCAN tagged=0)
Outside review: cross-family fix-checks by openai/gpt-6.1-sol and google/gemini-4-argon; final verdict FIXCHECK: blocking=0 informational=0 at 5d2ba4f.
Deferred findings
Blocking findings in code this PR did not change (review scope: frozen); filed as issues and not closed by this PR.
lib/review-ledger.ts:314deleting a whole output event with its merged rows verifies clean (no ledger anchor)Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
lib/review-ledger.tsverify depends on the installed parseFindings version, so a parser change can move a countlib/review-ledger.tsa refusal retry that overwrites its output path stays dirty (also at main)lib/review-ledger.tsthe collect API without an output file now fails verify withoutput_file_unrecorded(the CLI always records one)docs/review-policy.mdan actor who rewrites both a reply file and its ledger event's hashes still verifies clean; nothing outside the ledger anchors a reply (the same gap as Deferred review finding: lib/review-ledger.ts:314 — deleting a whole output event with its merged rows verifies clean (n #3719)Issues
Refs #3701
Documentation
Status: current. The read-only re-audit at 50dc73c found no corrections needed, and no files were edited.
Scope: committed diff 2d1b55d..50dc73c on gst-541-verify-binding (lib/review-ledger.ts, test/review-dispatch.test.ts, docs/review-policy.md, changelog.d/gst-541-verify-binding.md). Nothing was staged, unstaged or untracked. Docs that describe
gstack-review-dispatch verifywere found by grep: docs/review-policy.md, ship/DRIVER.md(.tmpl), ship/sections/adversarial.md(.tmpl), capy/skill/gstack/SKILL.md.Documentation health:
merged_line_differs),output_file_missing,judge_merged_not_collected,merged_rows_not_collected, themerged_count_differscount check, the wrong-tree exemption re-derived from the reply, and the known gap for a deleted output event.Documentation coverage:
Debt: docs/review-policy.md is reachable only through other docs, not from README.md or CLAUDE.md (true before this PR). Deleting a whole output event still verifies clean; this is documented as known and tracked in #3719.
Diagram drift: none.
Test plan
UBI_OWNER=gsta221 gstack-pregate --stage tests --remote --spend-cap 2 --timeout 2700 --allow-repo-commands: 5968 tests, 0 failed on tree a6c66c05aa2e at 3fefd1f; 3582 tests, 0 failed on tree 80a2eb808922 at 5d2ba4f ($0.05 each, VM left=0)bun testreview-dispatch, review-pass, review-targeted, review-scope-ledger-count, review-scope and module-size-ratchet at 3fefd1f: 0 failures across 173 testsbun run typecheck: clean