Skip to content
16 changes: 16 additions & 0 deletions .claude/board/AGENT_LOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## [Main thread / Opus, autoattended] D-SUBSTRATE-B-CONSUMER-DOC — `.claude/knowledge/old-stack-capability-parity.md` SHIPPED (companion to lab-vs-canonical-surface + hollow-wire-failure-modes)

**Branch:** doc/knowledge-old-stack-capability-parity (this PR). New `.claude/knowledge/` doc capturing the substrate-b consumer integration shape: the seven-capability composition (`lance-graph` storage + `surrealdb kv-lance` KV + Tantivy search + DataFusion OLAP + ractor actors + `LanceVersionWatcher` in-proc bus + external Zitadel IAM), the three load-bearing primitives (Lance versions as multi-purpose temporal; palette256+Hamming per-element auth; ractor-Actor + Lance-version-as-state-machine = Rubicon), and the capability roadmap (built / partial / not-yet) honest accounting.

**What it serves:** any substrate-b consumer planning a lance-graph + ractor + surrealdb integration needs the same correspondence answers (what's built, what's partial, which primitive replaces what design pattern). Documenting it once upstream lets every consumer reuse the answer without re-deriving.

**Three load-bearing structural patterns** (also recorded in EPIPHANIES as `E-SUBSTRATE-B-CAPABILITY-ROADMAP`): (1) Lance versions are multi-purpose (point-in-time + time-series + audit, one primitive); (2) per-element auth = palette256+Hamming popcount (uncached / immediate-effect by construction); (3) ractor Actor + Lance-version-as-state-machine = Rubicon phase machine (the actor's state history IS the version log).

**Migration endpoint contract documented:** the substrate-b dual-stack ground-truth surface (`POST /v1/{entity,edge,traverse,query,graphql,audit}` + `WS /v1/stream` + `POST /v1/dispatch`). Same workload replayed against substrate-b AND the system being replaced; the §14 acceptance gate (consumer-side `docs/MIGRATION-COMPARISON-HARNESS.md`) produces per-endpoint verdicts.

**Capability roadmap honesty:** built today = Lance versions, LanceVersionWatcher (std::sync), `MessagingErr::Saturated`, surrealdb kv-lance, planner 16 strategies, auth-plug, palette256+Hamming, cognitive-shader-driver, `EpisodicEdges64` Phase A, OGAR Sprint 5/6. Partial = lance-graph consumer surface, DataFusion OLAP, dn_redis wiring, distributed actor topology, OGIT data-model coverage. Not-yet = Tantivy wiring, OGAR Sprint 7 (gated), peer-Raft pick, migration endpoint router, WS/gRPC Layer-3.

**Outcome:** doc-only, no code changes. Spot-check provenance: every cross-reference is to lance-graph / surrealdb / ractor / OGAR PR numbers + existing knowledge docs in this repo. No consumer-internal specifications cross the upstream boundary; only the integration shape + capability roadmap.

---

## [Main thread / Opus, autoattended] D-HELIX-1 SHIPPED — `crates/helix` golden-spiral Place/Residue codec (zero-dep + optional ndarray-hpc)

**Branch:** claude/gallant-rubin-Y9pQd. New standalone crate `crates/helix` (empty `[workspace]`, added to root `exclude`) realising the user's `KNOWLEDGE.md` Place/Residue encoding — HHTL = deterministic PLACE, helix = orthogonal RESIDUE: equal-area `√u` hemisphere placement (`HemispherePoint`) → stride-4-over-17 `CurveRuler` coupling → Fisher-Z/arctanh `Similarity` alignment → EULER_GAMMA hand-off → 256-palette `RollingFloor` quantise (occupancy-drift + floor-version stamp) → 3-byte `ResidueEdge` endpoint pair; metric-safe L1 via 256×256 `DistanceLut` (`distance_adaptive`) + non-metric byte-Hamming `distance_heuristic`. **Tests:** 61 unit + 6 doctests green on the default zero-dep build (clippy -D warnings + fmt clean); same 61+6 green under `--features ndarray-hpc` (batch Fisher-Z routes through `ndarray::simd::simd_ln_f32`; `batch_fisher_z_matches_scalar_reference` confirms bit-equivalence to the scalar path). Closed Open Item #1 — `prove()` is the 2-D golden-spiral discrepancy companion to `jc::weyl` (D*_φ=0.00160 < D*_ctrl=0.00252 at N=1597). **Process (autoattended):** 5 read-only research agents (weyl/jc template · bgz17 metric-safety · ndarray SIMD surface · HHTL offset · encoding-ecosystem placement) → main-thread foundation + spine → 4 parallel Sonnet leaf workers (placement / fisher_z / quantize / prove; edit-only, no worktree, tee writes) → central compile/clippy/fmt/test consolidation (fixed 1 contrived worker test + 4 clippy lints). **Honest finding (E-HELIX-OVERLAP):** ~80% of the pipeline pre-exists, some CERTIFIED (`bgz-tensor::Base17Fz`/`fisher_z::FamilyGamma` ρ≥0.999, `jc::weyl`); shipped as a user-directed zero-dep clean-room re-derivation — overlap + consolidation path documented in `crates/helix/KNOWLEDGE.md` and TD-HELIX-OVERLAP-1. Board: LATEST_STATE + STATUS_BOARD D-HELIX-1 + EPIPHANIES E-HELIX-OVERLAP + TECH_DEBT + this entry (same commit).
Expand Down
20 changes: 20 additions & 0 deletions .claude/board/EPIPHANIES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
## 2026-06-04 — E-SUBSTRATE-B-CAPABILITY-ROADMAP — three load-bearing NEW-stack primitives codified; consumer integration shape documented

**Status:** FINDING (substrate-b consumer integration pattern, codified after the OGAR / surrealdb / ractor / lance-graph correspondence work converged on three structural primitives, 2026-06-04).

**Three NEW-stack primitives substrate-b consumers must internalise** (now codified in `.claude/knowledge/old-stack-capability-parity.md`):

1. **Lance versions are a multi-purpose primitive.** One primitive serves three capabilities a substrate-b consumer would otherwise build separately: `checkout_version(V)` = point-in-time query (Historisation); the version log = time-series; append-only immutability = signed audit. Consumers should NOT introduce separate stores for these three.

2. **Per-element auth = palette256 + Hamming popcount on `Binary16K`.** The hot-path auth primitive is bit-op-per-element via the per-vertex `_effectiveReaders` / `_effectiveDevices` bitmap. Materialised on write; checked on read via Hamming popcount / bit-intersection; uncached / immediate-effect by construction. ACL changes at version V are in effect at every read at version >= V; consumers should NOT introduce an auth cache.

3. **ractor Actor + Lance-version-as-state-machine = the Rubicon phase machine.** A substrate-b actor models its lifecycle as a typed state enum on a ractor `Actor`; state-enter side-effect fires the Lance commit at the Decision state; events arriving before Decision are deferred; per-state timeouts route through `MessagingErr::Saturated`. The actor's state history IS the Lance version log on its dataset; no separate state-machine event store needed.

**Two consumer-side patterns** that fall out of these primitives:
- The `LanceVersionWatcher` (in-proc event bus) uses `std::sync` per the I-2 invariant — tokio is reserved for Layer-3 outbound sinks. A consumer that wires tokio for in-process subscription violates I-2 and reproduces the bug `version_watcher.rs`'s 2026-05-06 plan correction note already records as fixed upstream. This is a `hollow-wire-failure-modes.md` failure-mode magnet.
- The migration endpoint contract (`POST /v1/{entity,edge,traverse,query,graphql,audit}` + `WS /v1/stream` + `POST /v1/dispatch`) is the substrate-b dual-stack ground-truth surface — same workload replayed against substrate-b AND the system being replaced; §14 acceptance gate produces a per-endpoint verdict.

**Cross-ref:** `.claude/knowledge/old-stack-capability-parity.md` (new); `.claude/knowledge/lab-vs-canonical-surface.md` (companion); `.claude/knowledge/hollow-wire-failure-modes.md` (companion); `AdaWorldAPI/lance-graph#452/#453/#454/#455/#456/#457/#458` (merged contributions); `AdaWorldAPI/surrealdb#35/#36` (kv-lance feature + Lance backend struct); `AdaWorldAPI/ractor#1` (`MessagingErr::Saturated`); `AdaWorldAPI/OGAR#5/#6/#7/#8` (carrier shipping).

---

## 2026-06-03 — E-HELIX-NDARRAY-MANDATORY — `helix` ndarray wiring: optional `path` → mandatory `git` (codex P2 + "ndarray is mandatory") — an optional path dep is a clean-checkout trap

**Status:** FINDING (codex P2 on #460 + user directive, 2026-06-03; fix verified — 63 unit + 6 doctests green with mandatory ndarray, clippy -D warnings + fmt clean; the git source was patched to the local `master` checkout for the in-sandbox build, github fetch deferred to CI).
Expand Down
Loading