Repository navigation
fix(cli): report verification failures in structured output - #1835
Conversation
mldangelo-oai
left a comment
There was a problem hiding this comment.
I reproduced the missing JSON result with real rejected ChatGPT authentication in isolated test state. This now returns a useful VERIFICATION_FAILED error and exit 2, while keeping the original diagnostic and sign-in guidance visible. Normal text output and the full-output envelope also behave correctly.
I checked real verification before and after repairing a synthetic application, ran Standard and bounded Deep scans with both fixes applied, and reran the focused CLI/hosted tests against current main. The verdicts, interruption behavior, and successful output contracts are preserved. Reusing the existing failure formatter and progress pattern keeps this small and consistent with the other commands. This is ready to merge.
mldangelo-oai
left a comment
There was a problem hiding this comment.
The real-terminal check confirms the original issue: the old CLI printed the authentication error inside the progress screen and then erased it; this fix leaves it visible and still returns structured JSON errors.
I rechecked the integration with current main and Codex 0.164, including before/after verification, interactive Markdown and JSON, and real Standard and bounded Deep scans. Those checks passed, as did the 118 focused regressions and the refreshed head’s full source CI. The fix stays small and follows the existing error-handling pattern. Approving this refreshed head.
Summary
Fixes #1817. Failed
verify-fix --jsoncalls previously returned empty stdout, and a Codex exit without diagnostics provided no explanation. Failed verification now returns a structured error with exit code 2 while preserving stderr diagnostics.Changes
Testing
Approved head:
1383e2cdcd7c4be93f3aca7f0b0319b82374ccd7. The final integration with main53da0ecc80df21d69a7a264539f1a2352764fe75was tested with Codex/SDK 0.164.0; merged mainb97013c17bbd277d38268afd6775214577d1bb70has the identical source tree.VERIFICATION_FAILEDand exit 2 in JSON mode. Terminal visibility, JSON diagnostics, and sign-in advice passed again with Codex 0.164. Human and full-output error contracts also passed in the earlier 0.163 run.still_vulnerable/exit 1 and readableFIXED/exit 0. Independent HTTP checks confirmed the security boundary and legitimate behavior; source files remained unchanged.2887100861). The final 0.164 integration passed all 118 focused verification/diagnostic/hosted tests, types/generated-file checks, formatting, builds, portable plugin checks, andgit diff --check.Risk and rollout
Failed JSON/JSONL calls now emit
status: "failed",code: "VERIFICATION_FAILED", andmessageinstead of empty stdout. Their full-output form usesok: false; other formats retain stderr-only failures. Automation should inspect the exit code and failure fields. Completed verdicts, interruption behavior, and worker configuration remain unchanged.Public disclosure review