Attack item R-3 ยท 2026-07-29 ยท harness
findings/evolution/audits/2026-07-29-probe-hardening-loop/harness/xi_oracle_parity.py ยท
gate mise run xi:oracle / /xi:oracle
Every other kernel in this repo is pinned to a canonical FOSS oracle at โค1e-9 โ bartels, cecp,
coxstuart, hoeffding, lkurt, recurr, signflux. chatterjee_xi, the rotation cascade's
now-binding stage, was the only unpinned statistic. Nothing downstream can be trusted while the
estimand itself is unpinned, so this had to precede every measurement.
Expected a real divergence under ties. The prior session had measured 2e-3 between the repo
and xicorpy and hypothesised a tie-formula disagreement โ the repo always using the general
l_i denominator, the reference switching to the simplified nยฒโ1 form when it
detects no ties.
That prediction was wrong, and the reason matters.
XICOR breaks X-ties at random (rank(xvec, ties.method="random")) and exposes
no seed argument. A pointwise comparison is therefore only meaningful when there are no X-ties.
| Leg | Construction | What it pins |
|---|---|---|
| 1 โ exact | Continuous X โ no X-ties โ both sides deterministic. Y-tie fraction swept 0 / 5 / 10 / 30.9 / 50%, across independent, quadratic and near-monotone dependence | the formula, including the general l_i denominator, at โค1e-9 |
| 2 โ distributional | X-ties present โ XICOR is a random variable. B=2000 draws; two-sided empirical p with LinโHan's (1+#)/(1+B) smoothing, ฮฑ=0.01 Bonferroni-adjusted across 6 cases | that the repo draws from the same estimand |
Y-tie fractions are swept 0โ50% deliberately: that band is precisely where the simplified and general forms diverge, and the hypothesised 2e-3 gap was attributed to ~10% Y-ties.
case y_ties repo XICOR |diff| L1_independent_y000 0.000 -0.011568753 -0.011568753 2.44e-15 L1_independent_y100 0.100 -0.022417659 -0.022417659 4.44e-16 L1_independent_y309 0.309 -0.010649721 -0.010649721 8.88e-16 L1_independent_y500 0.500 0.022020022 0.022020022 1.55e-15 L1_quadratic_y309 0.309 0.601991216 0.601991216 2.22e-16 L1_monotone_y309 0.309 0.951658716 0.951658716 0.00e+00 ... 15 cases, max |diff| = 2.44e-15
Floating-point exact โ six orders of magnitude tighter than the 1e-9 gate, at every Y-tie fraction including the 30.9% that matches the worst real cell.
case x_ties repo XICOR mean sd z p_two verdict L2_independent_x100 0.100 -0.039642 -0.040459 0.00459 0.18 0.8486 ok L2_independent_x500 0.500 0.003532 -0.009294 0.00883 1.45 0.1619 ok L2_quadratic_x100 0.100 0.644543 0.649344 0.00176 -2.73 0.0060 ok L2_quadratic_x500 0.500 0.626789 0.626989 0.00329 -0.06 0.9475 ok
rank(x, ties.method="random") for X, ties.method="max" on ยฑY.xicorpy, a third-party package โ not against canon. XICOR never branches on ties, so
the tie-formula hypothesis had nothing to attach to. xicorpy is additionally unsafe here:
its tie detector tests duplicate (x,y) row pairs, not tied values within a column, so
a 30.9%-tied column with distinct pairs reports "no ties" and proceeds silently./xi:oracle, /xi:doctor,
/xi:check-full, following the repo's established oracle-namespace pattern.The first version of leg 2 asked whether the repo value fell inside XICOR's observed
[min, max] over 200 draws. It flagged L2_quadratic_x100 for sitting
3.1e-5 below the observed minimum at z = โ2.63. That is a support test built on an order
statistic, and min/max over 200 draws is a poor support estimator โ the "failure" was an ordinary draw.
Replaced with the two-sided smoothed empirical p-value, which is the construction the research
flagged XICOR's own permutation branch for omitting (its mean(rp > xi) is
unsmoothed, so not conservative). Recorded rather than quietly corrected, because a gate that has
produced a false positive should carry that history.
L2_quadratic_x100 clears the adjusted threshold (p=0.0060 vs 0.00167) but is the one case
that is not comfortably central, and z held at โ2.73 when B went from 200 to 2000. The honest reading:
the repo's deterministic hash tie-break is one specific rearrangement, not a random draw, so there
is no reason for it to be distributed as a uniform draw from the rearrangement distribution. A
systematically slightly-low value is expected. That is exactly the estimand mismatch Chatterjee's own
remedy addresses:
"Alternatively, one can consider taking the average of ฮพโ over all possible increasing rearrangements of the Xแตข's."
โ arXiv:1909.10140, remark (8)
So this case is evidence for R-2 (de-randomisation), and it is carried forward as such.
| Item | Why |
|---|---|
| R-2 de-randomise ฮพ over R rearrangements | strengthened by the leg-2 non-central case above |
| Confirm formulas against the authoritative PDF | all ฮพ formula quotes come from the ar5iv HTML rendering; arxiv.org/html/1909.10140 returns 404 (2019 predates native HTML). Research gap #954. The oracle is pinned to XICOR's code, which is unaffected โ but the prose in KB.md is not |
No ties=TRUE variance leg yet | this iteration pins the coefficient. The sd / p-value path (R-8) is untested |
Evidence: harness/xi_oracle_parity_evidence.json (21 cases, full numbers).
Reproduce: mise run xi:oracle.