test(ecm): close the FLUX-1 auto-ECM xfail with a stack-robust fold-error gate#103
Merged
Conversation
…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.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_activatesandtest_pitavastatin_auto_ecm_activatespinned 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 siblingtest_oatp_ecm_statins.pyvia 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 twoxfaildecorators.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):No engine/data change; test-only. Headline 2.743 untouched.