From 1b141e3e6d8d888021098a38749c3062774b19ce Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 12 Aug 2026 13:35:58 +0000 Subject: [PATCH 1/2] probes: W5 v2 RUN complete -- B2 genuinely FAILS (real diffusion resolved), B3 VOID confirmed at full headline scale The v2 run (committed as 106ca605, launched after that commit) completed. Two real findings, one a reversal: B2 REVERSES from v1's PASS to a genuine FAIL. v1's PASS (anisotropy 1.2134) was an artifact of the same confound class this whole arc kept catching: an inert operator (8 fixed iterations added ~0.003% variance) inherited its apparent isotropy from a mask sitting only 1.72 sigma from the bump -- analytically, that truncation alone predicts a 1.208 ratio, matching v1's "1.213 asymptote" almost exactly. v2 fixed both confounds: mask clearance raised to 3.35 sigma (baseline through it now measures an essentially clean 1.0046) and iterations scaled to a real physical diffusion target (confirmed real: raw rel-L2 vs the unsmoothed input = 0.190, fitted sigma_ref=0.0580 close to the predicted 0.0559). With both confounds gone, the ADI operator's own anisotropy is visible for the first time: 1.5251, a genuine ~0.52 anisotropy contribution from the operator, failing the 1.25 bar. Two Fibonacci-stride tridiagonal sweeps do NOT approximate isotropic 2D diffusion at this configuration. domino.rs's gather-design claim is REFUTED at this test point, reversing v1's "unblocked" reading. B3's VOID is CONFIRMED, not just surviving, at the real headline population (not the earlier 62k-point sub-sample): 99.68% of the qualifying population's control links (n_qualifying=4,782,017) land on a pure Fibonacci offset -- 99.95% of the moved links, dominated by 2584=F(18) itself. Two independent N four orders of magnitude apart (62,208 and 4,782,017) land within 0.3 percentage points of each other -- directly answering codex's original subsampling concern with the full population, not a sample. B4 on the corrected methodology: ratio climbs 0.84->~1.03 from n=8 to n=17, noisy at the smallest sub-floor n, settling near parity by n=12. n=19/21 out of budget under V-matched scaling (mechanism stated, not silently dropped). Board homes: weather-w-probes-v1.md SS1 gets the full v2 RUN section (v1 text kept, marked superseded, not deleted); EPIPHANIES gets a third dated update (not a new entry -- same lesson, applied to B2 via the same v2 fix built for B3); PR_ARC_INVENTORY gets the results entry (status: RUN complete, awaiting a PR since the background job finished after #937 merged as pure hygiene); STATUS_BOARD D-W5 updated to RUN COMPLETE. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01CcpLeEC3XK8Eye53GKBVvi --- .claude/board/EPIPHANIES.md | 35 ++++ .claude/board/PR_ARC_INVENTORY.md | 56 ++++++ .claude/board/STATUS_BOARD.md | 2 +- .claude/plans/weather-w-probes-v1.md | 108 ++++++----- probes/weather-p1/spiral_adi_probe.json | 227 +++++++++++++++--------- 5 files changed, 307 insertions(+), 121 deletions(-) diff --git a/.claude/board/EPIPHANIES.md b/.claude/board/EPIPHANIES.md index 8873f855c..c273bd556 100644 --- a/.claude/board/EPIPHANIES.md +++ b/.claude/board/EPIPHANIES.md @@ -40,6 +40,41 @@ targeted verification measurement, both committed. > sweep across N and control constructions would be needed to call the > universal form settled. +> **★ THIRD UPDATE (2026-08-12, v2 headline RUN landed) — STRENGTHENED, at +> the real scale, on the full uncapped population.** The v2 rerun +> (`106ca605`, no subsampling cap) measured the actual headline population +> directly: **99.68 % of the qualifying-band population's control links +> (n_qualifying=4 782 017) land on a pure Fibonacci offset** — 99.95 % of +> the moved links specifically — dominated by offset 2584=F(18) itself +> (4 745 846 of 4 769 097 moved links), with the small remainder at +> 6765=F(20), 10946=F(21), and 13530=2·F(20) (a Fibonacci harmonic, not a +> counterexample). This is the SAME order of confirmation as the earlier +> N=62 208 check (99.38 %), now on the real headline scale with the exact +> subsampling defect the second correction above worried about removed +> entirely. **Second correction's caveat stands as written** (one +> construction, now TWO scales, still not a sweep across constructions — +> the "does not exist" phrasing remains restated, not un-restated) — but +> the evidentiary base is now materially stronger: two independent N, +> four orders of magnitude apart (62 208 vs 4 782 017 qualifying points), +> both landing within 0.3 percentage points of each other. +> +> **And a genuinely new, larger result rode along in the same run: B2 now +> FAILS.** v1's B2 PASS (anisotropy 1.2134) is now understood to have been +> an artifact of the SAME kind of confound this epiphany already +> catalogued for B3 — an inert operator (8 fixed iterations added ~0.003 % +> variance) inherited its apparent "isotropy" from a mask sitting only +> 1.72σ from the bump, whose own truncation analytically predicts a 1.208 +> ratio, matching v1's number almost exactly. v2 fixed the mask clearance +> (3.35σ; baseline through it now measures an essentially clean 1.0046) +> AND scaled the iterations to a real physical diffusion target — and with +> both confounds gone, the ADI operator's own anisotropy is revealed for +> the first time: **1.5251, a genuine ~0.52 anisotropy contribution from +> the operator itself**, failing the 1.25 bar. Full detail: +> `weather-w-probes-v1.md` §1's v2 RUN section. Not filed as a separate +> epiphany — it is the SAME lesson (a control/baseline that cannot +> discriminate carries zero information when it "passes") applied to B2 +> instead of B3, discovered by the same v2 fix that was built for B3. + **The claim, AS ORIGINALLY WRITTEN below (kept for the record; read through both corrections above).** On a Vogel/golden lattice, a *local* non-Fibonacci control for stride-structure experiments **does not exist** diff --git a/.claude/board/PR_ARC_INVENTORY.md b/.claude/board/PR_ARC_INVENTORY.md index 9875e7e6e..6cce524ca 100644 --- a/.claude/board/PR_ARC_INVENTORY.md +++ b/.claude/board/PR_ARC_INVENTORY.md @@ -54,6 +54,62 @@ **Status:** MERGED (`e6e27829`). Branch `claude/jirak-math-theorems-harvest-rfii13` → `main`. Doc/plan/board only. +## 2026-08-12 — the W5 v2 RUN lands: B2 genuinely FAILS, B3's VOID is CONFIRMED at full headline scale (results of the fix committed in #936/`106ca605`; PR pending) + +- **Added.** `spiral_adi_probe.json` v2 (headline N=7 651 227, full-band + control, V-matched iterations, bump at 3.35σ mask clearance) + a third + dated update to `E-ON-A-GOLDEN-LATTICE-LOCALITY-IS-FIBONACCI-MEMBERSHIP-1`. +- **Locked — B2 REVERSES from v1's PASS to a genuine FAIL, and the + reversal is the finding, not noise.** v1's PASS (anisotropy 1.2134) was + an artifact of the exact same confound class this whole arc has been + catching all week: an inert operator (8 fixed iterations added ~0.003 % + variance at N=7.65M) inherited its apparent isotropy from a mask sitting + only 1.72σ from the bump — analytically, that truncation alone predicts + a 1.208 ratio, matching v1's "1.213 asymptote" almost exactly. v2 fixed + BOTH confounds at once: mask clearance raised to 3.35σ (baseline through + it now measures an essentially clean **1.0046**) and iterations scaled + to a real physical diffusion target (`V=σ²/4`, derived from the measured + mesh spacing — confirmed real: raw rel-L2 vs the unsmoothed input = + 0.190, fitted σ_ref=0.0580 close to the predicted 0.0559). With both + confounds gone, **the ADI operator's own anisotropic character is + visible for the first time: 1.5251 — a genuine ~0.52 anisotropy + contribution from the operator, failing the 1.25 bar.** Two Fibonacci- + stride tridiagonal sweeps do NOT approximate isotropic 2D diffusion at + this configuration; they smooth preferentially along the parastichy + chain geometry. **`domino.rs`'s gather-design claim is REFUTED at this + test point**, reversing v1's "unblocked" reading (which never actually + demonstrated diffusion occurred in the first place). +- **Locked — B3's VOID is now confirmed on the REAL headline population, + not a 62k-point sub-sample, and the confirmation is STRONGER than + before.** Full-band histogram at N=7.65M (`n_qualifying=4 782 017`): + **99.68 %** of the qualifying population's control links land on a pure + Fibonacci offset (99.95 % of the moved links), dominated by offset + 2584=F(18) itself; the small remainder at F(20), F(21), 2·F(20) — a + Fibonacci harmonic, not a counterexample. Two independent N four orders + of magnitude apart (62 208 and 4 782 017) land within 0.3 percentage + points of each other — directly answering codex's original subsampling + concern with the strongest available evidence (the full population, not + a sample of it). +- **Locked — B4 on the corrected methodology**: ratio climbs 0.84→~1.03 + from n=8 to n=17, noisy at the smallest sub-floor n (1–4 iterations, + little averaging), settling near parity by n=12. n=19/21 out of budget + under V-matched scaling (iters grows ~linearly with N at fixed physical + target — stated mechanism, not a silent drop). No knee at n≈17 for the + smoothing-quality question, consistent with v1's reading on that + specific axis even though the smoothing itself is now known anisotropic. +- **Epiphany update, not a new entry.** The B2 reversal is filed as a + THIRD update to the existing epiphany rather than a new one — same + underlying lesson (a control/baseline that cannot discriminate carries + zero information when it "passes"), same session, applied to a second + bar via the identical v2 fix. +- **Confidence.** High on all three verdicts now — full-band, uncapped, + headline-scale, with an explicit clean baseline measurement backing the + B2 reversal rather than an inferred one. + +**Status:** RUN complete; awaiting a PR to land these results (background +job completed after #937 merged as pure hygiene). Zero product code — +probe results + board. + ## 2026-08-12 — lance-graph #936 (MERGED) — W5 v1 RUN: B2 PASS / B3 VOID / B4 smooth, and codex found all three verdicts were built on sand (v2 fix in flight, not yet landed) - **Added.** `spiral_adi_probe.json` — v1's headline (N=3·F(17)²=7 651 227) diff --git a/.claude/board/STATUS_BOARD.md b/.claude/board/STATUS_BOARD.md index cd8414ce6..e3f64d96c 100644 --- a/.claude/board/STATUS_BOARD.md +++ b/.claude/board/STATUS_BOARD.md @@ -25,7 +25,7 @@ Wave 1 = parallel, no operator gate beyond go-ahead; gated rows named. | D-id | Deliverable | Wave | Status | Feeds | |---|---|---|---|---| -| D-W5 | Spiral-ADI anisotropy (v2 spec: full-band control, V-matched iterations, bump 3.35σ from mask) | 1 | **v1 RUN ⊘ SUPERSEDED (4 codex defects on #936: subsampled B3 control, inert-operator-indistinguishable B2 fit, mask-truncation-explains-the-"asymptote", uncommitted verification artifact) — v2 RUN IN FLIGHT, results in a follow-up PR** | domino.rs gather design claim now PENDING v2 (not unblocked — v1's B2 PASS never demonstrated diffusion occurred); mechanism-level epiphany survives on its unaffected sub-cap measurement | +| D-W5 | Spiral-ADI anisotropy (v2, full-band control, V-matched iterations, bump 3.35σ from mask) | 1 | **v2 RUN COMPLETE — B2 FAIL (real diffusion now resolved: aniso 1.5251 vs 1.25 bar, baseline through the clean mask = 1.0046, operator contributes ~0.52 anisotropy); B3 VOID CONFIRMED at full headline scale (99.68 % of 4.78M qualifying links land on a pure Fibonacci offset — stronger than the earlier 62k-point check, not weaker)** | domino.rs gather-design claim REFUTED at this test point (v1's "unblocked" was the same inert-operator artifact that also drove B2's false PASS); `E-ON-A-GOLDEN-LATTICE-LOCALITY-IS-FIBONACCI-MEMBERSHIP-1` strengthened, third dated update | | D-W2sA | Golden-vs-grid pairing on real cos-lat metric (zero-ties G1, CV G2) | 1 | **RUN — G1 VOID, G2/G4 FAIL (control degenerate: two identical translated grids are symmetry-uniform, CV ~1e-12 — cannot lose any evenness comparison; diagnosed via smoke test, run as-specified, `E-A-CONTROL-THAT-CANNOT-LOSE-IS-NO-CONTROL-1`)** | honest falsifier for evenness DEFERRED (offset/rotation-varied or spacing-mismatched control); §10.5 properties 1–3 untouched | | D-W6 | Two-component deconvolution (geo + bow, global lstsq, 38 eqs / 2 params; B3 = stranded stratification via v_rel) | 1 | Queued | dipole vector-sum identification; F17 gate | | D-W2sB | α-window sweep β∈[0.85,1.15] | gated (W2s-a) | Queued | corridor α discriminator | diff --git a/.claude/plans/weather-w-probes-v1.md b/.claude/plans/weather-w-probes-v1.md index ed53db54c..4b9d0faf2 100644 --- a/.claude/plans/weather-w-probes-v1.md +++ b/.claude/plans/weather-w-probes-v1.md @@ -272,49 +272,75 @@ verdicts: {B2, B3, B4}}`. --- -### RUN, 2026-08-12 (`spiral_adi_probe.py` / `.json`) — B2 PASS, B3 VOID (structurally, with the diagnosis verified), B4 smooth with no knee +### RUN v1, 2026-08-12 — ⊘ SUPERSEDED same day (codex found 4 real defects on PR #936; all fixed, v2 below) -| bar | verdict | measured | +*(Original v1 text kept for the record, not deleted — read through the +superseding note: v1 reported B2 PASS / B3 VOID / B4 smooth, but its +control was subsampled at 250k/band, its iteration count never resolved +real diffusion, and its bump sat close enough to the qualifying-band mask +edge that the mask itself explained the reported anisotropy. See +`PR_ARC_INVENTORY.md`'s #936 entry for the full defect list and diagnosis. +v2 below is the methodologically sound rerun.)* + +### RUN v2, 2026-08-12 (`spiral_adi_probe.py` / `.json`, `106ca605`) — B2 now FAILS for real, B3 VOID CONFIRMED at full headline scale, and the reversal is the finding + +| bar | v1 (compromised) | v2 (full-band control, V-matched iterations, bump 3.35σ from mask) | |---|---|---| -| **B2 ISO** (headline N=7 651 227) | **PASS** | iso-fit rel-L2 **0.00053** vs the 0.15 bar (≈280× margin); anisotropy **1.2134** vs the 1.25 bar | -| **B3 CONTROL** | **VOID** (its own pre-registered rule) | ratio control/fib = **0.9996** vs the ≥1.5 bar — the distance-matched control smooths identically | -| **B4 floor sweep** | run in full, n=8..19 (n=21 NOT RUN per budget, recorded) | iso 0.4405 → 0.1004 → 0.0245 → 0.0057 → 0.00053 → 0.0001; aniso 6.55 → 1.65 → 1.28 → 1.223 → 1.2134 → 1.2129 | - -**B3's VOID is structural, and the diagnosis was VERIFIED before being -written down** (`E-ON-A-GOLDEN-LATTICE-LOCALITY-IS-FIBONACCI-MEMBERSHIP-1`): -measured at N=62 208, **99.38 % of the control's links have a Fibonacci -|Δk|** (top offsets 233, 987, 610, plus 1220 = 2·610). On a Vogel lattice -the near neighbours ARE the Fibonacci-offset points (three-distance -theorem: physical proximity ⟺ convergent-denominator index offset), so a -distance-matched local control CANNOT leave the family — the third control -generation didn't fail at its job, it proved the job impossible. The -Fibonacci-dependence question is unanswerable by any local control on this -lattice; a genuine falsifier must change the lattice (jittered grid / -Halton under the same stencil), deferred as its own experiment. - -**B4's two-sided pre-registered reading lands on the second branch:** the -curve improves smoothly and monotonically from n=8 through n=19 with **no -knee at n≈17** — on this metric the index floor is a **safety margin, not -a mechanism**, exactly the outcome the §0 rule said must be reported -plainly if measured. (The floor retains its independent justification from -the convergent-error ladder and the T1/T2/T3/T4 duel results; what this -sweep shows is that the ADI smoothing quality specifically does not -exhibit a threshold at the floor.) - -**Honest residual, flagged for any future bar-tightening:** anisotropy -asymptotes at **~1.213 across three decades of N** (n=12→19) — an -N-independent structural ~21 % second-moment anisotropy of the -band-restricted polar chain geometry itself, not a resolution artifact. -It passes the 1.25 bar; a future bar below ~1.22 would need this -mechanism addressed first, not more points. - -**Two implementation notes a rerun should know:** the qualifying-band rule -(inner radius ≥ r_floor) resolves to **bands 4–8**, and the brief's older -"bands 3–8" label is off-by-one against its own parenthetical (the rule -wins). Discovery found the expected emergent pairs per band — -[2584, 4181] = F(18)/F(19) in the qualifying bands at the headline N, with -the inner (excluded) bands showing the lower-index transition exactly as -the parastichy-index arithmetic predicts. +| **B2 ISO** (headline N=7 651 227) | PASS (iso 0.00053, aniso 1.2134) — but iters=8 added ~0.003 % variance: near-inert | **FAIL** — iso **0.1216** (still ≤0.15, PASSES that half) but anisotropy **1.5251** vs the 1.25 bar (FAILS that half) — real diffusion occurred (raw rel-L2 vs the unsmoothed input = **0.190**, fitted σ_ref=0.0580 vs the predicted 0.0559, both confirming the operator actually moved the bump) and it is genuinely anisotropic | +| **B3 CONTROL** | VOID (ratio 0.9996, but ~74 % of headline sources were silent self-links) | **VOID, CONFIRMED** — ratio **1.0266**, now on a full-band control with only 0.27 % structural self-linking | +| **Baseline (new in v2)** — unsmoothed input bump through the identical mask, no ADI at all | not computed in v1 | anisotropy **1.0046** — essentially isotropic, confirming the v2 geometry fix (3.35σ mask clearance) removed the mask-contamination codex flagged | + +**The reversal, stated plainly.** v1's "PASS" was an artifact of an inert +operator: 8 fixed iterations at N=7.65M add essentially no blur, so the +fitted bump was still close to the unsmoothed input, and the unsmoothed +input's own anisotropy — through a mask sitting only 1.72σ from the bump — +was mistaken for the operator's behaviour (analytically, that truncation +alone predicts a 1.208 ratio, matching v1's reported "1.213 asymptote" +almost exactly). **v2 removes both confounds at once**: the mask now sits +3.35σ away (baseline through it measures 1.0046 — essentially clean), and +the iteration count is scaled to a real physical diffusion target +(V=σ²/4, iters derived from the measured mesh spacing, not a fixed guess). +With both confounds gone, **the ADI operator's own anisotropic character +is visible for the first time: it adds ~0.52 anisotropy on top of an +isotropic 1.0046 baseline (1.5251 vs 1.0046)** — real, substantial, and +now the operator's alone. **B2 genuinely fails.** The two-Fibonacci-stride +tridiagonal sweep does NOT approximate isotropic 2D diffusion at this +configuration — it smooths preferentially along the parastichy chain +geometry. **Consequence for `domino.rs`: the gather-design claim this bar +was meant to support is NOT unblocked — it is refuted at this test +point**, reversing v1's (compromised) "unblocked" reading. + +**B3's VOID is now confirmed at the ACTUAL headline scale, not a 62k-point +sub-sample — and the confirmation is stronger than before.** The +full-band, uncapped headline control-link histogram (`n_qualifying = +4 782 017`, `n_moved = 4 769 097`) shows **99.68 % of the qualifying +population's control links land on a pure Fibonacci offset** (99.95 % of +the moved links specifically) — dominated overwhelmingly by offset 2584 = +F(18) itself (4 745 846 of 4 769 097 moved links), with the remaining mass +at 6765=F(20), 10946=F(21), and 13530=2·F(20) (a Fibonacci harmonic, not a +counterexample). This directly answers codex's original concern (the v1 +figure came from a 250k/956k = 26 % sample of one band): **the mechanism +claim now rests on the real, complete headline population, and it is +essentially unchanged from the smaller check** — reinforcing +`E-ON-A-GOLDEN-LATTICE-LOCALITY-IS-FIBONACCI-MEMBERSHIP-1` rather than +merely surviving it. + +**B4's floor sweep, on the corrected V-matched methodology (n=8..14; n=19 +now out of budget under real iteration scaling, see the script's own +`run()` docstring for the mechanism):** ratio climbs from 0.84 (n=8) to +~1.0–1.03 (n=12–17) — noisy at the smallest, sub-floor n (1 and 4 +iterations respectively, essentially no averaging), settling near parity +by n=12. No knee is visible at n≈17 either, consistent with v1's B4 +reading on this axis: the floor still functions as a safety margin for +the SMOOTHING QUALITY question, even though the smoothing itself is now +known to be anisotropic. + +**Two implementation notes a rerun should know (unchanged from v1, still +correct):** the qualifying-band rule (inner radius ≥ r_floor) resolves to +**bands 4–8**, and the brief's older "bands 3–8" label is off-by-one +against its own parenthetical (the rule wins). Discovery found the +expected emergent pairs per band — [2584, 4181] = F(18)/F(19) in the +qualifying bands at the headline N. --- diff --git a/probes/weather-p1/spiral_adi_probe.json b/probes/weather-p1/spiral_adi_probe.json index 07a051a53..ad7d0bd7b 100644 --- a/probes/weather-p1/spiral_adi_probe.json +++ b/probes/weather-p1/spiral_adi_probe.json @@ -10,6 +10,9 @@ 7, 8 ], + "iters": 3304, + "h2": 3.783262003912189e-07, + "sigma_predicted": 0.05590169943749475, "strides": { "1": [ 987, @@ -124,19 +127,54 @@ ] } }, + "baseline_unsmoothed": { + "aniso": 1.0045553787432684, + "iso_rel_l2": 0.0041925728222594605, + "sigma_ref": 0.05021008403361345, + "amplitude": 0.9958071953384192, + "raw_rel_l2_vs_unsmoothed_input": 0.0 + }, "fib": { - "aniso": 1.2133704271386727, - "iso_rel_l2": 0.000531146335896528, - "sigma_ref": 0.08, - "amplitude": 0.9998296702272748 + "aniso": 1.5251226754429854, + "iso_rel_l2": 0.12159876174955614, + "sigma_ref": 0.058015629248156314, + "amplitude": 0.7397889950392876, + "raw_rel_l2_vs_unsmoothed_input": 0.19037815450380777 }, "control": { - "aniso": 1.2128492673045226, - "iso_rel_l2": 0.0043580045257184145, - "sigma_ref": 0.08, - "amplitude": 0.9999676829776998 + "aniso": 1.5656908562573515, + "iso_rel_l2": 0.13363339049717748, + "sigma_ref": 0.058015629248156314, + "amplitude": 0.7501096738263052, + "raw_rel_l2_vs_unsmoothed_input": 0.19756950366253745 }, - "aniso_ratio_control_over_fib": 0.9995704857951919 + "control_link_histogram": { + "n_moved": 4769097, + "n_total": 7651227, + "n_qualifying": 4782017, + "self_linked_frac_overall": 0.3766886017105492, + "self_linked_frac_in_qualifying_bands": 0.0027017888058532558, + "top10_offsets": [ + [ + 2584, + 4745846 + ], + [ + 6765, + 10336 + ], + [ + 10946, + 10331 + ], + [ + 13530, + 2584 + ] + ] + }, + "aniso_ratio_control_over_fib": 1.0265999460027586, + "aniso_change_from_baseline_fib": 0.520567296699717 }, "sweep": [ { @@ -149,19 +187,30 @@ 7, 8 ], + "iters": 1, + "baseline_unsmoothed": { + "aniso": 1.0040137866849275, + "iso_rel_l2": 0.004183765000292255, + "sigma_ref": 0.05021008403361345, + "amplitude": 0.9958045697866769, + "raw_rel_l2_vs_unsmoothed_input": 0.0 + }, "fib": { - "aniso": 6.550475179352178, - "iso_rel_l2": 0.4404837665749021, - "sigma_ref": 0.16677966101694913, - "amplitude": 0.2689536925373855 + "aniso": 3.295711233283226, + "iso_rel_l2": 0.33148677721837466, + "sigma_ref": 0.06788063503124363, + "amplitude": 0.5109729774064525, + "raw_rel_l2_vs_unsmoothed_input": 0.42294584899735 }, "control": { - "aniso": 6.095688827508773, - "iso_rel_l2": 0.4732845453823644, - "sigma_ref": 0.13966101694915253, - "amplitude": 0.3368345392568036 + "aniso": 2.7715490603190256, + "iso_rel_l2": 0.3564761621457522, + "sigma_ref": 0.07116897029227273, + "amplitude": 0.48127130954645786, + "raw_rel_l2_vs_unsmoothed_input": 0.4801970630733142 }, - "aniso_ratio_control_over_fib": 0.9305720059398221 + "aniso_ratio_control_over_fib": 0.8409562804924435, + "aniso_change_from_baseline_fib": 2.2916974465982984 }, { "n_idx": 10, @@ -173,19 +222,30 @@ 7, 8 ], + "iters": 4, + "baseline_unsmoothed": { + "aniso": 1.0046148964113593, + "iso_rel_l2": 0.004192568021109315, + "sigma_ref": 0.05021008403361345, + "amplitude": 0.9958071958765987, + "raw_rel_l2_vs_unsmoothed_input": 0.0 + }, "fib": { - "aniso": 1.6505857060824627, - "iso_rel_l2": 0.10043483184160697, - "sigma_ref": 0.09084745762711864, - "amplitude": 0.7920953474210749 + "aniso": 1.4885332375392566, + "iso_rel_l2": 0.11999741842705275, + "sigma_ref": 0.05754586706800931, + "amplitude": 0.7502087124992965, + "raw_rel_l2_vs_unsmoothed_input": 0.18504229876811962 }, "control": { - "aniso": 1.5044745699165143, - "iso_rel_l2": 0.11989375903383313, - "sigma_ref": 0.08813559322033898, - "amplitude": 0.8417567835585169 + "aniso": 1.323592006790773, + "iso_rel_l2": 0.15166742044393855, + "sigma_ref": 0.055666818347421244, + "amplitude": 0.8004138796343105, + "raw_rel_l2_vs_unsmoothed_input": 0.18618902800116927 }, - "aniso_ratio_control_over_fib": 0.9114792187842631 + "aniso_ratio_control_over_fib": 0.8891921076474225, + "aniso_change_from_baseline_fib": 0.48391834112789733 }, { "n_idx": 12, @@ -197,19 +257,30 @@ 7, 8 ], + "iters": 27, + "baseline_unsmoothed": { + "aniso": 1.004552795054741, + "iso_rel_l2": 0.004192574017799534, + "sigma_ref": 0.05021008403361345, + "amplitude": 0.9958071950469585, + "raw_rel_l2_vs_unsmoothed_input": 0.0 + }, "fib": { - "aniso": 1.2816729521408852, - "iso_rel_l2": 0.024501112922115414, - "sigma_ref": 0.08271186440677966, - "amplitude": 0.949155201617418 + "aniso": 1.510273059156126, + "iso_rel_l2": 0.12008795641733262, + "sigma_ref": 0.058015629248156314, + "amplitude": 0.7416246624621703, + "raw_rel_l2_vs_unsmoothed_input": 0.1874888229785625 }, "control": { - "aniso": 1.2772997073940147, - "iso_rel_l2": 0.031202030128976373, - "sigma_ref": 0.08271186440677966, - "amplitude": 0.9526491768136327 + "aniso": 1.4767588117926178, + "iso_rel_l2": 0.12611796251113208, + "sigma_ref": 0.05660634270771527, + "amplitude": 0.7818360184886362, + "raw_rel_l2_vs_unsmoothed_input": 0.17702323769381867 }, - "aniso_ratio_control_over_fib": 0.9965878621846818 + "aniso_ratio_control_over_fib": 0.9778091470543516, + "aniso_change_from_baseline_fib": 0.5057202641013849 }, { "n_idx": 14, @@ -221,19 +292,30 @@ 7, 8 ], + "iters": 184, + "baseline_unsmoothed": { + "aniso": 1.0045541821498762, + "iso_rel_l2": 0.004192572948945176, + "sigma_ref": 0.05021008403361345, + "amplitude": 0.9958071953150343, + "raw_rel_l2_vs_unsmoothed_input": 0.0 + }, "fib": { - "aniso": 1.222991180241266, - "iso_rel_l2": 0.005653896538414601, - "sigma_ref": 0.08, - "amplitude": 0.9969933972351945 + "aniso": 1.519217059614036, + "iso_rel_l2": 0.12084130118344413, + "sigma_ref": 0.058015629248156314, + "amplitude": 0.7406047594960063, + "raw_rel_l2_vs_unsmoothed_input": 0.18914904250737952 }, "control": { - "aniso": 1.2231128961849835, - "iso_rel_l2": 0.007338811726399315, - "sigma_ref": 0.08, - "amplitude": 0.9974380152494843 + "aniso": 1.5365299499755791, + "iso_rel_l2": 0.1287467069190757, + "sigma_ref": 0.05754586706800931, + "amplitude": 0.7609268595603365, + "raw_rel_l2_vs_unsmoothed_input": 0.18812089275596836 }, - "aniso_ratio_control_over_fib": 1.0000995231573897 + "aniso_ratio_control_over_fib": 1.0113959294045458, + "aniso_change_from_baseline_fib": 0.5146628774641597 }, { "n_idx": 17, @@ -245,48 +327,35 @@ 7, 8 ], - "fib": { - "aniso": 1.2133704271386727, - "iso_rel_l2": 0.000531146335896528, - "sigma_ref": 0.08, - "amplitude": 0.9998296702272748 - }, - "control": { - "aniso": 1.2128492673045226, - "iso_rel_l2": 0.0043580045257184145, - "sigma_ref": 0.08, - "amplitude": 0.9999676829776998 + "iters": 3304, + "baseline_unsmoothed": { + "aniso": 1.0045553787432684, + "iso_rel_l2": 0.0041925728222594605, + "sigma_ref": 0.05021008403361345, + "amplitude": 0.9958071953384192, + "raw_rel_l2_vs_unsmoothed_input": 0.0 }, - "aniso_ratio_control_over_fib": 0.9995704857951919 - }, - { - "n_idx": 19, - "N": 52442283, - "qualifying_bands": [ - 4, - 5, - 6, - 7, - 8 - ], "fib": { - "aniso": 1.2128839037705261, - "iso_rel_l2": 0.00011915553240126285, - "sigma_ref": 0.08, - "amplitude": 0.9999750838721444 + "aniso": 1.5251226754429854, + "iso_rel_l2": 0.12159876174955614, + "sigma_ref": 0.058015629248156314, + "amplitude": 0.7397889950392876, + "raw_rel_l2_vs_unsmoothed_input": 0.19037815450380777 }, "control": { - "aniso": 1.212800932576421, - "iso_rel_l2": 0.001403899969162001, - "sigma_ref": 0.08, - "amplitude": 0.9999996339961671 + "aniso": 1.5656908562573515, + "iso_rel_l2": 0.13363339049717748, + "sigma_ref": 0.058015629248156314, + "amplitude": 0.7501096738263052, + "raw_rel_l2_vs_unsmoothed_input": 0.19756950366253745 }, - "aniso_ratio_control_over_fib": 0.9999315918087073 + "aniso_ratio_control_over_fib": 1.0265999460027586, + "aniso_change_from_baseline_fib": 0.520567296699717 } ], - "n21": "NOT RUN (N=3*F(21)^2 ~ 3.6e8, beyond budget; recorded per brief)", + "n19_n21": "NOT RUN under v2's V-matched iteration scaling -- iters ~ 2V/h^2 grows roughly linearly with N for a fixed physical blur target, making n=19/21 multiple orders of magnitude more expensive than n=17; mechanism stated, not a silent drop (see run() docstring)", "verdicts": { - "B2_iso": "PASS", + "B2_iso": "FAIL", "B3_control": "VOID -- control smooths as isotropically as Fibonacci; the Fibonacci claim measures nothing" } } \ No newline at end of file From 541f93abdb08f2fd6c26daf351fee3cf1027feef Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 12 Aug 2026 13:45:44 +0000 Subject: [PATCH 2/2] probes/weather-p1: fix 3 codex findings on #938 -- family-B histogram gap, a 2.1x arithmetic error, B4 completeness overclaim All three real, verified before fixing: 1. (P2) build_control_links histogrammed only family A (`if fam == 0`) -- the ADI sweep uses BOTH stride families every iteration, and family B's offset distribution was never measured, so "the qualifying population's control links" generalized from family-A-only data. Fixed: the function now returns histograms for BOTH families. Verified by independent reproduction at the real headline N (deterministic seed, family A reproduced bit-identical to the original run): family B measures 99.56% Fibonacci-offset rate, dominated by offset 4181=F(19) -- the OTHER member of the discovered stride pair [2584,4181], exactly as the three-distance mechanism predicts (each family's near-neighbour scale IS that family's own discovered stride). The committed JSON is patched with both-family histograms via a targeted regeneration of just the histogram (the fib/control/aniso results are unaffected by this fix and were not rerun) -- the number now has a committed, reproducible artifact behind it, not just prose. 2. (P2) "four orders of magnitude apart" for the two tested N (62,208 and 4,782,017) was an arithmetic error -- 4,782,017/62,208 = 76.9x, i.e. ~1.9 orders of magnitude, not four. Fixed in both PR_ARC_INVENTORY and EPIPHANIES (the only two sites carrying the error; weather-w-probes-v1 never stated the ratio in that form). 3. (P2) B4 was reported as satisfying its pre-registered bar (n in {8,10,12,14,17,19}, only n=21 pre-authorized to drop) when v2 additionally dropped n=19 under the V-matched cost function -- real and stated, but not what the original bar authorized. Downgraded from a verdict to an explicit DESCRIPTIVE reading over n=8..17 only, in both the plan and the arc entry; B4 stays open until n=19 either runs or the bar is formally amended with the reasoning pre-registered rather than asserted after the fact. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01CcpLeEC3XK8Eye53GKBVvi --- .claude/board/EPIPHANIES.md | 46 +++++++++++------ .claude/board/PR_ARC_INVENTORY.md | 44 ++++++++++++---- .claude/plans/weather-w-probes-v1.md | 58 +++++++++++++-------- probes/weather-p1/spiral_adi_probe.json | 67 +++++++++++++++++-------- probes/weather-p1/spiral_adi_probe.py | 59 +++++++++++----------- 5 files changed, 177 insertions(+), 97 deletions(-) diff --git a/.claude/board/EPIPHANIES.md b/.claude/board/EPIPHANIES.md index c273bd556..f13404651 100644 --- a/.claude/board/EPIPHANIES.md +++ b/.claude/board/EPIPHANIES.md @@ -41,22 +41,36 @@ targeted verification measurement, both committed. > universal form settled. > **★ THIRD UPDATE (2026-08-12, v2 headline RUN landed) — STRENGTHENED, at -> the real scale, on the full uncapped population.** The v2 rerun -> (`106ca605`, no subsampling cap) measured the actual headline population -> directly: **99.68 % of the qualifying-band population's control links -> (n_qualifying=4 782 017) land on a pure Fibonacci offset** — 99.95 % of -> the moved links specifically — dominated by offset 2584=F(18) itself -> (4 745 846 of 4 769 097 moved links), with the small remainder at -> 6765=F(20), 10946=F(21), and 13530=2·F(20) (a Fibonacci harmonic, not a -> counterexample). This is the SAME order of confirmation as the earlier -> N=62 208 check (99.38 %), now on the real headline scale with the exact -> subsampling defect the second correction above worried about removed -> entirely. **Second correction's caveat stands as written** (one -> construction, now TWO scales, still not a sweep across constructions — -> the "does not exist" phrasing remains restated, not un-restated) — but -> the evidentiary base is now materially stronger: two independent N, -> four orders of magnitude apart (62 208 vs 4 782 017 qualifying points), -> both landing within 0.3 percentage points of each other. +> the real scale, on the full uncapped population, AND now on BOTH link +> families.** The v2 rerun (`106ca605`, no subsampling cap) measured the +> actual headline population directly: **99.68 % of the qualifying-band +> population's family-A control links (n_qualifying=4 782 017) land on a +> pure Fibonacci offset** — 99.95 % of the moved links specifically — +> dominated by offset 2584=F(18) itself (4 745 846 of 4 769 097 moved +> links), with the small remainder at 6765=F(20), 10946=F(21), and +> 13530=2·F(20) (a Fibonacci harmonic, not a counterexample). +> +> **⊘ THIRD-UPDATE CORRECTION (2026-08-12, codex P2 on PR #938, same day) +> — two overclaims in the paragraph above, both fixed.** (1) The 99.68 % +> figure covered only family A — `build_control_links`'s histogram was +> computed `if fam == 0` only, so family B (the OTHER stride direction, +> used every ADI iteration alongside family A) was never measured; +> generalizing to "the qualifying population's control links" from +> family-A-only data overclaimed. Fixed: the function now histograms both +> families. **Family B independently measured at 99.56 %** Fibonacci-offset +> rate, dominated by offset 4181=F(19) — the OTHER member of the discovered +> pair `[2584, 4181]`, exactly as the mechanism predicts (each family's +> characteristic near-neighbour scale IS that family's own discovered +> stride). Two families, two Fibonacci offsets, both >99.5 %. (2) "four +> orders of magnitude apart" for the two tested N was an arithmetic error +> — `4 782 017 / 62 208 ≈ 76.9×`, i.e. **~1.9 orders of magnitude**, not +> four. **Second correction's caveat stands as written** (one construction +> family at a time, now two scales AND two families, still not a sweep +> across fundamentally different control constructions — the "does not +> exist" phrasing remains restated, not un-restated) — the evidentiary +> base is nonetheless materially stronger: two independent N ~1.9 orders +> of magnitude apart, both link families, all landing within roughly half +> a percentage point of each other. > > **And a genuinely new, larger result rode along in the same run: B2 now > FAILS.** v1's B2 PASS (anisotropy 1.2134) is now understood to have been diff --git a/.claude/board/PR_ARC_INVENTORY.md b/.claude/board/PR_ARC_INVENTORY.md index 6cce524ca..5f412519f 100644 --- a/.claude/board/PR_ARC_INVENTORY.md +++ b/.claude/board/PR_ARC_INVENTORY.md @@ -81,16 +81,40 @@ demonstrated diffusion occurred in the first place). - **Locked — B3's VOID is now confirmed on the REAL headline population, not a 62k-point sub-sample, and the confirmation is STRONGER than - before.** Full-band histogram at N=7.65M (`n_qualifying=4 782 017`): - **99.68 %** of the qualifying population's control links land on a pure - Fibonacci offset (99.95 % of the moved links), dominated by offset - 2584=F(18) itself; the small remainder at F(20), F(21), 2·F(20) — a - Fibonacci harmonic, not a counterexample. Two independent N four orders - of magnitude apart (62 208 and 4 782 017) land within 0.3 percentage - points of each other — directly answering codex's original subsampling - concern with the strongest available evidence (the full population, not - a sample of it). -- **Locked — B4 on the corrected methodology**: ratio climbs 0.84→~1.03 + before, AND now covers both link families.** ⚠ Corrects two overclaims + caught by codex P2 on PR #938: (1) the first version of this entry + histogrammed only family A — the ADI sweep uses BOTH stride families + every iteration, and family B's offset distribution was never measured; + fixed in the same commit (`build_control_links` now returns histograms + for both). (2) "four orders of magnitude apart" was an arithmetic error + — `4 782 017 / 62 208 ≈ 76.9×`, i.e. **~1.9 orders of magnitude**, not + four. Corrected figures: full-band histogram at N=7.65M + (`n_qualifying=4 782 017`): family A **99.68 %** of the qualifying + population's control links land on a pure Fibonacci offset (dominated + by 2584=F(18)); family B **99.56 %** (dominated by 4181=F(19), the + OTHER discovered stride — matching the pair `[2584,4181]` exactly, one + offset per family). Both families' small remainders sit at F(20)/F(21)/ + 2·F(20) — Fibonacci harmonics, not counterexamples. Two independent N + **~1.9 orders of magnitude apart** (62 208 and 4 782 017) land within + 0.3 percentage points of each other on family A alone, and the newly- + measured family B corroborates independently at a comparable rate — + directly answering codex's original subsampling concern with the + strongest available evidence (the full population, both families, not + a sample of one). +- **Locked — B4 is INCOMPLETE relative to its own pre-registered bar, and + is now reported as such rather than as a satisfied reading.** ⚠ Codex + P2 on PR #938: the original brief's B4 bar explicitly lists + `n ∈ {8, 10, 12, 14, 17, 19}` and pre-authorizes dropping ONLY `n=21`; + v2 additionally dropped `n=19` under the V-matched cost function (a real + and stated reason, but not one the original bar anticipated or + authorized). The "no knee, safety margin" reading is downgraded from a + verdict to a DESCRIPTIVE observation over `n=8..17` only — `n=19` remains + genuinely untested under v2's methodology, and B4 stays open until it + either runs (budget permitting) or the bar is formally amended to accept + the smaller sweep with its reasoning made explicit in the pre- + registration, not asserted after the fact. +- **Locked — B4 on the corrected methodology (descriptive, not a verdict — + see the correction immediately above)**: ratio climbs 0.84→~1.03 from n=8 to n=17, noisy at the smallest sub-floor n (1–4 iterations, little averaging), settling near parity by n=12. n=19/21 out of budget under V-matched scaling (iters grows ~linearly with N at fixed physical diff --git a/.claude/plans/weather-w-probes-v1.md b/.claude/plans/weather-w-probes-v1.md index 4b9d0faf2..d7d672035 100644 --- a/.claude/plans/weather-w-probes-v1.md +++ b/.claude/plans/weather-w-probes-v1.md @@ -311,29 +311,45 @@ was meant to support is NOT unblocked — it is refuted at this test point**, reversing v1's (compromised) "unblocked" reading. **B3's VOID is now confirmed at the ACTUAL headline scale, not a 62k-point -sub-sample — and the confirmation is stronger than before.** The -full-band, uncapped headline control-link histogram (`n_qualifying = -4 782 017`, `n_moved = 4 769 097`) shows **99.68 % of the qualifying -population's control links land on a pure Fibonacci offset** (99.95 % of -the moved links specifically) — dominated overwhelmingly by offset 2584 = -F(18) itself (4 745 846 of 4 769 097 moved links), with the remaining mass -at 6765=F(20), 10946=F(21), and 13530=2·F(20) (a Fibonacci harmonic, not a -counterexample). This directly answers codex's original concern (the v1 -figure came from a 250k/956k = 26 % sample of one band): **the mechanism -claim now rests on the real, complete headline population, and it is -essentially unchanged from the smaller check** — reinforcing -`E-ON-A-GOLDEN-LATTICE-LOCALITY-IS-FIBONACCI-MEMBERSHIP-1` rather than -merely surviving it. - -**B4's floor sweep, on the corrected V-matched methodology (n=8..14; n=19 -now out of budget under real iteration scaling, see the script's own -`run()` docstring for the mechanism):** ratio climbs from 0.84 (n=8) to +sub-sample, on BOTH link families — and the confirmation is stronger than +before.** ⚠ Corrects two overclaims caught by codex P2 on PR #938 (fixed +same day, in the code and here): the original histogram covered only +family A (the ADI sweep uses BOTH stride families every iteration, and +family B was unmeasured), and the two tested N were described as "four +orders of magnitude apart" when the true ratio is `4 782 017 / 62 208 ≈ +76.9×` — **~1.9 orders of magnitude**, not four. + +The full-band, uncapped headline control-link histogram (`n_qualifying = +4 782 017`, `n_moved = 4 769 097` for family A) shows **99.68 % of the +qualifying population's family-A control links land on a pure Fibonacci +offset** (99.95 % of the moved links) — dominated overwhelmingly by offset +2584 = F(18) itself, with the remaining mass at 6765=F(20), 10946=F(21), +and 13530=2·F(20) (a Fibonacci harmonic, not a counterexample). **Family B, +now independently measured, corroborates at 99.56 %** — dominated by +offset 4181 = F(19), the OTHER member of the discovered pair `[2584, +4181]`: each family's near-neighbour scale is exactly its own discovered +stride, precisely as the three-distance mechanism predicts. This directly +answers codex's original concern (the v1 figure came from a 250k/956k = +26 % sample of one family in one band): **the mechanism claim now rests on +the real, complete headline population, on both families it actually +governs, and it is essentially unchanged from the smaller check** — +reinforcing `E-ON-A-GOLDEN-LATTICE-LOCALITY-IS-FIBONACCI-MEMBERSHIP-1` +rather than merely surviving it. + +**B4 is INCOMPLETE relative to its own pre-registered bar — reported as +such, not as a satisfied reading.** ⚠ Codex P2 on PR #938: the original +brief's B4 bar explicitly lists `n ∈ {8, 10, 12, 14, 17, 19}` with ONLY +`n=21` pre-authorized to be dropped; v2 additionally dropped `n=19` under +the V-matched cost function (real, stated, but not what the original bar +authorized). What follows is therefore DESCRIPTIVE over `n=8..17` only, +not a verdict on the pre-registered bar: ratio climbs from 0.84 (n=8) to ~1.0–1.03 (n=12–17) — noisy at the smallest, sub-floor n (1 and 4 iterations respectively, essentially no averaging), settling near parity -by n=12. No knee is visible at n≈17 either, consistent with v1's B4 -reading on this axis: the floor still functions as a safety margin for -the SMOOTHING QUALITY question, even though the smoothing itself is now -known to be anisotropic. +by n=12. No knee is visible in this partial range either, consistent with +v1's B4 reading on this axis — but `n=19` remains genuinely untested under +v2's methodology, and B4 does not close until it either runs (budget +permitting) or the bar is formally amended with the reasoning stated in +the pre-registration rather than after the fact. **Two implementation notes a rerun should know (unchanged from v1, still correct):** the qualifying-band rule (inner radius ≥ r_floor) resolves to diff --git a/probes/weather-p1/spiral_adi_probe.json b/probes/weather-p1/spiral_adi_probe.json index ad7d0bd7b..184d14c35 100644 --- a/probes/weather-p1/spiral_adi_probe.json +++ b/probes/weather-p1/spiral_adi_probe.json @@ -149,29 +149,52 @@ "raw_rel_l2_vs_unsmoothed_input": 0.19756950366253745 }, "control_link_histogram": { - "n_moved": 4769097, - "n_total": 7651227, - "n_qualifying": 4782017, - "self_linked_frac_overall": 0.3766886017105492, - "self_linked_frac_in_qualifying_bands": 0.0027017888058532558, - "top10_offsets": [ - [ - 2584, - 4745846 - ], - [ - 6765, - 10336 - ], - [ - 10946, - 10331 - ], - [ - 13530, - 2584 + "famA": { + "n_moved": 4769097, + "n_total": 7651227, + "n_qualifying": 4782017, + "self_linked_frac_overall": 0.3766886017105492, + "self_linked_frac_in_qualifying_bands": 0.0027017888058532558, + "top10_offsets": [ + [ + 2584, + 4745846 + ], + [ + 6765, + 10336 + ], + [ + 10946, + 10331 + ], + [ + 13530, + 2584 + ] ] - ] + }, + "famB": { + "n_moved": 4761112, + "n_total": 7651227, + "n_qualifying": 4782017, + "self_linked_frac_overall": 0.3777322251712045, + "self_linked_frac_in_qualifying_bands": 0.004371586299254049, + "top10_offsets": [ + [ + 4181, + 4732643 + ], + [ + 6765, + 24288 + ], + [ + 2584, + 4181 + ] + ] + } }, "aniso_ratio_control_over_fib": 1.0265999460027586, "aniso_change_from_baseline_fib": 0.520567296699717 diff --git a/probes/weather-p1/spiral_adi_probe.py b/probes/weather-p1/spiral_adi_probe.py index 0f684f7d2..de4198eeb 100644 --- a/probes/weather-p1/spiral_adi_probe.py +++ b/probes/weather-p1/spiral_adi_probe.py @@ -171,12 +171,15 @@ def build_control_links(x, y, n, bands, strides, qualifying, sel_qualifying, the KD-tree only from the sampled subset, so even sampled sources picked among sampled neighbours rather than their real 8 nearest. Every point in every qualifying band now gets a real control partner. - Returns (links, offset_histogram) -- histogram is {|dk|: count} over - ALL control links in family A, the artifact codex P2 asked to be - committed rather than left as chat-only prose.""" + Returns (links, offset_histograms) -- offset_histograms is a dict keyed + "famA"/"famB", each {|dk|: count} etc., over BOTH link families (codex + P2 on PR #938: the first version histogrammed only family A -- the + forward stride direction -- while the ADI sweep uses BOTH families + every iteration; family B's offset distribution is now measured too, + not merely assumed to match family A's).""" idx_all = np.arange(n) links = [] - histA = None + histograms = {} for fam in (0, 1): nxt = idx_all.copy() for b in qualifying: @@ -200,28 +203,28 @@ def build_control_links(x, y, n, bands, strides, qualifying, sel_qualifying, pick = np.argmin(dist_diff, axis=1) good = np.isfinite(dist_diff[np.arange(len(sel)), pick]) nxt[sel[good]] = cand_global[np.arange(len(sel)), pick][good] - if fam == 0: - moved = nxt != idx_all - dk = np.abs(nxt[moved] - idx_all[moved]) - vals, counts = np.unique(dk, return_counts=True) - order = np.argsort(-counts) - n_qual = int(sel_qualifying.sum()) - moved_in_qual = int((moved & sel_qualifying).sum()) - # self_linked_frac_overall is over ALL n points and is DOMINATED - # by non-qualifying-band points, which are never touched by - # design (a debugging trap found and fixed live: an earlier - # version of this histogram divided by n and reported ~38% "self - # -linked" that was almost entirely non-qualifying-band points - # correctly excluded, not a control-search failure -- see the - # _in_qualifying_bands figure for the number that actually - # matters). - histA = {"n_moved": int(moved.sum()), "n_total": int(n), - "n_qualifying": n_qual, - "self_linked_frac_overall": float(1.0 - moved.sum() / n), - "self_linked_frac_in_qualifying_bands": float( - 1.0 - moved_in_qual / n_qual) if n_qual else None, - "top10_offsets": [(int(vals[i]), int(counts[i])) - for i in order[:10]]} + # Histogram EVERY family (codex P2 on #938 -- previously only + # family 0). self_linked_frac_overall is over ALL n points and is + # DOMINATED by non-qualifying-band points, which are never touched + # by design (a debugging trap found and fixed live earlier: an + # early v2 diagnostic divided by total N rather than + # qualifying-band population and reported a spurious ~38% + # "self-linked" -- see the _in_qualifying_bands figure for the + # number that actually matters). + moved = nxt != idx_all + dk = np.abs(nxt[moved] - idx_all[moved]) + vals, counts = np.unique(dk, return_counts=True) + order = np.argsort(-counts) + n_qual = int(sel_qualifying.sum()) + moved_in_qual = int((moved & sel_qualifying).sum()) + histograms[f"fam{'A' if fam == 0 else 'B'}"] = { + "n_moved": int(moved.sum()), "n_total": int(n), + "n_qualifying": n_qual, + "self_linked_frac_overall": float(1.0 - moved.sum() / n), + "self_linked_frac_in_qualifying_bands": float( + 1.0 - moved_in_qual / n_qual) if n_qual else None, + "top10_offsets": [(int(vals[i]), int(counts[i])) + for i in order[:10]]} prv = idx_all.copy() src_pts = np.where(nxt != idx_all)[0] order = np.argsort(nxt[src_pts]) @@ -232,7 +235,7 @@ def build_control_links(x, y, n, bands, strides, qualifying, sel_qualifying, unique_srcs = src_pts[order][first[counts == 1]] prv[unique_tgts] = unique_srcs links.extend([nxt, prv]) - return links, histA + return links, histograms def median_nn_spacing_sq(x, y, sel, rng, sample=20_000): @@ -424,7 +427,7 @@ def run(): print(f"baseline (unsmoothed, same mask): {h['baseline_unsmoothed']}") print(f"fib: {h['fib']}") print(f"control: {h['control']}") - print(f"control link histogram (fam A): {h['control_link_histogram']}") + print(f"control link histograms (both families): {h['control_link_histogram']}") print(f"aniso ratio (control/fib): {h['aniso_ratio_control_over_fib']}") print(f"aniso change from baseline (fib): {h['aniso_change_from_baseline_fib']}") print("verdicts:", res["verdicts"])