Skip to content

Commit 525c730

Browse files
authored
Merge pull request #230 from AdaWorldAPI/claude/teleport-session-setup-wMZfb
CI(jc) substrate gate + CartanCascade YAML spec (520x bundle codec)
2 parents 248396e + 757a624 commit 525c730

3 files changed

Lines changed: 225 additions & 0 deletions

File tree

.claude/board/STATUS_BOARD.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ Active integration plan. 7 Phase 0 deliverables (D0.1–D0.7) + Phases
3939
afterwards is a JIT kernel, not a rebuild. Plan path:
4040
`.claude/plans/codec-sweep-via-lab-infra-v1.md`.
4141

42+
### CI Gate — JC Substrate Proof
43+
44+
| D-id | Title | Status | PR / Evidence |
45+
|---|---|---|---|
46+
| CI-JC | `.github/workflows/jc-proof.yml` — runs prove_it on every PR touching `crates/jc/` or `cam.rs` | **In PR** | 5-min timeout, exits 0 = substrate sound |
47+
4248
### Phase 0 — API hardening (partial in PR #225; remainder queued)
4349

4450
| D-id | Title | Status | PR / Evidence |

.claude/plans/codec-sweep-via-lab-infra-v1.md

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,3 +1167,185 @@ F); everything after is in-memory `CodecParams` objects, JIT
11671167
kernel cache hits, SoA column sweeps, and SIMD lane ops — none
11681168
of which touch serialisation again until the sweep logger
11691169
appends the result row to Lance (the one allowed egress).
1170+
1171+
---
1172+
1173+
## Appendix B — CartanCascade: the bgz-hhtl-d × Cartan-character child
1174+
1175+
> Born: 2026-04-20 session. Parents: bgz-hhtl-d (progressive-precision
1176+
> HHTL cascade, Fisher-z ρ≥0.999 certified, i8+BF16 restore) ×
1177+
> Cartan-Kuranishi (role_keys slice widths as intrinsic Cartan characters).
1178+
1179+
### What the child inherits
1180+
1181+
| From bgz-hhtl-d | From Cartan widths |
1182+
|---|---|
1183+
| HHTL progressive levels (HEEL→HIP→BRANCH→TWIG→LEAF) | 2000/2000/2000/1500/1500/900/70/60/30 = per-role intrinsic bit budget |
1184+
| Fisher-z per-group tables (64 KB each, ρ≥0.999) | Just-intonation ratios: 4:3 (Subject↔Modifier), 5:3 (Modifier↔TEKAMOLO) |
1185+
| i8 + BF16 residual, lossless restore `tanh((i8+127)/254 × z_range + z_min)` | Per-role decomposition, zero cross-contamination |
1186+
1187+
### Shape (Rust sketch — not shipped; spec only)
1188+
1189+
```rust
1190+
pub struct CartanCascade {
1191+
// Full 5-level HHTL per main SPO role (2000 dim each):
1192+
subject: HhtlCascade<2000>, // ~15 B, full precision
1193+
predicate: HhtlCascade<2000>, // ~15 B
1194+
object: HhtlCascade<2000>, // ~15 B
1195+
// Compressed 4-level (perfect-fourth 3/4 ratio vs subject):
1196+
modifier: HhtlCascade<1500>, // ~11 B
1197+
context: HhtlCascade<1500>, // ~11 B
1198+
// Further compressed 3-level (major-sixth 5/3 ratio vs modifier):
1199+
tekamolo: HhtlCascade<900>, // ~7 B
1200+
// Degenerate HEEL-only (manifold at native resolution already):
1201+
finnish: Heel<70>, // ~1 B
1202+
tense: Heel<60>, // ~1 B
1203+
nars: Heel<30>, // ~1 B
1204+
}
1205+
// Per-bundle total: ~77 bytes. Compression: ~520× from Vsa10kF32 (40 KB).
1206+
```
1207+
1208+
### YAML spec for the codec-sweep candidate
1209+
1210+
```yaml
1211+
# configs/codec/40_cartan_cascade_subject.yaml
1212+
name: cartan_cascade_subject_slice
1213+
codec: cartan_cascade
1214+
role: subject
1215+
slice: [0, 2000]
1216+
hhtl_levels: 5
1217+
fisher_z_group_kb: 64
1218+
lane_width: F32x16
1219+
pre_rotation:
1220+
kind: identity
1221+
distance: adc_u8
1222+
calibration_rows: 2048
1223+
seed: 42
1224+
notes: |
1225+
CartanCascade: per-role HHTL with Cartan-character-sized bit budget.
1226+
Subject slice [0..2000) gets full 5-level HHTL cascade (~15 B).
1227+
Measures token agreement PER ROLE — Subject independently, then
1228+
compose. If per-role reconstruction ICC ≥ 0.999 (Fisher-z certified)
1229+
AND composed token agreement ≥ 0.99, CartanCascade passes the gate.
1230+
77 bytes per bundle = 520× compression vs Vsa10kF32.
1231+
```
1232+
1233+
```yaml
1234+
# configs/codec/41_cartan_cascade_tekamolo.yaml
1235+
name: cartan_cascade_tekamolo_slice
1236+
codec: cartan_cascade
1237+
role: tekamolo
1238+
slice: [9000, 9900]
1239+
hhtl_levels: 3
1240+
fisher_z_group_kb: 32
1241+
lane_width: F32x16
1242+
pre_rotation:
1243+
kind: identity
1244+
distance: adc_u8
1245+
calibration_rows: 2048
1246+
seed: 42
1247+
notes: |
1248+
TEKAMOLO slice [9000..9900) gets compressed 3-level HHTL (~7 B).
1249+
Major-sixth ratio (5:3) vs Modifier — not arbitrary, derived from
1250+
Cartan-character spectrum. If ρ < 0.999 at this compression, the
1251+
Cartan-character hypothesis fails for this role.
1252+
```
1253+
1254+
```yaml
1255+
# configs/codec/42_cartan_cascade_degenerate.yaml
1256+
name: cartan_cascade_nars_heel_only
1257+
codec: cartan_cascade
1258+
role: nars
1259+
slice: [9970, 10000]
1260+
hhtl_levels: 1
1261+
fisher_z_group_kb: 4
1262+
lane_width: F32x16
1263+
pre_rotation:
1264+
kind: identity
1265+
distance: adc_u8
1266+
calibration_rows: 2048
1267+
seed: 42
1268+
notes: |
1269+
NARS slice [9970..10000) gets degenerate HEEL-only (~1 B). The
1270+
30-dim manifold is at native resolution — no hierarchy needed.
1271+
Fisher-z table shrinks to 4 KB. This is the NULL test: if even
1272+
HEEL-only fails for 30 dims, the codec is broken at a level
1273+
unrelated to Cartan characters.
1274+
```
1275+
1276+
```yaml
1277+
# configs/codec/43_cartan_cascade_full_compose.yaml
1278+
name: cartan_cascade_full_composed
1279+
codec: cartan_cascade
1280+
role: all
1281+
slices:
1282+
- { role: subject, start: 0, end: 2000, levels: 5, fisher_z_kb: 64 }
1283+
- { role: predicate, start: 2000, end: 4000, levels: 5, fisher_z_kb: 64 }
1284+
- { role: object, start: 4000, end: 6000, levels: 5, fisher_z_kb: 64 }
1285+
- { role: modifier, start: 6000, end: 7500, levels: 4, fisher_z_kb: 48 }
1286+
- { role: context, start: 7500, end: 9000, levels: 4, fisher_z_kb: 48 }
1287+
- { role: tekamolo, start: 9000, end: 9900, levels: 3, fisher_z_kb: 32 }
1288+
- { role: finnish, start: 9840, end: 9910, levels: 1, fisher_z_kb: 4 }
1289+
- { role: tense, start: 9910, end: 9970, levels: 1, fisher_z_kb: 4 }
1290+
- { role: nars, start: 9970, end: 10000, levels: 1, fisher_z_kb: 4 }
1291+
lane_width: F32x16
1292+
pre_rotation:
1293+
kind: identity
1294+
distance: adc_u8
1295+
calibration_rows: 2048
1296+
seed: 42
1297+
notes: |
1298+
Full CartanCascade composition test: all 9 roles decoded independently,
1299+
then composed into one 10kD vector. Token agreement measured on the
1300+
composed output vs Passthrough. If passes: 520× compression is
1301+
role-lossless. If fails: identify which role's HHTL level is
1302+
under-specified — Cartan characters need adjustment.
1303+
1304+
Total bytes: 3×15 + 2×11 + 7 + 3×1 = ~77 bytes per bundle.
1305+
1306+
Critical overlap test: Finnish [9840..9910) overlaps TEKAMOLO
1307+
[9000..9900) by 60 dims — the overlap region gets BOTH the tekamolo
1308+
3-level encoding AND the finnish 1-level encoding. Verify that the
1309+
overlap doesn't degrade: if both agree, the overlap IS the
1310+
morphology-to-slot commitment (E-MEMB-2). If they disagree, the
1311+
overlap is a layout bug, not a feature.
1312+
```
1313+
1314+
### Why this belongs in the sweep (not as a standalone research crate)
1315+
1316+
CartanCascade is NOT a new crate. It's a **codec candidate** that
1317+
runs through the same `CodecParams` → JIT kernel → token-agreement
1318+
pipeline as every other sweep candidate. The `codec: cartan_cascade`
1319+
value is a new enum variant on `WireCodecParams` (D0.1 surface)
1320+
that routes to a per-role HHTL JIT kernel (D1.1 + D1.3 composition).
1321+
1322+
The sweep infrastructure (Phase 0 hardened, Phase 1 JIT kernels,
1323+
Phase 2 token-agreement) is what makes it testable WITHOUT a
1324+
dedicated crate. The `prove_it.rs` binary (JC crate) is the
1325+
substrate proof; the codec-sweep is the rate-distortion proof.
1326+
Two measurements, one architecture.
1327+
1328+
### Acceptance gate (dual)
1329+
1330+
1. **Per-role Fisher-z fidelity:** each role slice independently
1331+
hits ρ ≥ 0.999 on its reconstruction (inherited from bgz-hhtl-d
1332+
certification standard).
1333+
2. **Composed token agreement:** the reassembled 10kD vector (all 9
1334+
roles composed) achieves top-1 token agreement ≥ 0.99 vs
1335+
Passthrough (inherited from codec-sweep D0.2 gate).
1336+
1337+
If both pass: CartanCascade is **the** 520× bundle codec, and the
1338+
Cartan-character widths are proven intrinsic in the same measurement.
1339+
Two-for-one proof.
1340+
1341+
### JC pillar connection
1342+
1343+
`jc::cartan` (currently deferred) activates when CartanCascade
1344+
succeeds:
1345+
- If per-role HHTL levels inversely correlate with Cartan-character
1346+
widths (bigger roles need more levels, smaller roles need fewer
1347+
or none), that's the empirical Cartan-character discovery.
1348+
- If the harmonic ratios (4:3, 5:3) appear in the per-role
1349+
compression ratios, the just-intonation structure is confirmed.
1350+
- The `jc::cartan::prove()` function extends to report these
1351+
correlations alongside the prove_it binary output.

.github/workflows/jc-proof.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: JC Substrate Proof
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
paths:
8+
- crates/jc/**
9+
- crates/lance-graph-contract/src/cam.rs
10+
- .github/workflows/jc-proof.yml
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
14+
cancel-in-progress: true
15+
16+
env:
17+
CARGO_TERM_COLOR: always
18+
19+
jobs:
20+
prove:
21+
name: Five-Pillar Substrate Proof
22+
runs-on: ubuntu-24.04
23+
timeout-minutes: 5
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Setup Rust
27+
run: |
28+
rustup toolchain install stable
29+
rustup default stable
30+
31+
- name: Run JC tests (6 unit tests)
32+
run: cargo test --manifest-path crates/jc/Cargo.toml
33+
34+
- name: Run prove_it (substrate proof binary)
35+
run: |
36+
cargo run --manifest-path crates/jc/Cargo.toml --release --example prove_it
37+
echo "Exit code: $?"

0 commit comments

Comments
 (0)