fix(fitstats): require Rust for public infit/outfit - #776
Conversation
Fail closed when the compiled core or infit_outfit_stat is missing, and retarget former NumPy-fallback coverage to the fail-closed ownership contract (issue #627).
|
Important Review skippedDraft detected. 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:
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 |
Retarget S-X² and person-fit NumPy-fallback coverage tests to the Rust-required ownership contract so product CI stays green with public infit/outfit fail-closed ownership.
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 headee5353eb4166259ef6f999e14267a8f7b2ea2e3f. -
Head SHA:
ee5353eb4166259ef6f999e14267a8f7b2ea2e3f -
Workflow run: 31538279442
-
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 (2 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (2 files)"]
R1 --> V1["required checks"]
Evidence --> S2["Docs: 775-fitstats-infit-outfit-failclosed.md"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs: 775-fitstats-infit-outfit-failclosed.md"]
R2 --> V2["docs review"]
Evidence --> S3["Test (3 files)"]
S3 --> I3["regression suite"]
I3 --> R3["Review risk: Test (3 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 (2 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (2 files)"]
R1 --> V1["required checks"]
Evidence --> S2["Docs: 775-fitstats-infit-outfit-failclosed.md"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs: 775-fitstats-infit-outfit-failclosed.md"]
R2 --> V2["docs review"]
Evidence --> S3["Test (3 files)"]
S3 --> I3["regression suite"]
I3 --> R3["Review risk: Test (3 files)"]
R3 --> V3["targeted test run"]
|
seonghobae
left a comment
There was a problem hiding this comment.
Current-head CI exposed a real Rust-ownership defect in public M2, not an infrastructure failure. Python 3.12 job 93970883354 fails test_public_m2_requires_compiled_rust_core: after validation, m2() still executes _m2_numpy(...) when _core_module() is absent or lacks m2_stat, contradicting issue #627 and the already fail-closed S-X²/person-fit/infit-outfit contract. Smallest root-cause fix on this exact head: in the ordinary MMLE path, replace the optional if core is not None and hasattr(core, "m2_stat") ... else: _m2_numpy(...) dispatch with a fail-closed guard if core is None or not hasattr(core, "m2_stat"): raise RuntimeError("fit statistics require the compiled Rust core"), then call core.m2_stat(...) unconditionally. Keep _m2_numpy as a private parity/reference oracle only; do not weaken or rewrite the RED test. After the source change, rerun the exact failing test first, then the full Python matrix and current-head gates. This comment does not claim the separate CMLE/structured-population Python paths are Rust-owned; those remain distinct #627 work.
|
Superseded by combined fail-closed + docs vocabulary PR. |
Summary
Public
infit_outfit()no longer silently falls back to Python/NumPy residual arithmetic when the compiled core is absent. Matches the S-X² / person-fit fail-closed ownership from #771.Also retargets remaining S-X² / person-fit / infit NumPy-fallback coverage suites to the fail-closed contract so product pytest does not depend on #774 first.
Supersedes draft #775 (issue #627).
Evidence
Product gates
Merge when python (aggregate + 3.12/3.14), rust, package, fuzz are green.