From f8995751de925571d4eec669ab7ab8b1c3d76cb9 Mon Sep 17 00:00:00 2001 From: Void Agent Date: Thu, 20 Aug 2026 16:55:49 +0100 Subject: fix(eval): P5/P6 sieve-rank ladder replaces hardcoded FLAGGED_SIEVE_PREDS - probe_report: dynamic lo/hi (no more hardcoded [101,200]) - main(): probe range derived from range_end ([range_end+1, range_end+1000]) - P6 = exact (no probe misses), P5(k) = errors match rank-k sieve signature - _sieve_rank_signature: computes composites with all factors > p_k - _compute_sieve_rank: identifies rank from model's error predictions - build_report.py: probe_fig uses sieve rank for coloring - Tests updated for P5/P6 codes (48/48 green) --- tests/test_data.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'tests/test_data.py') diff --git a/tests/test_data.py b/tests/test_data.py index 9f651fb..2fb131e 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -75,10 +75,11 @@ def test_make_batch_shapes_and_padding(): def test_flagged_composites_are_composite(): - # sanity: the diagnostic set really is composite, has no divisors <= 7, and covers - # the probe's candidate window [102, 211] (209 = 11*19 included — Addendum 3) - from src.eval import FLAGGED_SIEVE_PREDS - assert FLAGGED_SIEVE_PREDS == {121, 143, 169, 187, 209} - for n in FLAGGED_SIEVE_PREDS: + # sanity: the rank-4 sieve signature set is composite, has no divisors <= 7, + # and covers the probe's candidate window [102, 211] (Addendum 3/6) + from src.eval import _sieve_rank_signature + sig = _sieve_rank_signature(4, 101, 200) + assert sig == {121, 143, 169, 187, 209}, f"unexpected rank-4 signature: {sig}" + for n in sig: assert any(n % d == 0 for d in range(2, int(n ** 0.5) + 1)) assert all(n % d != 0 for d in (2, 3, 5, 7)) -- cgit v1.2.3