fix(test): align mock latest result schema#290
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughThe LatestResult contract validator now requires ChangesLatestResult schema migration
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
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 |
Summary
Align the mock-backend LatestResult fixtures and P4 contract validator with the current public
CliLatestResultshape.Root cause
The dry-run producer and public type already use the current semantic schema:
verdictexecutionStatussummaryThe mock backend fixtures and P4 validator still taught the old shape where
summarywas a{ passed, failed, skipped }object andverdict/executionStatuswere absent. That lets stale mock responses pass contract tests while rendering malformed text such assummary: [object Object].Change
verdictandexecutionStatus.summaryas a string.Validation
npm test -- test/contract/p4-schema.test.ts test/mock-backend/handlers.smoke.test.tsnpm run typechecknpm run lintnpm run format:checkAll checks passed locally on Node v24.15.0 / npm 11.12.1.
Closes #287
Summary by CodeRabbit
Tests
Test Fixtures