Repository navigation
v3.18.8
What's new
Bug Fixes
ce:review now carries the route narrowing reason all the way to finalize and the artifact. This closes the last gap left open by #984, where the behavior was pinned by a test rather than fixed.
deriveRoute requires a route_narrowing_reason whenever the model proposes a route narrower than the meet over a finding's contributing survivors. That rule worked at merge time and was inert everywhere after it. MergedFindingSchema carried the resulting route — autofix_class, owner, requires_verification — but not the reason, so the finalize-phase verifier reconstructed a proposed_route from those carried fields and fabricated route_narrowing_reason: 'carried route verification' to get past the guard. A check that constructs its own passing input cannot fail.
The consequence was downstream and silent: partitionFindings routes strictly on owner, with no severity carve-out. A finding whose owner narrowed to release left the fixer queue for report_only — so a P0 could drop out of actionable work with nothing in the artifact recording why.
The reason now travels on the merge wire and onto the persisted finding, and finalize checks it against the real meet in both directions: a route narrower than the meet must carry a reason, and a route equal to the meet must not — a reason without a narrowing claims a decision that was never made. The second half was missing entirely, not merely unenforced. This adds a new reject reason, merged finding route narrowing reason mismatch.
The pairing is enforced in the pipeline rather than in the artifact schema, because the schema cannot see contributing survivors and therefore cannot compute the meet. That constraint is documented inline where a reader would otherwise expect a superRefine, alongside the existing validated/validation_reason rule it resembles.
Contract impact: review-summary-schema.json gains one optional field. schema_version stays 1 — the field is additive, so existing artifacts still validate. findings-schema.json and review-pipeline-schema.json are byte-identical: reviewers do not author route narrowing, and the reviewer-facing shapes (ParentFindingSchema, SubAgentFindingSchema, SubAgentReturnSchema) are untouched.
Verification: the behavior-changing assertions were confirmed failing against unpatched sources before the fix, so they test the gap rather than the implementation. Coverage includes a narrowed route with no reason, an unnarrowed route carrying one, a narrowed route whose reason reaches the artifact, and the specific P0 → release → report_only path that motivated the change. tests/unit/review-pipeline-finalize.test.ts previously pinned the permissive behavior; it is updated rather than removed and now asserts the reason is carried. 3106 unit tests pass, with typecheck, Biome, content-integrity, and all four drift gates clean. (#998, 9d45da3)