fix(scoring): harden policy integer callback boundary - #869
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 (5)
📝 WalkthroughWalkthroughScoring-policy integer validation now rejects caller-defined coercion callbacks and integer subclasses before dispatch. Exact built-in integers and genuine NumPy integer scalars remain supported and normalize to Python ChangesScoring integer safety
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The PR hardens integer validation at the scoring-policy boundary without changing scoring arithmetic; 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 |
There was a problem hiding this comment.
Pull request overview
OpenCode cannot approve yet because required coverage evidence did not pass.
Review outcome
1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
-
Problem: The required coverage-evidence job result was
failure, so OpenCode cannot establish approval sufficiency for this head. -
Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.
-
Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present. -
Result: REQUEST_CHANGES
-
Reason: coverage-evidence result was
failure, so required test/docstring evidence was not proven for current head4c7afb86237ebe33e5c5468aa6b43f24e368dbab. -
Head SHA:
4c7afb86237ebe33e5c5468aa6b43f24e368dbab -
Workflow run: 31935795128
-
Workflow attempt: 1
Coverage evidence
Coverage evidence job did not run or did not publish coverage evidence.
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Docs: 868-scoring-policy-integer-callback-safety.md"]
S1 --> I1["operator or user guidance"]
I1 --> R1["Review risk: Docs: 868-scoring-policy-integer-callback-safety.md"]
R1 --> V1["docs review"]
Evidence --> S2["Changed file (2 files)"]
S2 --> I2["repository behavior"]
I2 --> R2["Review risk: Changed file (2 files)"]
R2 --> V2["required checks"]
Evidence --> S3["Test (2 files)"]
S3 --> I3["regression suite"]
I3 --> R3["Review risk: Test (2 files)"]
R3 --> V3["targeted test run"]
OpenCode Review Overview
Pull request overviewOpenCode cannot approve yet because required coverage evidence did not pass. Review outcome1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
Coverage evidenceCoverage evidence job did not run or did not publish coverage evidence. Changed-File Evidence Mapflowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Docs: 868-scoring-policy-integer-callback-safety.md"]
S1 --> I1["operator or user guidance"]
I1 --> R1["Review risk: Docs: 868-scoring-policy-integer-callback-safety.md"]
R1 --> V1["docs review"]
Evidence --> S2["Changed file (2 files)"]
S2 --> I2["repository behavior"]
I2 --> R2["Review risk: Changed file (2 files)"]
R2 --> V2["required checks"]
Evidence --> S3["Test (2 files)"]
S3 --> I3["regression suite"]
I3 --> R3["Review risk: Test (2 files)"]
R3 --> V3["targeted test run"]
|
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Superseded infrastructure-only review. This REQUEST_CHANGES is explicitly anchored to predecessor head 4c7afb8 and failed coverage-evidence run 31935795128. The live source head is f38bfe6; its exact-head hosted checks observed before the Ready transition are terminal-success with no failure, and the review contains no source-code finding. Dismissing only the obsolete predecessor-head blocker; this is not approval and fresh Ready-state required workflows remain authoritative.
Scope
Fix #868 by requiring scoring-policy positive-integer controls to establish a package-trusted scalar identity before any caller-dispatchable coercion, without changing scoring or psychometric arithmetic.
Test-first lineage
ea9dc8d0d14753efe2bc0596bbc6e64355775f8dexercisesEnginePolicy.minimum_raters_per_responseand the shared scoring integer validators, requiring arbitrary__index__providers and integer subclasses to fail with zero callback execution while preserving genuine NumPy integer compatibility.c6feb3769c7d9eb5cd37a5d795d442235fda1b91rejects policy integer callbacks before coercion.2d9fce97c1bdcac86350e19dfd207b79a90234cbapplies the same exact-type boundary to the shared positive-integer validator.8089f3f2682f3beb2ccf46fafe865fdcdabfe054records the boundary in canonical documentation; exact current head4c7afb86237ebe33e5c5468aa6b43f24e368dbabpreserves the five-file validation/test/release slice.Preserved boundary
__index__providers are rejected before conversion or representation callbacks.Exact current state
fb67ced09d8ee00542c05d56374537a9a7239751.4c7afb86237ebe33e5c5468aa6b43f24e368dbab.Integration still requires a qualifying independent non-author approval on this unchanged exact head. Automated checks do not replace that decision, and predecessor-head evidence does not transfer. No gate is weakened or bypassed.
Fixes #868.