research(rectification): angle-timing A1 — real vs shuffled and age-preserving jittered dates, 0/9 tests significant (BUG-1141)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017eEAG8HD3mm8gsKXgk8uU8
This commit is contained in:
Jesse_Chen
2026-10-01 10:55:46 +08:00
co-authored by Claude Opus 5.5
parent f507570448
commit 915c3e829d
6 changed files with 11010 additions and 0 deletions
+18
View File
@@ -81,3 +81,21 @@ def test_separation_matrices_have_one_row_per_usable_event():
assert tr.shape[0] == sum(1 for e in events if e.precision != "year")
assert sp.shape == (len(events), len(chart.offsets))
assert np.isfinite(sp).all() and (sp >= 0).all() and (sp <= 45).all()
def test_a1_runner_is_deterministic_and_reports_every_preregistered_test():
from scripts.research import angle_timing_research as runner
cases = at.load_cases()[:2]
first = runner.run_a1(cases, 3, lambda _m: None)
second = runner.run_a1(cases, 3, lambda _m: None)
assert at.stable_json(first) == at.stable_json(second)
assert first["tests"] == 9
assert first["bonferroni_percentile"] == pytest.approx(100 * (1 - 0.05 / 9), abs=1e-3)
for tech in at.TECHNIQUES:
for orb in at.ORBS:
for radius in runner.RADII:
cell = first["table"][tech][str(orb)][str(radius)]
assert 0.0 <= cell["real_mean_rank"] <= 1.0
assert 0.0 <= cell["percentile_beaten"] <= 100.0
assert len(first["shuffled_means"][tech][str(orb)][str(radius)]) == 3