feat(pillar): substrate-tier Pillars 12-17 + design charter#188
Conversation
Substrate-tier pillars native to ndarray:
- Pillar 12: Splat-construction rotation invariance.
4096 synthetic (scale, quat) pairs; certifies Σ = R·diag(s²)·Rᵀ is SPD
and trace/det/Frobenius rotation invariants hold within f32 precision.
- Pillar 13: HHTL cascade contraction.
256 cascades × depth 4 at lr=0.5; certifies almost-sure d_t ≤ d_{t-1}
AND per-level mean ratio = (1-lr) within CLT tolerance σ/√N_CASCADES.
- Pillar 14: OGIT type-gate lattice closure.
64 synthetic DAG schemas × 64 types; certifies reflexivity +
antisymmetry + transitivity after Floyd-Warshall closure.
mod.rs registers pillars 12-17 alongside migrated 6-11, exposes
run_substrate_tier() convenience runner, and adds tier-documenting
module docs. All pillars share existing prove_runner.rs harness.
Deferred substrate-tier pillars following the lance-graph/crates/jc DEFERRED convention (Pillar 11 was deferred several months before sigker landed and activated it): - Pillar 15: Mexican-hat / DoG unimodality. Awaiting Mexican-hat resonance kernel in hpc::dragonfly. Will certify DoG kernel unimodality at κ = σ_s/σ_c ∈ [1.5, 3.0]. - Pillar 16: BTSP-gated bundling unbiasedness. Awaiting stable BTSP API in dn_tree. Will certify Doob optional-stopping unbiasedness of gated bundle. - Pillar 17: Quaternary tree balance under Zipf access. Awaiting Zipf workload simulator + DNTree inspector methods. Will certify Brent-style depth/occupancy variance bounds. Each stub exports its SEED constant, a prove_pillar_N() returning a deferred-shape PillarReport (zeros + passed=true), and a full proof-obligation docstring describing the activation plan.
Threads the unified thesis through Pillars 12-17: - Standing-challenge framing (mathematics demands; substrate is on trial) - Tier architecture (cognitive-architecture 6-11 vs substrate 12-17) - Per-pillar walkthroughs (claim, why-substrate-needs, probe, criteria) - Synthetic-only discipline - Seven-exchange backstory as motivation - Future candidate pillars 18+ - Open questions and known limits
CI fmt --all --check (Rust 1.95.0, rustfmt 2026-04-16) collapses single-condition assert!(...) calls onto one line when they fit within the configured max width. Apply the canonical formatting to unblock the substrate-tier-12-to-17 CI gate. No behavioral change.
61f3aea to
7b04487
Compare
…scale_quat Cross-validation test that runs both the pillar's independently-derived covariance_from_scale_quat() AND the production Spd3::from_scale_quat() on the same SplitMix64-seeded 256 (scale, quat) pairs, then asserts upper-triangle agreement to within 1e-5 per lane. This is the missing wire from #188's "Pillars 12-14 implemented": the pillar files reference their production targets in docstrings but do not cross-check against them. The PR description explicitly noted this gap ("Production code paths in splat3d, dn_tree, ogit_bridge are not coupled to pillars in this PR. The pillars re-derive their math independently, by design — drift between substrate and pillar is the failure mode pillars exist to catch.") The cross-check below preserves that design — it adds NO coupling in src/ — but it gates CI on production and pillar agreeing, so drift WILL fail the build instead of silently passing both kernels. For the other two implemented pillars in #188: - Pillar 13 needs `pub(crate) fn bundle_into` to be re-exported on `dn_tree` so a sibling cross-check can compare to production (currently private). - Pillar 14 needs a separable closure/ancestor accessor on `OntologySchema` (currently the closure is implicit in the heel→hip→leaf family-bitmap construction with no public point-pair `is_ancestor(t, u) -> bool` to validate against). Both gaps require small production-side surface changes, which is a better fit for the session that owns the pillar branch; this commit wires only the gap that needed zero production change.
|
Following up on the cross-coupling note in this PR's description ("Production code paths in I wired the missing drift-check for Pillar 12 on Pillars 13 and 14 need small production-side surface changes before they can be cross-checked — these are the wires I couldn't land from my side without touching the pillar branch's domain: Pillar 13 (HHTL contraction ↔
|
|
Thanks for the careful read and the Pillar-12 drift-check on I read the production code at both cited locations to confirm the diagnosis:
Both surface changes landed on
Once #189 lands you have the surfaces to write the Pillar-13 and Pillar-14 drift checks the way you wrote the Pillar-12 one. Same pattern — same SplitMix64 seed as the pillar, same point-for-point comparison, same "pillar wins by design" semantics for the assertion direction. The four-pillar drift-check trio (12 from |
…scale_quat Cross-validation test that runs both the pillar's independently-derived covariance_from_scale_quat() AND the production Spd3::from_scale_quat() on the same SplitMix64-seeded 256 (scale, quat) pairs, then asserts upper-triangle agreement to within 1e-5 per lane. This is the missing wire from #188's "Pillars 12-14 implemented": the pillar files reference their production targets in docstrings but do not cross-check against them. The PR description explicitly noted this gap ("Production code paths in splat3d, dn_tree, ogit_bridge are not coupled to pillars in this PR. The pillars re-derive their math independently, by design — drift between substrate and pillar is the failure mode pillars exist to catch.") The cross-check below preserves that design — it adds NO coupling in src/ — but it gates CI on production and pillar agreeing, so drift WILL fail the build instead of silently passing both kernels. For the other two implemented pillars in #188: - Pillar 13 needs `pub(crate) fn bundle_into` to be re-exported on `dn_tree` so a sibling cross-check can compare to production (currently private). - Pillar 14 needs a separable closure/ancestor accessor on `OntologySchema` (currently the closure is implicit in the heel→hip→leaf family-bitmap construction with no public point-pair `is_ancestor(t, u) -> bool` to validate against). Both gaps require small production-side surface changes, which is a better fit for the session that owns the pillar branch; this commit wires only the gap that needed zero production change.
…strate Completes the substrate-tier drift-check trio for the implemented pillars in #188 (Pillar 12 already wired in 8cb40ca on this branch against Spd3::from_scale_quat). Pillar 13 ↔ dn_tree::bundle_into: Both implementations use the same SplitMix64 algorithm (identical multiplier constants and shift sequence) and the same number of RNG draws per word at p=0.25 (n=ceil(-log2(0.25))=2). With per-trial re-seeding to align mask sequences across the size disparity (pillar 16 words × 2 = 32 draws, production 3×256 words × 2 = 1536 draws), the first WORDS=16 u64 of production's GraphHV.channels[0] match the pillar's bundle_step output BIT-EXACTLY over 16 trials. lr=0.25 chosen because production's make_probability_mask has a latent infinite-recursion bug at p=0.5 exactly (p >= 0.5 recurses with 1.0 - 0.5 = 0.5); pillar's p > 0.5 strict comparison correctly falls through to the AND-cascade. Real production usage (DNConfig default lr=0.03 with boost up to ~30) never hits 0.5 so the bug is dormant. Recorded for future cleanup. Pillar 14 ↔ OntologySchema::is_ancestor: Production's OntologySchema is single-parent (parent: Option<Box<str>>); pillar 14's synthetic schemas are multi-parent DAGs. The drift-check operates on the strict subset — generates a deterministic single-parent random tree, builds it as Turtle source, parses to OntologySchema, computes pillar's Floyd-Warshall closure on the same direct-edge boolean matrix, and asserts agreement on EVERY (ancestor, descendant) pair (N=8 tree → 64 pair-checks). Closure axes: pillar `le[i*N+j]` ≡ "i extends j" ≡ production `is_ancestor(types[j], types[i])`. Documented inline. The drift-check is gated on the `ogit_bridge` feature (the pillar itself is under `pillar`); both must be active. All 132 pillar tests pass; lib fmt + clippy clean.
…literals Same canonical-fmt collapse as #188's pillar-branch hotfix: rustfmt 1.95.0 collapses multi-line function-call arguments and small array literals when they fit within the configured max width. No behavioral change.
Pillar substrate tier (12–17): native ndarray pillars
Summary
Adds six native pillars to
src/hpc/pillar/, peering with the lance-graph-migrated Pillars 6–11. Three are implemented and pass against numpy reference implementations; three are deferred with full proof-obligation docstrings, mirroring theDEFERREDconvention fromlance-graph/crates/jc.The pillar set:
splat3d::spd3::Spd3::from_scale_quat(scale, quat)pairs; Σ=R·diag(s²)·Rᵀ SPD + trace/det/Frobenius rotation invariantsdn_tree::bundle_into/ cognitive HHTL cascadelr=0.5; almost-sure contraction + per-level mean ratio CLT vs predicted(1-lr)ogit_bridge::schema::OntologySchema(subClassOf semantics)dn_treeBTSP API (when contract-frozen)DNTree+ Zipf workload simulator (when both exist)All six share the existing
prove_runner.rsharness (SplitMix64,PillarReport,assert_psd_rate). Substrate-tier pillars are gated under the samepillarfeature as 6–11. A convenience runnerrun_substrate_tier()runs all six in order.Architecture rationale
crates/jc-ndwas floated initially but the existingsrc/hpc/pillar/module — explicitly documented as the migration target for lance-graph-jc per its module docs — is the right home: it preserves Invariant 12 ("certification is about determinism + inspectability, not repo separation"), keeps the harness types shared, and lets 12–17 sit alongside 6–11 as peer pillars rather than a parallel ecosystem.The substrate-vs-cognitive-architecture distinction is conceptual, not structural:
The full thesis is laid out in
docs/pillar-substrate-charter.md.What's tested, what's not
Tested in CI under the
pillarfeature:prove_pillar_Nruns deterministically and passes its pass criteria.SEEDconstant matches its declared spec value (catches accidental edits).frob_sq_sym3against identity rotation; Pillar 13 verifiesbundle_stepatlr=0andlr=1boundary conditions; Pillar 14 verifies closure idempotence).Sanity-checked offline against numpy references (results documented in the charter):
Not tested (intentional):
splat3d,dn_tree,ogit_bridgeare not coupled to pillars in this PR. The pillars re-derive their math independently, by design — drift between substrate and pillar is the failure mode pillars exist to catch.passed=truedeferred-shape report (all-zero numeric fields). When their activation gates open, the body is replaced with the probe described in the docstring.File-by-file changes
Total: ~2550 lines, of which ~500 is the design document and ~470 is deferred-pillar proof-obligation docstrings.
How to run
Review pointers
//!header → SEED const → constants → kernels → probe entry → tests.0x_C{NN}{tag}mnemonic pattern (e.g.C12A_550A_D0DDfor "C12A SS0AD0DD" → "Pillar 12 splat 0AD0DD").PillarReportfield semantics are documented per-pillar where they differ from the EWA-sandwich convention (e.g.psd_raterepurposed as "contraction preservation rate" for Pillar 13, "Sylvester SPD pass fraction" for Pillar 12;lognorm_concentrationrepurposed as natural log-deviation metric in each).Known follow-ups (deliberately not in this PR)
dn_treeis contract-frozen.DNTreeinspector methods land.Commit plan
Splittable across three commits if preferred for cleaner
git reset:feat(pillar): add Pillars 12–14 (implemented) and update mod.rsfeat(pillar): add Pillars 15–17 (deferred stubs with proof obligations)docs(pillar): add substrate-tier design charterOr one commit if the unit is the conceptual addition rather than the file boundary.