Skip to content

coverage-evidence sandbox never builds fast-mlsirm's compiled Rust extension, failing every test file that imports fast_mlsirm._core directly #1292

Description

@seonghobae

Problem

The central coverage-evidence job (OpenCode Review Dispatch workflow, "Measure test and docstring evidence" step) fails fast-mlsirm#951 at current head 286bd2dbba5da8348643b6ad8145967972813ae9 with Coverage Decision: FAIL, Failure count: 2 — but neither failure reflects a real problem in the PR's diff.

Evidence

Run: https://github.com/ContextualWisdomLab/.github/actions/runs/32620501327/job/97147899712

Failure 1 — 11 test files fail to collect:

collected 4609 items / 11 errors / 1 skipped
...
tests/test_cat_rust_ownership.py:14: in <module>
    import fast_mlsirm._core as core
E   ModuleNotFoundError: No module named 'fast_mlsirm._core'

(same for test_cat_selection_rust_ownership.py, test_cov_f_fit.py, test_inference_nonfinite_uncertainty.py, test_inference_rust_vcov_ownership.py, test_linking_fixed_anchor_rust_ownership.py, test_observed_information_rust_ownership.py, test_observed_information_work_budget.py, test_rt_rust_max_iter_backstop.py, test_test_form_rust_ownership.py, test_validation_policy_contract.py)

I confirmed these same unguarded import fast_mlsirm._core as core module-level imports already exist on main today (e.g. tests/test_cat_rust_ownership.py), not introduced by PR #951 — so this isn't the PR's doing. fast-mlsirm is Rust-first by design (ARCHITECTURE.md/CLAUDE.md: "the Rust core is the primary numeric path," built via maturin as fast_mlsirm._core), and these specific test files are the fail-first ownership contracts that require the compiled core to exist — a graceful skip isn't appropriate for them (that would silently hide a rust-ownership regression). The coverage-evidence sandbox apparently never builds this extension (the log shows no maturin/cargo build step at all, only pip-level Python toolchain checks), so any PR touching these paths — or possibly any fast-mlsirm PR at all, since these files are unconditionally collected — hits 11 fatal collection errors before a single test in the affected files can run.

Failure 2 — GPU parity test:

$ pytest tests/test_marginal_parity.py::test_marginal_gpu_agrees_with_cpu_loosely -q --junitxml=gpu-junit.xml
ERROR: found no collectors for /work/tests/test_marginal_parity.py::test_marginal_gpu_agrees_with_cpu_loosely

Likely downstream of the same missing-_core problem (or a stale/renamed test id) — not independently investigated.

Likely same root cause as a known issue

This looks like the same class of gap as #591 ("fix(review): update offline Rust coverage toolchain" — the trusted offline coverage image's baked-in Rust toolchain was too old to build a target crate for codec-carver, silently failing the compiled-extension step before any test ran). fast-mlsirm pins rust-toolchain.toml to channel = "1.97.1"; I did not confirm whether the coverage sandbox even attempts a Rust/maturin build for fast-mlsirm (no such step appears in this job's log at all, unlike #591's evidence which shows an explicit failing Rust step) — that distinction matters for whoever fixes this: either the build step is missing entirely for this repo's pyproject/maturin shape, or it runs and fails silently upstream of what I could see in the tail of the log.

Impact

Blocks OpenCode approval (REQUEST_CHANGES posted regardless of actual PR content) for any fast-mlsirm PR whose coverage-evidence run collects the full tests/ directory — i.e. potentially most/all of them, independent of the PR's own changes.

Not attempting a fix

Same reasoning as #1250 and #591: the coverage sandbox's build/install pipeline is intentionally hardened (offline, tokenless, hash-pinned) and I don't have visibility into how it provisions the Rust/maturin toolchain or whether that's even attempted for this repo's pyproject.toml (maturin build-backend). Recording reproducible evidence for whoever owns that provisioning step rather than guessing at a fix.

Related

Agent: Claude

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: ci-cdCI, GitHub Actions, checks, release, or supply chainpriority: highHigh-priority or P1 worktype: bugDefect or incorrect behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions