Summary
test diff --dry-run emits a sample whose verdict changes from passed to failed but exits successfully. The same logical result on the real path exits 1, contradicting both the command help and official exit contract.
Validation source commit: 60d55e47883e924ff1a5f0ab1fe67a25bc3b0877.
Code path
DOCUMENTATION.md:229-236: Documentation specifies exit 1 for differing verdicts and provides a dry-run invocation.
src/commands/test.ts:3768-3796: Dry-run constructs passed versus failed with verdictChanged true, then returns before the exit gate.
src/commands/test.ts:3861-3870: The real path enforces exit 1 only after the dry-run early return.
src/commands/test.ts:8215-8222: Command help repeats the exit contract and directly awaits runDiff.
src/commands/test.test.ts:2979-3054: Tests require exit 1 for a real verdict flip but require the dry-run flip to resolve.
- Repository-local validation artifact: Minimal bounded differential witness.
Steps to reproduce
This report is based on a source-control-flow validation against the commit above.
- Check out the source commit listed in this report.
- Inspect the code path and contract anchors listed above.
- Exercise the described boundary/state path: Dry-run emits a verdict-changing diff but returns before the documented exit-1 gate.
- Compare the observed behavior with the expected contract below.
Validation note: From the snapshot root, execute <local validation artifact>. It verifies the official 0/1 contract, the dry-run passed-to-failed sample with verdictChanged=true, its early successful return, the later real-path CLIError(1), and the differential test expectations. The bounded control flow proves dry-run resolves and therefore exits 0 for a reported verdict difference.
Expected behavior
The implementation should preserve the repository contract described by the documentation, public type, parser, serializer, or sibling implementation anchors above.
Actual behavior
test diff --dry-run emits a sample whose verdict changes from passed to failed but exits successfully. The same logical result on the real path exits 1, contradicting both the command help and official exit contract.
Existing coverage
I did not find an existing issue or PR title that appears to cover this exact root cause in the pre-submission check.
Suggested fix
Test diff dry-run exit-status gate
Suggested tests
- Add a regression test for: Dry-run emits a verdict-changing diff but returns before the documented exit-1 gate.
- Include the boundary value or state transition described above so the old behavior fails before the fix.
Submitted with Codex.
Summary
test diff --dry-runemits a sample whose verdict changes from passed to failed but exits successfully. The same logical result on the real path exits 1, contradicting both the command help and official exit contract.Validation source commit:
60d55e47883e924ff1a5f0ab1fe67a25bc3b0877.Code path
DOCUMENTATION.md:229-236: Documentation specifies exit 1 for differing verdicts and provides a dry-run invocation.src/commands/test.ts:3768-3796: Dry-run constructs passed versus failed with verdictChanged true, then returns before the exit gate.src/commands/test.ts:3861-3870: The real path enforces exit 1 only after the dry-run early return.src/commands/test.ts:8215-8222: Command help repeats the exit contract and directly awaits runDiff.src/commands/test.test.ts:2979-3054: Tests require exit 1 for a real verdict flip but require the dry-run flip to resolve.Steps to reproduce
This report is based on a source-control-flow validation against the commit above.
Validation note: From the snapshot root, execute
<local validation artifact>. It verifies the official 0/1 contract, the dry-run passed-to-failed sample with verdictChanged=true, its early successful return, the later real-path CLIError(1), and the differential test expectations. The bounded control flow proves dry-run resolves and therefore exits 0 for a reported verdict difference.Expected behavior
The implementation should preserve the repository contract described by the documentation, public type, parser, serializer, or sibling implementation anchors above.
Actual behavior
test diff --dry-runemits a sample whose verdict changes from passed to failed but exits successfully. The same logical result on the real path exits 1, contradicting both the command help and official exit contract.Existing coverage
I did not find an existing issue or PR title that appears to cover this exact root cause in the pre-submission check.
Suggested fix
Test diff dry-run exit-status gate
Suggested tests
Submitted with Codex.