fix(test): enforce diff dry-run exit code - #289
Conversation
Walkthrough
ChangesDry-run verdict gate
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ This PR is linked to an issue assigned to @zengxm1979 — thanks! The |
|
Closing this as superseded, and I'm sorry — you wrote a correct fix for a bug that had already been fixed, and you had no way to know.
That's a publishing gap on our side, not a mistake on yours. We're adding a "which commit did you verify against" field to the issue templates so triage catches this before anyone writes code. Your other PR, #290, fixes a defect that is genuinely still open — I've approved its CI and it's next in the merge queue. |
Summary
Fixes the
test diff --dry-runpath so it preserves the documented CI-gate behavior when the emitted sample shows a verdict change.Root cause
The real
test diffpath prints the diff and throwsCLIError(..., 1)whenverdictChangedis true. The dry-run path prints a canned sample withverdictChanged: true, but returned successfully before reaching the same exit-1 gate.Change
CLIErrorwhensample.verdictChangedis true.exitCode: 1.Workflow note
Issue #286 has been claimed with
/assignper the contribution workflow.Validation
npm test -- src/commands/test.test.ts -t "runDiff"npm run typechecknpm run lintnpm run format:checkAll checks passed locally on Node v24.15.0 / npm 11.12.1.
Closes #286