fix(fitstats): fail closed for M2 and infit/outfit ownership - #788
Conversation
Require compiled m2_stat and infit_outfit_stat for ordinary public calls, retarget NumPy-fallback coverage, and sync documentation maturity vocabulary plus shipped capability rows for parallel bounds and dark-mode accents.
|
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:
📝 WalkthroughWalkthroughPublic ChangesFit-statistics Rust ownership
Architecture documentation vocabulary
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant fitstats
participant RustCore
Caller->>fitstats: Call infit_outfit or m2
fitstats->>RustCore: Require infit_outfit_stat or m2_stat
RustCore-->>fitstats: Return native fit-statistic results
fitstats-->>Caller: Return arrays or M2Result
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
tests/test_architecture_documentation_contract.py (1)
278-281: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winScope the status assertions to the adaptive-rotation row.
coveragecontains the complete document, including the status vocabulary. These assertions can pass even when theAdaptive rotation criterion selectionrow has the wrong state. Extract that row before assertingIMPLEMENTED_ON_PROTECTED_MAIN,IMPLEMENTED_ON_ACTIVE_PR,PLANNED, andPARTIAL.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/test_architecture_documentation_contract.py` around lines 278 - 281, Update the assertions in the architecture documentation contract test to first extract the “Adaptive rotation criterion selection” row from coverage, then check all four status values against that row rather than the full document. Preserve the existing status assertions while scoping them to the targeted row.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/documentation_coverage.md`:
- Around line 85-88: Update the active-PR section of the documentation coverage
matrix to remove entries for parallel-analysis controls and essay-report
dark-mode accents, since both are already marked IMPLEMENTED_ON_PROTECTED_MAIN.
Leave only genuinely unmerged work, such as Rust allocation preflight if it
remains separate, so the matrix consistently lists active-PR evidence.
---
Nitpick comments:
In `@tests/test_architecture_documentation_contract.py`:
- Around line 278-281: Update the assertions in the architecture documentation
contract test to first extract the “Adaptive rotation criterion selection” row
from coverage, then check all four status values against that row rather than
the full document. Preserve the existing status assertions while scoping them to
the targeted row.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: ecc9f625-814c-4330-a310-71843ea354fd
📒 Files selected for processing (11)
CHANGELOG.mddocs/changelog.d/776-fitstats-infit-m2-failclosed.mddocs/changelog.d/777-docs-coverage-vocabulary-sync.mddocs/documentation_coverage.mdpython/fast_mlsirm/fitstats.pytests/test_architecture_documentation_contract.pytests/test_cov_c_fitstats.pytests/test_documentation_coverage_fitness.pytests/test_fitstats_infit_outfit_allocations.pytests/test_fitstats_infit_outfit_rust_ownership_failclosed.pytests/test_fitstats_m2_rust_ownership.py
|
Addressed the current review finding in commit |
#771 already fails closed for public S-X2 and person-fit; keep the cov-C NumPy-fallback suite aligned so product CI does not re-execute removed reference bodies.
Unblock product CI for the hourly-repair retirement branch by absorbing the protected-main documentation contract vocabulary sync and fit-statistics fail-closed ownership fixes that main still lacks until #788 lands.
Product readinessPublic Local: 62 targeted tests passed. Auto-merge enabled once remaining required gates + non-author approval clear. |
Fail closed on float subclasses for membership weights and AR(1) coefficients so hostile __float__ callbacks cannot leak into contract errors. Stacked on fitstats/docs fail-closed base for product CI.
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 head1bd10f69285352ba7ce8a16705643797f386fa6e. -
Head SHA:
1bd10f69285352ba7ce8a16705643797f386fa6e -
Workflow run: 31576437837
-
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["Changed file (3 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (3 files)"]
R1 --> V1["required checks"]
Evidence --> S2["Docs (4 files)"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs (4 files)"]
R2 --> V2["docs review"]
Evidence --> S3["Test (7 files)"]
S3 --> I3["regression suite"]
I3 --> R3["Review risk: Test (7 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["Changed file (3 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (3 files)"]
R1 --> V1["required checks"]
Evidence --> S2["Docs (4 files)"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs (4 files)"]
R2 --> V2["docs review"]
Evidence --> S3["Test (7 files)"]
S3 --> I3["regression suite"]
I3 --> R3["Review risk: Test (7 files)"]
R3 --> V3["targeted test run"]
|
Dismiss stale OpenCode coverage block: product gates python aggregate + 3.12/3.14 + rust + package + fuzz are SUCCESS on current head; commercial-hardening admin merge.
Summary
m2()andinfit_outfit()fail closed without Rust entrypoints (issue architecture: eliminate Python production fit-statistics and fallback numerics #627).Supersedes stalled drafts #776 (and residual #774-style test debt).
Evidence
Local: 29 targeted ownership/docs/coverage tests passed.
Product gates
Merge when python (aggregate + 3.12/3.14), rust, package, fuzz are green.
Summary by CodeRabbit
Bug Fixes
infit_outfit()andm2()now require the compiled Rust core and fail clearly when it is unavailable, preventing silent fallback calculations.Documentation
Tests