fix(crm): harden public numeric controls - #857
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 (4)
Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review. 📝 WalkthroughWalkthrough
ChangesCRM control callback safety
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change is limited to hardening public numeric-control validation without changing CRM calculations or runtime configuration, and no actionable merge-blocking risk remains after normal checks and review. Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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 headb1a43d47864018a76a5705bf650eba77b67b815c. -
Head SHA:
b1a43d47864018a76a5705bf650eba77b67b815c -
Workflow run: 31924075594
-
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 (2 files)"]
S1 --> I1["operator or user guidance"]
I1 --> R1["Review risk: Docs (2 files)"]
R1 --> V1["docs review"]
Evidence --> S2["Changed file: crm.py"]
S2 --> I2["repository behavior"]
I2 --> R2["Review risk: Changed file: crm.py"]
R2 --> V2["required checks"]
Evidence --> S3["Test: test_crm_control_callbacks.py"]
S3 --> I3["regression suite"]
I3 --> R3["Review risk: Test: test_crm_control_callbacks.py"]
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 (2 files)"]
S1 --> I1["operator or user guidance"]
I1 --> R1["Review risk: Docs (2 files)"]
R1 --> V1["docs review"]
Evidence --> S2["Changed file: crm.py"]
S2 --> I2["repository behavior"]
I2 --> R2["Review risk: Changed file: crm.py"]
R2 --> V2["required checks"]
Evidence --> S3["Test: test_crm_control_callbacks.py"]
S3 --> I3["regression suite"]
I3 --> R3["Review risk: Test: test_crm_control_callbacks.py"]
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. |
Scope
Fix #856 at the public Samejima continuous-response-model control-marshalling boundary without changing CRM psychometric arithmetic.
Protected
maindiscovered the compiled core before validating public scalar controls. It also compared or normalizedq_theta,max_iterandtolthrough caller-dispatchable numeric operations before establishing trusted scalar identities. Caller-defined Python/NumPy scalar subclasses could therefore execute comparison, conversion, ufunc or representation callbacks before the PyO3 boundary.Test-first lineage
129cc24cb9768a5cfc87bcf26cf511145fb0ace8requires hostile Python integer, NumPy-integer and float subclasses to fail before caller callbacks and native-core discovery, while preserving genuine NumPy controls and all Rust-embedded quadrature orders.fd51394091bdeb50745dc4757310610268f91ce4specifies package-owned failure for a trusted but non-representable oversized tolerance.d53a89384165b959fda6de76b12fee687c87bc12admits only exact built-in or supported genuine NumPy scalar identities, validates controls before native discovery, preserves the Rust quadrature domain{7, 11, 15, 21, 31, 41}, retains the existing iteration limit and normalizes only admitted values.c97f6c3af5b237f09d054426b902b4fa3b943c6fand exact current headb1a43d47864018a76a5705bf650eba77b67b815cadd canonical changelog and APA-traced doctoring evidence.Scientific and architecture boundary
q_theta,max_iterand finite strictly-positive tolerance semantics are preserved.Exact current state
fb67ced09d8ee00542c05d56374537a9a7239751.b1a43d47864018a76a5705bf650eba77b67b815c.No gate is weakened or bypassed. Any future source-head movement invalidates this evidence.
Fixes #856.
Summary by CodeRabbit
Bug Fixes
Documentation
Tests