Skip to content

test(ecm): close the FLUX-1 auto-ECM xfail with a stack-robust fold-error gate#103

Merged
jam-sudo merged 1 commit into
mainfrom
fix/close-oatp-auto-ecm-xfail
Jul 6, 2026
Merged

test(ecm): close the FLUX-1 auto-ECM xfail with a stack-robust fold-error gate#103
jam-sudo merged 1 commit into
mainfrom
fix/close-oatp-auto-ecm-xfail

Conversation

@jam-sudo

@jam-sudo jam-sudo commented Jul 6, 2026

Copy link
Copy Markdown
Owner

What

Closes the last FLUX-1-deferred OATP1B1 loose end: the two xfailed tests in tests/integration/test_predict_auto_ecm.py.

Why they were xfailed

Both test_pravastatin_auto_ecm_activates and test_pitavastatin_auto_ecm_activates pinned an exact auto-ECM Cmax (0.0294 / 0.00116) to 5% tolerance. Those pins were computed under the old OATP1B1 abundance 5.0e5. The 2026-06-04 re-anchor lowered it to 1.3e5 (calibrated on pitavastatin, a non-holdout substrate — restoring Invariant #5), which shifted the predict()-path Cmax by 53% / 90%, so the pins went stale and the tests were xfailed pending a canonical-env pin regen.

The fix

The tests' stated purpose is mechanical (auto-activation fires, oatp1b1:auto_ecm:* warning emitted, no-ECM path doesn't leak) — and absolute Cmax accuracy is already guarded by the sibling test_oatp_ecm_statins.py via a fold-error gate. So this replaces the fragile exact pins with the same stack-robust fold-error gate vs the FDA label (pravastatin FE < 3.0, pitavastatin FE < 3.2) and removes the two xfail decorators.

This closes the xfail durably — no CI-pin dependency, and robust to both the ~16% cross-stack numerics drift and the pending +BSA abundance re-derivation.

Verification

Public-clone deterministic state (DrugBank + logp_correction hidden, n_mc_samples=0):

  • pravastatin auto-ECM Cmax 0.0450 (FDA 0.045, FE 1.00)
  • pitavastatin auto-ECM Cmax 0.0022 (FDA 0.0035, FE 1.58)
  • all 4 tests in the file pass strict; ruff clean.

No engine/data change; test-only. Headline 2.743 untouched.

…rror gate

test_predict_auto_ecm.py pinned two auto-ECM Cmax values (pravastatin 0.0294,
pitavastatin 0.00116) to 5% tolerance. Those pins were computed under the old
OATP1B1 abundance 5.0e5 and went stale when the 2026-06-04 re-anchor lowered it
to 1.3e5 (calibrated on pitavastatin, non-holdout) — 53% / 90% off — so both
tests were xfailed pending a canonical-env pin regen.

The tests' stated purpose is mechanical (auto-activation fires, warning emitted,
no-ECM path doesn't leak), and absolute Cmax accuracy is already guarded by the
sibling test_oatp_ecm_statins.py via a fold-error gate. So replace the fragile
exact pins with the same stack-robust fold-error gate vs the FDA label
(pravastatin FE<3.0, pitavastatin FE<3.2) and remove the two xfail decorators.
This closes the xfail durably (no CI-pin dependency) and is robust to the
pending +BSA abundance re-derivation.

Verified in public-clone deterministic state (DrugBank+logp_correction hidden,
n_mc_samples=0): pravastatin Cmax 0.0450 (FE 1.00), pitavastatin 0.0022
(FE 1.58); all 4 tests in the file pass strict.
@jam-sudo jam-sudo enabled auto-merge (squash) July 6, 2026 21:59
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@jam-sudo jam-sudo merged commit ee4f1e9 into main Jul 6, 2026
2 checks passed
jam-sudo added a commit that referenced this pull request Jul 7, 2026
…closing the auto-ECM xfail (#104)

A 3-agent investigation of the diagnosis section 9 '+BSA / PSu,inf OATP' lever
found the re-anchor already shipped (#66: abundance 5.0e5->1.3e5 onto non-holdout
pitavastatin) and the lever headline-inert (DE-44). #103 closed the last loose end
(test_predict_auto_ecm) via a stack-robust fold-error gate.

The remaining +BSA PS reparameterization is now formally deferred: the per-substrate
PSu,inf(+BSA)/Kp values are in the paywalled Li/Benet 2020 primary source (not to be
fabricated), and it is near-zero-observable (the abundance re-anchor absorbs the PS
change; pravastatin is validation-only) on top of headline-inert. Records this in the
DE-44 status line and a 2026-07-06 experiment-log entry so it is a closed, documented
decision rather than a dangling TODO.

Co-authored-by: jam-sudo <jam-sudo@users.noreply.github.com>
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