From a631e363c48e125587bf2631de418b2fac31541e Mon Sep 17 00:00:00 2001 From: AdaWorldAPI Date: Thu, 22 Oct 2026 22:38:37 +0200 Subject: [PATCH 1/5] test(lab): test(pal256): 64-hop numerical containment vs epistemic hallucination falsifiers --- .../tests/palette256_multihop_error_probe.rs | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 crates/bgz-tensor/tests/palette256_multihop_error_probe.rs diff --git a/crates/bgz-tensor/tests/palette256_multihop_error_probe.rs b/crates/bgz-tensor/tests/palette256_multihop_error_probe.rs new file mode 100644 index 000000000..f7721b226 --- /dev/null +++ b/crates/bgz-tensor/tests/palette256_multihop_error_probe.rs @@ -0,0 +1,39 @@ +//! Distinguish four claims: frozen lookup (no re-encode), quantized contraction, +//! shared-source false precision, and semantic correctness. Only the first two +//! have numerical properties; bounded outputs do not certify factual truth. +fn q8(x: f64) -> f64 { (x.clamp(-1.0, 1.0) * 127.0).round() / 127.0 } +#[test] +fn stable_lookup_of_immutable_values_does_not_requantize_per_hop() { + const PAIRS: [[i8; 3]; 3] = [[127, 64, -40], [33, 127, 10], [-55, 15, 127]]; + let original = PAIRS; + let mut address = 0_usize; + for _ in 0..64 { + let next = (address + 1) % 3; + let relation = PAIRS[address][next]; + assert_eq!(relation, original[address][next]); + address = next; // traverse addresses; never feed a decoded score into bake + } + assert_eq!(PAIRS, original); +} +#[test] +fn contractive_quantized_recursion_has_a_measurable_64hop_bound() { + let (mut exact, mut quantized) = (0.25_f64, 0.25_f64); + let lipschitz = 0.7_f64; + let one_step_rounding = 0.5 / 127.0 + 1e-12; + for hop in 1..=64 { + exact = lipschitz * exact + 0.08; + quantized = q8(lipschitz * quantized + 0.08); + let envelope = one_step_rounding * (1.0 - lipschitz.powi(hop)) / (1.0 - lipschitz); + assert!((exact - quantized).abs() <= envelope + 1e-12); + } +} +#[test] +fn saturation_and_duplicate_paths_can_preserve_an_unsupported_claim() { + let mut spurious_score = 0.01_f64; + for _ in 0..16 { spurious_score = (1.5 * spurious_score).clamp(-1.0, 1.0); } + assert!(spurious_score > 0.5, "finite range alone does NOT prevent reinforcement"); + let shared_root = 1_u64 << 7; + let paths = [shared_root; 32]; + let distinct = paths.iter().copied().fold(0u64, |a, b| a | b).count_ones(); + assert_eq!(distinct, 1, "32 derived paths are one independent observation"); +} From 30fd2f8caaa6a2ed4db5468d5900166ebdffddae Mon Sep 17 00:00:00 2001 From: AdaWorldAPI Date: Thu, 22 Oct 2026 22:38:39 +0200 Subject: [PATCH 2/5] test(lab): test(pal256): 64-hop numerical containment vs epistemic hallucination falsifiers --- .../entries/2026-10-22-pal256-64hop-error-containment.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .claude/board/entries/2026-10-22-pal256-64hop-error-containment.md diff --git a/.claude/board/entries/2026-10-22-pal256-64hop-error-containment.md b/.claude/board/entries/2026-10-22-pal256-64hop-error-containment.md new file mode 100644 index 000000000..6099512a8 --- /dev/null +++ b/.claude/board/entries/2026-10-22-pal256-64hop-error-containment.md @@ -0,0 +1,9 @@ +# Palette256: 64-hop containment is a falsifiable hypothesis, not a hallucination guarantee + +Existing reference surfaces: `bgz-tensor::fisher_z::FisherZTable` immutable family LUT; `ndarray::hpc` statistical moments; `lance-graph-nal` evidence-source stamping; Math Foundry cold proof/extraction. No rewriting of these engines. + +Test 1: repeated lookup by stable references has no *repeated encode/decode*. Test 2: a **specified** contraction (`L=0.7`) with a bounded rounding term satisfies a 64-hop numerical envelope. Negative control: a bounded but expansive recurrence grows a false belief; 32 derived paths from one root are still one independent source. + +Next experiment must use real `FisherZTable` pairwise score compositions, 1/2/4/8/16/32/64 hops, exact f64 oracle, held-out path labels, source disjointness, min-max/mean/p95/p99 numerical error, calibration, false-positive and abstention rates, performance and adversarial correlated roots. Count sample size per *independent original observation*. A rho 0.9998 on 2000 single pairs proves neither 64-hop rank preservation nor semantic validity. + +Run: `cargo test --manifest-path crates/bgz-tensor/Cargo.toml --test palette256_multihop_error_probe`. From b63c0caae96cd57aec2730dead2ea18e4ad2ba10 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 22 Oct 2026 21:41:46 +0000 Subject: [PATCH 3/5] fix(ci): rustfmt the probe test, regenerate the board entries index Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg --- .claude/board/entries/README.md | 3 ++- .../tests/palette256_multihop_error_probe.rs | 18 ++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.claude/board/entries/README.md b/.claude/board/entries/README.md index dd6231c6a..f57074537 100644 --- a/.claude/board/entries/README.md +++ b/.claude/board/entries/README.md @@ -25,10 +25,11 @@ index row, (3) no duplicate entry id. Checks 1 and 2 are deliberately opposite directions; the stranding this convention prevents shows up in exactly one of them, never both. -429 entries, 2026-08-06 .. 2026-10-22. +430 entries, 2026-08-06 .. 2026-10-22. | date | entry id | finding | file | |---|---|---|---| +| 2026-10-22 | `pal256-64hop-error-containment` | | [2026-10-22-pal256-64hop-error-containment.md](2026-10-22-pal256-64hop-error-containment.md) | | 2026-10-22 | `math-compiler-stage-b-e1` | | [2026-10-22-math-compiler-stage-b-e1.md](2026-10-22-math-compiler-stage-b-e1.md) | | 2026-10-22 | `math-compiler-gap-matrix` | | [2026-10-22-math-compiler-gap-matrix.md](2026-10-22-math-compiler-gap-matrix.md) | | 2026-10-22 | `D-MPS-9` | | [2026-10-22-d-mps-9-mork-oracle.md](2026-10-22-d-mps-9-mork-oracle.md) | diff --git a/crates/bgz-tensor/tests/palette256_multihop_error_probe.rs b/crates/bgz-tensor/tests/palette256_multihop_error_probe.rs index f7721b226..4869be993 100644 --- a/crates/bgz-tensor/tests/palette256_multihop_error_probe.rs +++ b/crates/bgz-tensor/tests/palette256_multihop_error_probe.rs @@ -1,7 +1,9 @@ //! Distinguish four claims: frozen lookup (no re-encode), quantized contraction, //! shared-source false precision, and semantic correctness. Only the first two //! have numerical properties; bounded outputs do not certify factual truth. -fn q8(x: f64) -> f64 { (x.clamp(-1.0, 1.0) * 127.0).round() / 127.0 } +fn q8(x: f64) -> f64 { + (x.clamp(-1.0, 1.0) * 127.0).round() / 127.0 +} #[test] fn stable_lookup_of_immutable_values_does_not_requantize_per_hop() { const PAIRS: [[i8; 3]; 3] = [[127, 64, -40], [33, 127, 10], [-55, 15, 127]]; @@ -30,10 +32,18 @@ fn contractive_quantized_recursion_has_a_measurable_64hop_bound() { #[test] fn saturation_and_duplicate_paths_can_preserve_an_unsupported_claim() { let mut spurious_score = 0.01_f64; - for _ in 0..16 { spurious_score = (1.5 * spurious_score).clamp(-1.0, 1.0); } - assert!(spurious_score > 0.5, "finite range alone does NOT prevent reinforcement"); + for _ in 0..16 { + spurious_score = (1.5 * spurious_score).clamp(-1.0, 1.0); + } + assert!( + spurious_score > 0.5, + "finite range alone does NOT prevent reinforcement" + ); let shared_root = 1_u64 << 7; let paths = [shared_root; 32]; let distinct = paths.iter().copied().fold(0u64, |a, b| a | b).count_ones(); - assert_eq!(distinct, 1, "32 derived paths are one independent observation"); + assert_eq!( + distinct, 1, + "32 derived paths are one independent observation" + ); } From 4a13ca288da9dea8f1cb5673a5aae5dfcad90aec Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 22 Oct 2026 21:53:47 +0000 Subject: [PATCH 4/5] probe: fold #1721's production-surface test into this series Moves crates/bgz-tensor/tests/palette_multihop_error_probe.rs here from #1721. Unlike the local helpers already in this series, it exercises the real implementation, so the series keeps its experiment contract and gains the concrete counter-probe. #1721 is closed as superseded once this lands. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg --- .../tests/palette_multihop_error_probe.rs | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 crates/bgz-tensor/tests/palette_multihop_error_probe.rs diff --git a/crates/bgz-tensor/tests/palette_multihop_error_probe.rs b/crates/bgz-tensor/tests/palette_multihop_error_probe.rs new file mode 100644 index 000000000..ec7a6da51 --- /dev/null +++ b/crates/bgz-tensor/tests/palette_multihop_error_probe.rs @@ -0,0 +1,46 @@ +//! Quantized XOR composition is exact only when the frozen codebook is closed. +//! A table lookup does not itself assert correctness of a multi-hop inference. +use bgz_tensor::{Base17, ComposeTable, WeightPalette}; + +fn value(n: i16) -> Base17 { + let mut dims = [0i16; 17]; + dims[0] = n; + Base17 { dims } +} + +fn frozen(values: &[i16]) -> WeightPalette { + WeightPalette { + entries: values.iter().copied().map(value).collect(), + radii: vec![0; values.len()], + counts: vec![1; values.len()], + } +} + +#[test] +fn closed_codebook_64_hops_are_exact_and_leave_frame_unchanged() { + let palette = frozen(&[0, 1]); + let snapshot = palette.entries.clone(); + let table = ComposeTable::build(&palette); + let mut got = 0u8; + let mut exact = value(0); + for hop in 1..=64 { + let input = if hop % 2 == 0 { 0 } else { 1 }; + got = table.compose(got, input); + exact = exact.xor_bind(&palette.entries[input as usize]); + assert_eq!(palette.entries[got as usize], exact, "hop {hop}"); + } + assert_eq!(palette.entries, snapshot); +} + +#[test] +fn immutable_but_nonclosed_codebook_has_a_three_hop_counterexample() { + let palette = frozen(&[0, 1, 2]); // 1 XOR 2 = 3 is not in the codebook + let table = ComposeTable::build(&palette); + let direct = value(1).xor_bind(&value(2)).xor_bind(&value(2)); + assert_eq!(direct, value(1)); // XOR is associative and self-inverse + let first = table.compose(1, 2); // missing 3 snaps to nearest 2 + assert_eq!(first, 2); + let quantized = table.compose(first, 2); // then 2 XOR 2 returns 0 + assert_eq!(quantized, 0); + assert_ne!(palette.entries[quantized as usize], direct); +} From 69394e8dd54933fa4382516b26e426590d850f02 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 22 Oct 2026 22:22:12 +0000 Subject: [PATCH 5/5] Merge origin/main into lab/pal256-multihop-error-probe-20261022; regenerate entries index --- .claude/board/entries/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.claude/board/entries/README.md b/.claude/board/entries/README.md index feebd71ab..ec19455fe 100644 --- a/.claude/board/entries/README.md +++ b/.claude/board/entries/README.md @@ -25,7 +25,7 @@ index row, (3) no duplicate entry id. Checks 1 and 2 are deliberately opposite directions; the stranding this convention prevents shows up in exactly one of them, never both. -436 entries, 2026-08-06 .. 2026-10-22. +438 entries, 2026-08-06 .. 2026-10-22. | date | entry id | finding | file | |---|---|---|---|