-
Notifications
You must be signed in to change notification settings - Fork 0
fix(compare): add type discriminator to reliability metrics output #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Adds `type` field to reliability metrics schemas to enable proper Zod discriminated union parsing: - ReliabilityMetricsSchema: `type: 'run'` for capture results - TrialsReliabilityMetricsSchema: `type: 'trial'` for trial results This allows consumers to use z.discriminatedUnion() for type-safe parsing of reliability metrics from comparison reports. Closes #42 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Pull Request Review: Add type discriminator to reliability metrics outputSummaryThis PR adds Code Quality ✅Strengths:
Adherence to conventions:
Test Coverage ✅Excellent test coverage:
Test quality:
Breaking Change Considerations
|
Updates skill documentation to reflect the new `type` field in reliability metrics output: - Add `type: 'run'` to CaptureResult reliability examples - Add `type: 'trial'` to TrialsReliabilityMetrics examples - Add discriminated union usage example for type-safe parsing Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Pull Request Review: Add type discriminator to reliability metrics outputSummaryThis PR adds Code Quality ✅Strengths:
Adherence to conventions:
Test Coverage ✅Excellent test coverage:
Coverage checklist:
Breaking Change Considerations
|
Summary
type: 'run'discriminator toReliabilityMetricsSchemafor capture result comparisonstype: 'trial'discriminator toTrialsReliabilityMetricsSchemafor trial comparisonsz.discriminatedUnion()for type-safe parsing of reliability metricsBreaking Change
Consumers with strict Zod schemas will need to add the
typefield:type: z.literal('run')forReliabilityMetricstype: z.literal('trial')forTrialsReliabilityMetricsTest plan
bun run checkpassesbun testpasses (499 tests)Closes #42
🤖 Generated with Claude Code