Commit aef0702
Fix CI failure: relax bootstrap-p-value bit-equality claim in trivial-stratum test
CI matrix surfaced a single failing assertion across all 6 failed
Python Tests jobs (5176 pass, 1 fail per matrix):
test_trivial_stratum_reduces_to_strata_none
assert_allclose(r_explicit.p_value, r_implicit.p_value, atol=1e-12)
ACTUAL: 0.475, DESIRED: 0.445 (Δ = 0.030)
Root cause: test design flaw, not methodology.
``generate_survey_multiplier_weights_batch`` takes structurally
different code paths based on whether ``strata`` is None:
- strata-not-None (bootstrap_utils.py:579+): iterates np.unique
(strata), per-stratum batch via generate_bootstrap_weights_batch_numpy.
- strata-None (bootstrap_utils.py:556+): single batch via
generate_bootstrap_weights_batch, which routes through the Rust
backend when available.
Both paths produce different RNG state evolutions even at the same
seed (single batch call vs per-stratum loop advances numpy default_rng
differently), AND the Rust-vs-numpy dispatch divergence on the
strata-None branch adds a second source of multiplier difference on
machines with the Rust backend installed. The test passed locally
(no Rust installed) but fails on CI (Rust present).
Fix: keep the deterministic CvM statistic bit-equal claim
(atol=1e-14, the actual algebraic-identity invariant), relax the
bootstrap p-value claim to a 0.15 absolute closeness band (within
bootstrap noise at B=199; ~4σ). Update the class docstring and the
test docstring to explain why bit-equality on p-values was never
achievable.
The methodology is unaffected — only the test's overclaim on
bootstrap-p bit-equality was wrong.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ce2b91c commit aef0702
1 file changed
Lines changed: 41 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5469 | 5469 | | |
5470 | 5470 | | |
5471 | 5471 | | |
5472 | | - | |
| 5472 | + | |
| 5473 | + | |
| 5474 | + | |
| 5475 | + | |
| 5476 | + | |
| 5477 | + | |
5473 | 5478 | | |
5474 | 5479 | | |
5475 | 5480 | | |
| |||
5610 | 5615 | | |
5611 | 5616 | | |
5612 | 5617 | | |
5613 | | - | |
| 5618 | + | |
5614 | 5619 | | |
5615 | | - | |
5616 | | - | |
| 5620 | + | |
| 5621 | + | |
| 5622 | + | |
| 5623 | + | |
| 5624 | + | |
| 5625 | + | |
| 5626 | + | |
| 5627 | + | |
| 5628 | + | |
| 5629 | + | |
| 5630 | + | |
| 5631 | + | |
| 5632 | + | |
| 5633 | + | |
| 5634 | + | |
| 5635 | + | |
5617 | 5636 | | |
5618 | 5637 | | |
5619 | 5638 | | |
| |||
5635 | 5654 | | |
5636 | 5655 | | |
5637 | 5656 | | |
5638 | | - | |
| 5657 | + | |
| 5658 | + | |
| 5659 | + | |
5639 | 5660 | | |
5640 | 5661 | | |
5641 | 5662 | | |
5642 | 5663 | | |
5643 | 5664 | | |
5644 | 5665 | | |
5645 | | - | |
| 5666 | + | |
| 5667 | + | |
5646 | 5668 | | |
5647 | | - | |
5648 | | - | |
5649 | | - | |
5650 | | - | |
| 5669 | + | |
| 5670 | + | |
| 5671 | + | |
| 5672 | + | |
| 5673 | + | |
| 5674 | + | |
| 5675 | + | |
| 5676 | + | |
| 5677 | + | |
| 5678 | + | |
| 5679 | + | |
| 5680 | + | |
| 5681 | + | |
5651 | 5682 | | |
5652 | 5683 | | |
5653 | 5684 | | |
| |||
0 commit comments