fix(review): claude reviewer path actually works (#51 C2/C3/H3) - #91
Merged
Conversation
Independent re-verification found #84 fixed only the codex direction; the entire claude reviewer path (the Codex->Claude direction) was dead. - C2: claude's --json-schema takes INLINE JSON, not a file path (verified against claude 2.1.241 — a path exits 1 with "not valid JSON"). Pass JSON.stringify(FINDINGS_SCHEMA) on the claude branch; codex's --output-schema keeps the file path. - C3: claude -p --output-format json returns an ARRAY of stream events, not {findings}. The runner treated the event list as the findings list -> 9 phantom empty findings. Added extractClaudeStructuredOutput() to unwrap the terminal result event (or {result} envelope) to the schema-conforming payload before normalizing; a non-conforming reviewer degrades to invalid, never phantoms. - H3 (meta-lesson): the tests were falsely green — the claude runner test fed a fabricated {findings} claude never emits, and the smoke test checked flag NAMES only. Now: the invocation test asserts --json-schema is inline JSON (not the path) deterministically; the runner test drives the REAL event-array shape and asserts one real finding not one-per-event; a new binary-gated live test runs claude with our inline schema and asserts the flag-parse error is absent (would have caught C2). extractClaudeStructuredOutput unit-tested across every shape. Adapters regenerated (the codex mu-review mirror carried the identical bug — and it is the copy that runs under the Codex host). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KwyFyRC6pepaK6DuMK7YeT
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.
Campaign-2 fix #2 — CRITICAL C2+C3 (re-opens #51 B4). From the independent re-verification: #84 fixed only the codex direction; the entire claude reviewer path (Codex→Claude) was dead.
Bugs
--json-schematakes inline JSON, not a file path (verified against claude 2.1.241 — a path exits 1 with "not valid JSON"). The code reused codex'sschemaPathfor both.-p --output-format jsonreturns an array of stream events, not{findings}. The runner treated the event list as the findings list → 9 phantom empty findings (even once C2 is fixed).Fixes
--json-schema JSON.stringify(FINDINGS_SCHEMA)on the claude branch; codex's--output-schemakeeps the file path.extractClaudeStructuredOutput()unwraps the terminalresultevent (or{result}envelope) to the schema-conforming payload before normalizing; a non-conforming reviewer degrades toinvalid, never phantoms.{findings}claude never emits + name-only smoke test. Now: the invocation test asserts--json-schemais inline JSON not the path (deterministic, always runs); the runner test drives the real event-array shape and asserts one real finding not one-per-event; a live binary-gated test actually runs claude with our inline schema and asserts the flag-parse error is absent.Verification
test:cross-review: 23/23 — including the live claude smoke test (ran claude 17.7s, inline schema accepted).🤖 Generated with Claude Code