Skip to content

Commit 4ca547e

Browse files
committed
test(helix): MANTISSA-FILL gate strict (Codex P2 on #485)
Codex caught the wording-vs-code mismatch: PR body + EPIPHANIES say golden 'beats' every seed, but the asserts used >=/<= so a tie would pass while being reported as a win. Tightening to strict > and < matches the prose. The measured numbers (k=256: 192 vs 141-150, 3 vs 5-6; k=1024: 208 vs 205-206, 7 vs 11) strictly satisfy the strict form, so the receipt is unchanged. A future regression that merely ties would now correctly RED the probe. Inline comment cites the Codex review + EPIPHANIES for the audit trail. https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY
1 parent a32cb17 commit 4ca547e

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

crates/helix/tests/probe_mantissa_fill.rs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,22 @@ fn probe_mantissa_fill_golden_beats_uniform_random() {
130130
let (g_occ, g_max) = fill_metrics(golden_points(k).into_iter());
131131
for &seed in &SEEDS {
132132
let (r_occ, r_max) = fill_metrics(random_disk_points(k, seed).into_iter());
133+
// STRICT inequalities — Codex P2 on #485 caught the wording mismatch:
134+
// the doc says golden BEATS every seed, but `>=`/`<=` silently
135+
// admit ties; a future regression that merely ties would still
136+
// pass under the loose form and be reported as a win. Strict
137+
// gate matches the prose. (The measured numbers strictly
138+
// satisfy this form, so tightening loses no data — see receipts
139+
// in EPIPHANIES E-PROBE-MANTISSA-1.)
133140
assert!(
134-
g_occ >= r_occ,
135-
"k={k} seed={seed:#x}: golden occupied {g_occ} < random {r_occ} — \
136-
MANTISSA-FILL RED: golden mantissa does not out-cover uniform random"
141+
g_occ > r_occ,
142+
"k={k} seed={seed:#x}: golden occupied {g_occ} did not STRICTLY beat random {r_occ} — \
143+
MANTISSA-FILL RED: golden mantissa does not strictly out-cover uniform random"
137144
);
138145
assert!(
139-
g_max <= r_max,
140-
"k={k} seed={seed:#x}: golden max-bin {g_max} > random {r_max} — \
141-
MANTISSA-FILL RED: golden mantissa piles up worse than uniform random"
146+
g_max < r_max,
147+
"k={k} seed={seed:#x}: golden max-bin {g_max} did not STRICTLY beat random {r_max} — \
148+
MANTISSA-FILL RED: golden mantissa does not strictly out-spread uniform random"
142149
);
143150
}
144151
// Print the receipt numbers so the probe run is quotable.

0 commit comments

Comments
 (0)