voyage/lib/review
Kjell Tore Guttormsen 40f6ae1177
fix(review): close the gate's fail-open paths an independent review found
An adversarial read of d88245c reproduced 15 problems; all fixed here, each
with a test that fails on the old code.

- verdict-gate: a greener verdict must be backed by the LAST fence being a
  `json` block of the right shape, with no BLOCKER in the JSON (any case),
  in `## Findings (BLOCKER)`, or a differing finding-id list; two verdict
  lines and more than one file argument are exit 2. ({}, null, lowercase
  "blocker", a trailing ```jsonc and a later json fence all gave exit 0.)
- engine-findings: a transcribed "narrower" key can no longer lower an
  engine tier; absolute paths under --repo-root match the scope; "12" lines
  parse; an empty scope is an error; out-of-scope engine findings are
  unverified (`engine:out-of-scope`) and forbid ALLOW.
- recurrence: the catch-all engine keys and keys normalised from unknown
  ones are never proposed; the same unfixed finding in two iterations is not
  a recurrence; proposals are validated before they are offered; \r/U+2028
  and damaged markers are refused; writes go through a symlinked CLAUDE.md.
  Prose points --repo at the session directory, not the git toplevel.
- Workflow substrate: engines are counted from what arrived, and the
  verdict's floor is recomputed from the coordinator's findings; now tested
  by running the script with stubbed Workflow globals. Two literal NUL bytes
  written as \u0000 (git saw the file as binary).
- Trimming keeps Pass 1's "Also flagged by" provenance; `## Declined to
  Judge` and remediation steps are required from review_version 1.1 only
  (N-1); the zero-diff review now carries the JSON block the gate needs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 20:03:16 +02:00
..
coordinator-contract.mjs fix(review): close the gate's fail-open paths an independent review found 2026-10-06 20:03:16 +02:00
engine-findings.mjs fix(review): close the gate's fail-open paths an independent review found 2026-10-06 20:03:16 +02:00
fidelity-diff.mjs feat(voyage): S10 — NW2 part A (Workflow port + fidelity harness + smoke) 2026-06-18 14:40:19 +02:00
findings-schema.mjs feat(review): the review is a gate - verdict in the file, CC engine, project memory 2026-10-06 19:45:52 +02:00
gold-scorer.mjs fix(review): write the gold-scorer key separator as an escape, not a raw NUL byte 2026-09-17 15:36:18 +02:00
plan-review-dedup.mjs fix(voyage): S23 — make /trekplan Phase 9 dedup executable (defect #1) 2026-06-19 21:12:36 +02:00
recurrence.mjs fix(review): close the gate's fail-open paths an independent review found 2026-10-06 20:03:16 +02:00
rule-catalogue.mjs fix(review): close the gate's fail-open paths an independent review found 2026-10-06 20:03:16 +02:00
verdict-gate.mjs fix(review): close the gate's fail-open paths an independent review found 2026-10-06 20:03:16 +02:00