Skip to content

fix(fitstats): require Rust for public infit/outfit - #776

Closed
seonghobae wants to merge 6 commits into
codex/fast-judge-accepted-type-regressionfrom
fix/fitstats-infit-outfit-failclosed-green
Closed

fix(fitstats): require Rust for public infit/outfit#776
seonghobae wants to merge 6 commits into
codex/fast-judge-accepted-type-regressionfrom
fix/fitstats-infit-outfit-failclosed-green

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

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

  • Local: ownership fail-closed + allocation + cov_c + fitstats suites green (67 passed, Python 3.14)

Product gates

Merge when python (aggregate + 3.12/3.14), rust, package, fuzz are green.

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).
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 6d161619-95fc-433c-b92a-9422e5595365

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before 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 head ee5353eb4166259ef6f999e14267a8f7b2ea2e3f.

  • 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"]
Loading

@opencode-agent

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: ee5353eb4166259ef6f999e14267a8f7b2ea2e3f
  • Workflow run: 31538279442
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

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 success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before 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 head ee5353eb4166259ef6f999e14267a8f7b2ea2e3f.

  • 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"]
Loading

@seonghobae
seonghobae changed the base branch from main to codex/fast-judge-accepted-type-regression August 11, 2026 23:09
@seonghobae
seonghobae marked this pull request as draft August 11, 2026 23:53
@seonghobae
seonghobae marked this pull request as ready for review August 12, 2026 00:07
@seonghobae
seonghobae marked this pull request as draft August 12, 2026 00:12

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Superseded by combined fail-closed + docs vocabulary PR.

@seonghobae seonghobae closed this Aug 12, 2026
seonghobae added a commit that referenced this pull request Aug 12, 2026
Require m2_stat for ordinary public m2(), refuse incomplete cores before
the private NumPy reference, and retarget coverage that still expected
silent fallback. Extends #627 ownership with infit/outfit (#776).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant