Skip to content

Commit 6b2a1ee

Browse files
committed
docs(meta): pattern.md SoA/DTO graph traversal primer + entropy ledger VSA-scope correction
pattern.md (NEW, 578 lines) — usability patterns for traversing the workspace's SoA/DTO surface as a graph (nodes = type defs, edges = producer-consumer + duplicate + seam, subgraphs = clusters). 15 named patterns covering canonical lookup, maturity scoring, Click-P-1 lens, register-laziness check, dual-tier writes, ingestion-commit, lineage- as-column, append-only governance, consult-first ordering, cross- session blackboard via ledger row IDs, source-vs-claim divergence, cluster-fix discipline, debug-as-API debt, scope-lock, and seam-naming. Plus 7 critical findings and append-only update protocol. ARCHITECTURE_ENTROPY_LEDGER.md (APPEND-only correction block) — VSA scope correction per CLAUDE.md I-VSA-IDENTITIES iron rule: - VSA-1 description tightened: Vsa16kF32 is for Markov chain over identity fingerprints exclusively. Provenance / JWT / RBAC / IDs are register territory, not VSA carriers. - PERMUTE-1 description tightened: vsa_permute is unitary as an operation but the braiding usage is NOT lossless; cross-talk shrinks unbinding margin with N. Bound: N <= sqrt(d)/4. New rows: - EWA-SANDWICH-1 (PR #289 was missing from initial snapshot): Stage 3 / Smart / entropy 2. Scope: SPD-bounded propagation of cognitive Vsa16kF32 across Markov rho^d cycles. NOT a lineage error model (corrected from initial framing). - SUBJECT-DTO-1: aspirational typed Subject struct with AuthSource enum (typed JwtClaims, not VSA). Implied by MedCareV2 #7+#8 wire shape. - MOCK-DRIVER-1: q2 PR #35 Phase-3 placeholder, Stage 2. Cross-repo resolution events: - THINK-1 partial: q2 PR #35 dropped thinking-engine + cognitive-shader-driver deps from cockpit-server, migrated to canonical contract::cognitive_shader::*. Wire compression 256x on cycle_fingerprint, 128x on color_acc. - TRUTH-1 partial: q2 PR #35 cockpit-server bridges to lance-graph-planner::nars::truth::TruthValue::deduction. - POLICY-1 + MEMBRANE-GATE-1: priority bump — MedCareV2 #8 now blocking on impl MembraneGate for Arc<rbac::Policy>. Section G — ingestion-vs-traversal axis added: Cypher-parser path (Option 1, ships now via PARSER-1 resolution) and splat-deposit path (Option 2, gated by SPLAT-1) both converge on E1 typed Action API. Retractions: E4 (VSA-bundled provenance) and E8 (geometrically- bounded provenance via Vsa16kF32+EWA) — register laziness; do NOT get appended to EPIPHANIES.md. E1, E2, E3, E5, E6, E7, E9 stand. https://claude.ai/code/session_012AUf5NFgeAAQa5aQAKwSgx
1 parent 3f1594e commit 6b2a1ee

2 files changed

Lines changed: 709 additions & 0 deletions

File tree

.claude/board/ARCHITECTURE_ENTROPY_LEDGER.md

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,3 +310,134 @@ This row alone (combined with PERMUTE-1, CONTENT-FP-1,
310310
ROLEKEY-OPS-1, CRYSTAL-1) carries the highest cognitive leverage
311311
of any single fix in the ledger.
312312

313+
314+
---
315+
316+
## 2026-05-06 — VSA-scope correction + cross-repo ledger updates
317+
318+
### VSA-1 description correction
319+
320+
**Old framing (this session, 2026-05-05 snapshot Section A row + Section F.5):**
321+
"Vsa16kF32 is the architecture's load-bearing carrier — the literal FMA
322+
`bind(role, content) + bundle(prior)` lives on it. ... the canonical
323+
deficit-vs-genius gap."
324+
325+
**Corrected framing (per CLAUDE.md I-VSA-IDENTITIES iron rule):**
326+
`Vsa16kF32` is for **one job**: Markov chain over identity fingerprints
327+
(per-cycle cognitive state, role-keyed content, position-braided).
328+
Bundle size N ≤ √d / 4 ≈ 32 by concentration-of-measure. The Click
329+
P-1 deficit (8 free fns vs methods on a newtype) stands and remains
330+
the highest-leverage carrier-method genius move. **What does NOT
331+
stand:** any framing that has `Vsa16kF32` carrying provenance, JWT
332+
claims, RBAC roles, transform IDs, branch IDs, or other register-
333+
territory state. Those are HashMap / typed-struct / Lance-column
334+
work, gated by Test 0 (register laziness) of the four VSA tests.
335+
336+
### PERMUTE-1 description correction
337+
338+
**Old framing:** "Markov ρ^d braiding requires lossless permute."
339+
340+
**Corrected framing:** `vsa_permute` is unitary as an operation but
341+
the **braiding usage is not lossless** — position-shifted copies in
342+
a bundle have cross-talk that shrinks the unbinding margin with N.
343+
Treat permute as **SNR-bounded position-braiding for Markov ρ^d**,
344+
bound by N ≤ √d / 4 like every other VSA bundle. The deficit row
345+
stands; the description is honest now.
346+
347+
### EWA-SANDWICH-1 — new row (missed in 2026-05-05 snapshot)
348+
349+
| ID | Region | Component | Mat | State | S/D | Dups | DupPot | LooseEnds | Plan/Status | E | Deficit→Genius |
350+
|---|---|---|---|---|---|---|---|---|---|---|---|
351+
| **EWA-SANDWICH-1** | R6/(jc) | Pillar-6 covariance sandwich | **3** | Wired (shipped #289, 7/7 tests, 10K/10K SPD) | Smart (`EwaSandwich::propagate(&[M], Σ_0)` carrier method) | 1 | None | **Scope: SPD-bounded propagation of cognitive `Vsa16kF32` across Markov ρ^d cycles. NOT a lineage error model.** Couples to (currently absent) SPLAT-1 ingestion path; per-row `sigma` carries through `propagate` cleanly only once `BindSpace.apply()` (E1) lands. | jc / Shipped #289 | **2** | Expose `Σ_path` on `ShaderHit` for cold-audit replay; couple to E1 Action API so per-row σ enters the propagate chain at write time |
352+
353+
### SUBJECT-DTO-1 — new row (implied by MedCareV2 #7 + #8)
354+
355+
| ID | Region | Component | Mat | State | S/D | Dups | DupPot | LooseEnds | Plan/Status | E | Deficit→Genius |
356+
|---|---|---|---|---|---|---|---|---|---|---|---|
357+
| **SUBJECT-DTO-1** | R4/R6 | `Subject` / authentication context | **0** | Aspirational | n/a (type does not exist; MedCareV2 #8 carries JWT shape `{token, user_id, role, display_name}` ad-hoc) | 0 | None | Multiple consumers waiting on a canonical type that doesn't exist yet — namespace pre-claimed by JWT shape in MedCareV2 #8 + `q2` cycle session-binding. `MembraneGate::admit` has no Subject parameter today. | foundry-roadmap.md (no D-id) / Missing | **4** | `contract::subject::Subject { user_id: u64, roles: SmallVec<[u16; 4]>, display_name: SmolStr, auth_time: i64, source: AuthSource }` with `AuthSource::{Jwt(JwtClaims), Session(SessionId), Anonymous, ProbeOnly}`. **Typed struct fields, not VSA.** Consumed by `MembraneGate::admit(subject, resource, op)` (E2 seam) |
358+
359+
### THINK-1 — partial resolution event (q2 PR #35, 2026-05-06 09:16 UTC)
360+
361+
**State delta:** in `cockpit-server` only.
362+
- Old: cockpit-server consumed `thinking_engine::dto::*` (THINK-1
363+
spaghetti contributor).
364+
- New: cockpit-server migrated to canonical
365+
`lance_graph_contract::cognitive_shader::*`. Both `thinking-engine`
366+
and `cognitive-shader-driver` workspace deps DROPPED from
367+
cockpit-server.
368+
- THINK-1 row entropy stays 5 workspace-wide (planner-12 + engine-12
369+
+ engine-5 + bandit + UNIFIED_STYLES const still exist), but the
370+
cluster has one fewer downstream consumer.
371+
- Wire-shape compression also landed: `cycle_fingerprint [u64;256]`
372+
(2 KB) → `cycle_fingerprint_hash u64` (8 B), 256× reduction.
373+
`color_acc [f32;32]` (128 B) → `color_acc_active_dims u8` (1 B).
374+
375+
### TRUTH-1 — partial resolution event (q2 PR #35)
376+
377+
**State delta:** in `cockpit-server` `graph_engine.rs::nars_deduction`.
378+
- Old: hand-rolled `f = f1*f2, c = f1*f2*c1*c2` (4th `TruthValue`
379+
copy in this workspace).
380+
- New: bridges to `lance_graph_planner::nars::truth::TruthValue::deduction`.
381+
Same formula, single source.
382+
- TRUTH-1 entropy stays 4 workspace-wide (3 copies still exist:
383+
contract::crystal + planner::nars::truth + causal-edge::tables
384+
with subtly different `revise()` math), but q2 is no longer the 4th.
385+
386+
### MOCK-DRIVER-IS-CONTRACT-CITIZEN — new row (q2 PR #35)
387+
388+
| ID | Region | Component | Mat | State | S/D | Dups | DupPot | LooseEnds | Plan/Status | E | Deficit→Genius |
389+
|---|---|---|---|---|---|---|---|---|---|---|---|
390+
| **MOCK-DRIVER-1** | R3 | `MockShaderDriver` (q2/cockpit-server) | **2** | Wired (Phase-3 placeholder; 5/5 tests) | Smart (`impl CognitiveShaderDriver`; `dispatch_with_sink(&dispatch, &mut SseSink)`) | 1 | None | Synthesizes `ShaderHit` from perturbation indices via `idx → row = idx % row_count`, `distance = i*64`, `resonance = 1.0 - i*0.1`. Phase-3 placeholder until real `BgzShaderDriver` lands (BindSpace + bgz17 + Jina v5 codebook). Disclosed at `mock_driver.rs:1-30`. | (no plan; phase-3 implicit) / Stalled-by-design | **2** | Replace with `BgzShaderDriver` once Jina v5 + BGE-M3 + Reader-LM models load + `default_distance_table` mmaps real Jina codebook |
391+
392+
### POLICY-1 + MEMBRANE-GATE-1 — downstream-blocker promotion (MedCareV2 #8)
393+
394+
**State delta:** Both rows already at Stalled / Missing; no maturity
395+
change. **New attached consumer:** MedCareV2 #8 ships C# `AuthClient`
396+
fire-and-forget JWT acquisition. The JWT carries `{token, user_id,
397+
role, display_name}`. medcare-rs cannot gate routes on `role` until
398+
`impl MembraneGate for Arc<rbac::Policy>` lands (POLICY-1 deficit) +
399+
medcare-rs `routes/auth.rs::login` grows the dual-hash branch
400+
(legacy `u_pwd_argon2 = NULL` blocker, separate). **Priority bump:**
401+
POLICY-1 + MEMBRANE-GATE-1 are now blocking a shipped consumer in a
402+
sibling repo, not just internal entropy.
403+
404+
### Section G — Ingestion-vs-Traversal axis (added per sibling-session analysis)
405+
406+
The SoA-DTO graph has two flow modes the original FMA map did not
407+
name. Adding here so future sessions traverse cleanly:
408+
409+
| Mode | Path | Region | State | Replaces neo4j? |
410+
|---|---|---|---|---|
411+
| **Ingestion (Option 1: Cypher-parser)** | OSINT source → `lance-graph::parser::parse_cypher_query` (1,932 LOC nom, 44 tests, REAL) → AST → `RowDelta``BindSpace.apply()` (E1) | R8 → R3 → R0 | Real on lance-graph-side; PARSER-1 stub on planner-side | Yes for pre-baked Cypher data (the 30 aiwar-neo4j-harvest files) |
412+
| **Ingestion (Option 2: splat-deposit)** | OSINT source → witness builder → `CamPlaneSplat::deposit(witness, σ, θ)``RowDelta``BindSpace.apply()` (E1) | R8 → R5 → R0 | SPLAT-1 row entropy 4, Aspirational | Yes for live OSINT (no Cypher upstream) |
413+
| **Traversal (Pillar-6)** | `BindSpace` columns → `EwaSandwich::propagate(&[M], Σ_0)` → SPD-bounded multi-hop → `ShaderHit { row, distance, predicates, resonance, cycle_index }` | R0 → R6 → R3 | Shipped (PR #289), EWA-SANDWICH-1 row Stage 3 | Yes; in-process µs/hop, no network |
414+
415+
**Both ingestion modes converge on the same E1 typed Action API**
416+
they are two `RowDelta` constructors feeding the same commit gate,
417+
not competing architectures. Cypher-parser is the import path
418+
(pre-baked data); splat is the streamfeed path (live OSINT). Both
419+
should ship; SPLAT-1 is the gating deficit for Option 2.
420+
421+
### E8 retraction note
422+
423+
E8 ("geometrically-bounded provenance via Vsa16kF32 + EWA-Sandwich")
424+
is **retracted** — register laziness; provenance is typed-struct /
425+
HashMap / Lance-column work, not VSA-bundled. The Pillar-6 σ-sandwich
426+
bounds **cognitive Markov state propagation**, NOT arbitrary lineage.
427+
Does not get appended to `EPIPHANIES.md`. EWA-SANDWICH-1 row above
428+
captures the corrected scope.
429+
430+
E4 ("VSA-bundled algebraic provenance") is **retracted** for the same
431+
reason. Not appended to `EPIPHANIES.md`.
432+
433+
E1, E2, E3 (with `CognitiveEventRow` as **typed Lance struct, not
434+
VSA**), E5, E6 (storage-as-compute, MetaWord write triggers cognitive
435+
shader read of the row's `Vsa16kF32`, the only place it lives), E7
436+
(Time/Geo as register columns: `timestamp: i64`, `geohash: u64`), E9
437+
(observability-tier vs business-tier) **stand**.
438+
439+
### Lessons-loop: pattern file
440+
441+
Patterns derived from this session captured in `.claude/pattern.md`
442+
(15 patterns + 7 critical findings + update protocol). Future sessions
443+
read pattern.md before traversing the SoA/DTO graph.

0 commit comments

Comments
 (0)