fix(scoring): seal enterprise observation admission - #1043
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 (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughEnterprise observation validation now requires exact runtime types for requests, evidence references, and statuses. Regression tests verify that rejected subclasses cannot execute callbacks before validation completes. A changelog entry documents the behavior. ChangesEnterprise observation callback safety
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The PR tightens enterprise observation input validation to reject caller-controlled subclasses before provenance or status handling, with focused regression coverage; no actionable merge-blocking risk remains beyond normal checks and review. Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
|
@opencode-agent review Re-review exact current head |
|
Current-head review for 0f25fc0: required checks are terminal-success on this exact head. Please reacquire same-head approval and do not transfer stale predecessor or coverage-infrastructure review state. No source failure is shown. @opencode-agent review @cwl-noema-review review |
|
Reviewed exact current head 0f25fc0.
Please regenerate protected review evidence for this exact head. @opencode-agent review @cwl-noema-review review |
Pull request was converted to draft
|
Reviewed exact HEAD |
|
Caution Review failedAn error occurred during the review process. Please try again later. 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 |
Closes #1042.
Defect
The enterprise issue observation adapter admitted caller-defined
ScoringRequestandEvidenceReferencesubclasses throughisinstance(...)before provenance/fingerprint reads, and passed caller-defined string subclasses intoObservationStatus(...). Those paths could execute caller callbacks while semantic controls and provenance were still being validated.RED → GREEN
d92b62e786daf245dcadd8dec5d414315ffdf48a: hostile request/evidence subclasses and a hostile status-string subclass require package-ownedAssessmentSpecErrorrejection with zero callback execution. The protected-main implementation reaches metadata/fingerprint or enum hash/equality callbacks.5474ff4c58e3337b47828c4da87c82ef7ed21372: require exactScoringRequest/EvidenceReferenceidentities and accept status only as an exactObservationStatusmember or exact built-in serialized string before enum lookup.4c46667f48c4fff40c3a200718e09c61a3ab9ffe.Ownership boundary
This changes only Python validation/provenance admission. Evidence counts remain simple validation/report metadata; no scoring, calibration, likelihood, estimator, ranking, utility, causal, or psychometric/statistical production arithmetic changes.
Verification boundary
Current branch is three commits ahead / zero behind protected
main@04d0bc21a2a20693bcf16108cd76d394fe844d23, with a three-file effective diff. Keep Draft until exact-current-head CI, security/scanners, coverage/docstrings, package/fuzz evidence, and independent review are terminal and clean; predecessor-head evidence does not transfer.Summary by CodeRabbit
Bug Fixes
Tests
Documentation