Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .claude/board/LATEST_STATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -450,3 +450,25 @@ PR sequence: #360 → #361 → post-#360 substrate-sweep (this PR).
| PR | Merged | Title | What it added |
|---|---|---|---|
| **#422** | 2026-05-28 | docs(handover): PR #418/#419 review + surreal/mailbox/Baton/SoA-as-BindSpace-surrogate plan map | Read-only synthesis handover. New `.claude/handovers/2026-05-28-1200-pr-418-419-surreal-mailbox-baton-plan-map.md` (~310 LOC, 7 sections): §1 PR #418 review (verdict *sound, merge-ready as a spec* + 3 substantive notes on the bare-columns-vs-hot-thought footprint distinction, `E-RUBICON-RACTOR` as honest post-hoc CONJECTURE, OQ-4 doctrinal gating); §2 the **SurrealDB role correction** (Zone-2 cold store → *view over leading LanceDB*, recorded in `E-RUBICON-RACTOR` + plan §2.7); §3 the plan corpus map (8 plans + 9 epiphanies + `PR-NDARRAY-MIRI-COMPLETE → D-CE64-MB-1-impl → D-MBX-1..6` dep chain + `TD-RESONANCEDTO-DUP-1`); §4 brief #419 review (unrelated to surreal/mailbox; the 14 `NEEDS-INPUT` blockers are the real gate for D-ODOO-SAV-4); §5 navigability meta-finding (the surreal POC docs lack a supersedure pointer); §6 action surface; §7 cross-refs. Board appends: `EPIPHANIES.md` ← `E-SURREAL-POC-UNANNOTATED-SUPERSEDURE` (FINDING / navigability); `AGENT_LOG.md` ← session row. **Zero code change**; 3 files; +310/-0. Branch `claude/lance-graph-ontology-review-Pyry3` → `main`. Merge commit `984512b` on top of `a29946b` (the doc commit, rebased onto post-#421 `main` to resolve the AGENT_LOG append-vs-append conflict by keeping both #421's AXIS-B row and this PR's session row in chronological order). |

---

## 2026-05-28 — Append: PR #425 shipped (deps comment cleanup + [patch.crates-io] ndarray declared intent)

(Per APPEND-ONLY rule: this dated annotation augments the "Recently Shipped PRs" table above. Treat the row below as the new top-of-table entry.)

### Recently Shipped PRs — new top row

| PR | Merged | Title | What it added |
|---|---|---|---|
| **#425** | 2026-05-28 | deps(workspace): clean BLOCKED comments; record 6.0.0→6.0.1 block (lancedb 0.29.0 transitive) | Workspace `Cargo.toml` cleanup + finding. Replaces the stale `BLOCKED-(A)/(B)/(D)` comment block (predates #423's 4→6 / 0.27→0.29 / 52→53 / 57→58 bump) with a dated `RESOLVED(A)/(B)/(D)` record pointing to #423 + the live crate-level pins. Records the user-authorised follow-on patch `lance 6.0.0 → 6.0.1` as **CURRENTLY BLOCKED** by `lancedb 0.29.0`'s transitive `lance = "=6.0.0"` requirement (proof: `cargo check` → `versions that meet the requirements '=6.0.0' are: 6.0.0`; resolution paths: wait for lancedb 0.29.1+, drop strict-=, or `[patch.crates-io]` override). Adds `[patch.crates-io] ndarray = { git = "https://github.com/AdaWorldAPI/ndarray.git", branch = "master" }` per user directive — declared intent; cargo emits `warning: patch ndarray v0.17.2 was not used in the crate graph` because lance-index 6.0.0 pins `ndarray = "0.16.1"` (semver gap, fork at 0.17.2). `Cargo.lock` now contains a `[[patch.unused]]` entry that makes the gap visible at every build. Files `TD-NDARRAY-PATCH-0_16` in `TECH_DEBT.md`. Codex P2 (`59ef97e`) flagged the original false RESOLVED(D) claim; fix in `2e001a5`/`8f3913b`/`1444f78`. Merge commit `1a3abfb8`. |

## 2026-05-28 — Append: PR #427 shipped (bindspace→mailbox migration wave A1-A4)

(Per APPEND-ONLY rule: appended after PR #425's annotation above. Treat the row below as the new top-of-table entry.)

### Recently Shipped PRs — new top row

| PR | Merged | Title | What it added |
|---|---|---|---|
| **#427** | 2026-05-28 | feat(mailbox-soa): bindspace→mailbox migration wave A1-A4 (thoughtspace columns + transitional routing + WitnessTable + plan §10) | First implementation pulse of `bindspace-singleton-to-mailbox-soa-v1` (PR #418 plan). **A1** (`1df12eca`, +103): 4 thoughtspace columns on `MailboxSoA` (`edges`/`qualia`/`meta`/`entity_type`) + 8 row accessors + zero-init in `new()` + reset in `reset_row()`. **A2** (`61b641d5`, +42): transitional `mailboxes: HashMap` + `with_mailbox()` builder + `mailbox()` accessor on `ShaderDriver` — sibling-shape, additive, singleton untouched. **A3** (`ef848a34`, +187): new `WitnessTable` + `WitnessEntry{ mailbox_ref, spo_fact_ref }` primitive in `lance-graph-contract::witness_table` (zero-dep, 3 unit tests, `const fn new`, `get`/`set` bounds-checked). **A4** (`0f448730`, +36): plan §10 "2026-05-28 architectural refinements" appended — 7 ratified findings (SoA-Lance ≠ cascade; cascade is not an index space; 64k-256k mailbox envelope ~360 MB - 1.4 GB RAM-resident; W-slot = per-cohort witness table not corpus pointer; cascade granularities = CPU/cache boundaries 64/256/4096/16384; `simd_soa.rs` introspects per-SoA shape; SoA invariant spawn → commit, two egress modes external/internal) + 2 surviving OQs (OQ-MBX-8 `persisted_row` vs Lance native versioning; OQ-MBX-15′ container scoping granularity). Codex P1 follow-on `f541b280`: widen `WitnessEntry.mailbox_ref` u16 → u32 + correct `Option<u64>` size doc. **457 contract+driver tests passing**, zero new behavioural code outside the columns/builder/primitive. Singleton `Arc<BindSpace>` NOT removed (sibling pattern); cutover in a downstream slice (D-MBX-3/4). Merge commit `84296118`. Author session — this governance row is the post-merge close-out; per-deliverable AGENT_LOG entries D-MBX-A1..A4 already prepended at branch HEAD pre-merge. |
66 changes: 66 additions & 0 deletions .claude/board/PR_ARC_INVENTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2010,3 +2010,69 @@ Removes `crate-ci/typos` spell-check job from `style.yml`; `cargo fmt --check` r
- `AGENT_LOG.md` session row (appended).

**Confidence (2026-05-28):** working — docs-only; merge clean (rebased onto post-#421 main; `EPIPHANIES.md` auto-merged; `AGENT_LOG.md` conflict resolved by keeping both entries chronologically; force-with-lease push). Merge commit `984512b`. No CI gates relevant.

---

## PR #425 — deps(workspace): clean BLOCKED comments; record 6.0.0→6.0.1 block (lancedb 0.29.0 transitive) (MERGED 2026-05-28 → main)

(Per APPEND-ONLY mechanic: appended at file-end; the rule-#1 PREPEND convention is preserved by the dated framing — treat as new top-of-arc entry.)

**Status:** MERGED. Branch `claude/lance-graph-ontology-review-Pyry3` → `main`. 4 commits (`59ef97e` initial → `2e001a5` codex P2 correction → `8f3913b` patch added → `1444f78` Cargo.lock regen) + merge commit `1a3abfb8`. Cargo.toml + Cargo.lock + TECH_DEBT.md only; no `.rs` / `build.rs` / `data/` touched.

**Added:**
- `Cargo.toml` deps-comment block rewrite: BLOCKED-(A)/(B)/(D) → dated RESOLVED record pointing at #423 + live crate-level pins. Records the user-authorised follow-on patch `lance 6.0.0 → 6.0.1` as CURRENTLY BLOCKED with named resolution paths.
- `[patch.crates-io] ndarray = { git = "https://github.com/AdaWorldAPI/ndarray.git", branch = "master" }` (declared intent).
- `Cargo.lock` regenerated — now includes `[[patch.unused]] ndarray 0.17.2 (git+...?branch=master#0129b5c8)` entry surfacing the semver gap at every build.
- `TECH_DEBT.md` ← `TD-NDARRAY-PATCH-0_16` tracking the lance-index `=0.16.1` vs fork `0.17.2` gap with three resolution paths.

**Locked:**
- **The `lance 6.0.1` patch is blocked at the dep-graph level**, not the doctrinal level. `lancedb 0.29.0` (latest 0.29.x on crates.io) transitively pins `lance = "=6.0.0"`. Re-bump when lancedb 0.29.1+ ships.
- **`[patch.crates-io] ndarray` is declared intent, not effective.** The fork at `0.17.2` cannot semver-satisfy lance-index `0.16.1`. Cargo emits "patch unused" warning at every build — the gap is now actively visible rather than silently misrepresented.
- **No crate-level pin changed in this PR** — pins stayed at #423's `=6.0.0` / `=0.29.0` / `"53"` / `"58"` state.

**Deferred:**
- `lance 6.0.1` re-bump (gated on lancedb 0.29.1+ or doctrine change).
- A `0.16.x`-versioned branch on AdaWorldAPI/ndarray with the fork patches forward-ported (the cleanest way to actually wire the transitive through the fork).

**Docs:**
- `Cargo.toml` deps-comment block (RESOLVED(A)/(B)/(D) + STILL-OPEN(C) + 6.0.1-block-record + `[patch.crates-io]` doc).
- `TECH_DEBT.md` `TD-NDARRAY-PATCH-0_16` (full reasoning + resolution paths).

**Confidence (2026-05-28):** working — `cargo check -p lance-graph-ontology` exits 0 in 37s with only pre-existing oxrdf deprecation warnings + the (intended) "patch ndarray unused" warning. Codex P2 on the original commit (`59ef97e`) flagged the false RESOLVED(D) claim; addressed by the three follow-on commits before merge.

---

## PR #427 — feat(mailbox-soa): bindspace→mailbox migration wave A1-A4 (MERGED 2026-05-28 → main)

(Per APPEND-ONLY mechanic: appended at file-end; the rule-#1 PREPEND convention is preserved by the dated framing — treat as new top-of-arc entry. Governance written by a peer session, not the authoring session — fills the LATEST_STATE/PR_ARC gap left by the merge wave.)

**Status:** MERGED. Branch `claude/lance-surrealdb-analysis-LXmug` → `main`. 5 slice commits (A1 `1df12eca` + A2 `61b641d5` + A3 `ef848a34` + A4 `0f448730` + review pass `68328878`) + codex P1 follow-on `f541b280` (widen `mailbox_ref` u16 → u32) + merge commit `84296118`. **457 contract+driver tests green** at merge time.

**Added (the four slices, plus codex fix):**
- **A1 — thoughtspace columns on `MailboxSoA`**: `edges: [CausalEdge64; N]` + `qualia: [QualiaI4_16D; N]` + `meta: [MetaWord; N]` + `entity_type: [u16; N]`; 8 row accessors (`edge`/`set_edge`/`qualia`/`set_qualia`/`meta`/`set_meta`/`entity_type`/`set_entity_type`); zero-init in `new()`; reset in `reset_row()`. **The migrated thoughtspace columns are now available on each mailbox** — the surface that the singleton dissolution downstream will read/write.
- **A2 — transitional `ShaderDriver.mailboxes: HashMap<MailboxId, MailboxSoA<N>>`**: sibling-shape (the `Arc<BindSpace>` singleton stays); `with_mailbox()` builder + `mailbox()` read accessor. Additive only.
- **A3 — `lance-graph-contract::witness_table`**: new `WitnessTable<N>` + `WitnessEntry { mailbox_ref: u32, spo_fact_ref: Option<u64> }` primitive; `const fn new()`; bounds-checked `get`/`set`; 3 unit tests; zero-dep. (Codex P1 `f541b280` widened `mailbox_ref` u16 → u32 and corrected the `Option<u64>` size doc.)
- **A4 — plan §10 architectural refinements** appended to `.claude/plans/bindspace-singleton-to-mailbox-soa-v1.md`: 7 ratified findings + 2 surviving OQs (see Locked).

**Locked (architectural rulings ratified in plan §10):**
1. **SoA Lance container ≠ cascade.** Cascade is resolution-laddered superposition; the SoA Lance container is the materialised data substrate. 1 cascade : N SoA containers via top-k emission.
2. **Cascade is NOT an index space.** `64² / 256² / 4096² / 16384²` are per-axis granularities (causal / palette / COCA codebook / outcome), superposed and streamed like x265 cascaded prediction levels.
3. **64k-256k mailbox envelope** (~360 MB - 1.4 GB total). Whole population RAM-resident; no tier split; no eviction policy needed.
4. **W-slot resolves into a per-cohort witness table** of `(mailbox_ref, spo_fact_ref)` entries — NOT a witness-corpus pointer. AriGraph today is a transcode; the chaining engine is the target shape.
5. **Cascade granularities are CPU/cache boundaries** — 64 = AVX-512 / cache line; 256 = AMX tile; 4096 = page; 16384 = L1d.
6. **`ndarray::simd_soa.rs` is the SoA dispatch framework** — introspects per-SoA shape; migration is positional, not structural.
7. **SoA invariant spawn → commit.** Two egress modes: external (REST / sea-orm SQL, backpressure expected) or internal (SurrealDB → LanceDB | RocksDB, no backpressure). No marshalling at any boundary.

**Deferred (surviving OQs and scope discipline):**
- **OQ-MBX-8** — `persisted_row` stub vs Lance native versioning (load-bearing; evidence at `REFACTOR_NOTES.md:129` + `driver.rs:458`).
- **OQ-MBX-15′** — container scoping: per-cognitive-cycle, per-shader-dispatch, or per-mailbox-cohort?
- **Singleton `Arc<BindSpace>` dissolution** — A2 is a *sibling* surface only; the cutover ships in a later slice (D-MBX-3/4 per the plan).
- **`WitnessTable` wiring into `CausalEdge64` emission paths** — A3 declares the primitive only; consumer wiring is downstream.
- **Consumer crate touches** — planner / ontology / surreal_container untouched in this wave.

**Docs:**
- `.claude/plans/bindspace-singleton-to-mailbox-soa-v1.md` §10 appended (7 findings + 2 OQs).
- AGENT_LOG entries D-MBX-A1..A4 prepended at branch HEAD pre-merge.
- LATEST_STATE Current Contract Inventory annotated with `WitnessTable` + `MailboxSoA` additions.

**Confidence (2026-05-28):** working — `cargo check -p cognitive-shader-driver -p lance-graph-contract` clean (only pre-existing ontology deprecation warnings); `cargo test -p cognitive-shader-driver -p lance-graph-contract --lib` 457 passed / 0 failed at merge time. Codex P1 (`f541b280`) addressed before merge. No consumer surfaces touched.