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
14 changes: 14 additions & 0 deletions .claude/board/AGENT_LOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## 2026-10-16 — 5+3 council: WCOJ closing atoms (premise + 5 savants + 3 reviewers)

- Premise auditor: PREMISE-SPLIT (Part B is an EXISTS, not a comparison).
- Savants on Sonnet: prior art, iron rules, code truth, cascade impact, different views. Spot checks on the main thread: `reference.rs:372-405` (validate's `if let` and `_ => {}`), `quack/lib.rs:575-615` (`if let Filter::Semijoin`, one-mask `leaf_validity`), `value.rs:178-188`, the two non-AVX-512 `gather` sites, `ISSUES.md` accumulator-gate entry. All held.
- Reviewers: overclaim, dilution/collapse, firewall. Three BLOCKs (inverted G5 polarity, visited-only order check, partial sink on refusal), all resolved in v3.
- Misses: three savants could not write their tag-files (no write tool); reports were taken from their hand-backs. S3 found that gate fixtures F2/F3a/F3b named in v1 did not exist.
- Result: `.claude/plans/wcoj-closing-atoms-v1.md`, entry `2026-10-16-wcoj-closing-atoms-council.md`. Written by the orchestrating main thread only.

## 2026-10-16 — WCOJ items 1–3: DuckDB and bind harvest (three Haiku runs)

- harvest-scout (as general-purpose on Haiku) over a DuckDB source clone at `e1ecb5b8`: 10 patterns, per-pattern counts. Spot checks: `physical_asof_join.cpp:1182`, `delim_join_cte_rewriter.cpp:1172` and `query_graph_manager.cpp:399` re-read. All three matched. No conclusion drawn.
- Web scout (general-purpose on Haiku): 12 items with read grades; most were ABSTRACT-ONLY or SECONDHAND and are recorded as leads only.
- substrate-mapper over `lance-graph-sap` (7 files, 96 rows). Spot checks: `binder.rs` and `bind.rs:1-140` re-read in full. The `Binder` trait was read at `lance-graph-quack/src/bind.rs:92`. No misses.
- Result: entry `2026-10-16-wcoj-probes-1-3.md`. Written by the orchestrating main thread only.
## 2026-10-16 — /coresearch: worst-case-optimal joins for the join path (D-ASM-11)

- Phase 0: brief by the orchestrator; premise-auditor → PREMISE-SPLIT (semijoin chain = existence mask, leapfrog = bindings); re-asked as Q-E / Q-A.
Expand Down
16 changes: 16 additions & 0 deletions .claude/board/INTEGRATION_PLANS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 2026-10-16 (3) — wcoj-closing-atoms-v1 — the exact cyclic existence mask: two closing atoms → `.claude/plans/wcoj-closing-atoms-v1.md`

**Status:** RATIFIED SPEC (5+3 council); not authorized. D-ASM-11A, D-ASM-11B.

- Part A `Pred::EqU32ViaLane`: comparison through an address lane, three-valued, O(1) per row; functional relations.
- Part B `MaskOp::RunsMeet`: EXISTS over two sorted runs, gated beside `Gather`, Semijoin's NULL rule, order checked at validate; n:m relations.
- Council record: entry `2026-10-16-wcoj-closing-atoms-council.md`.

## 2026-10-16 (2) — quack-multitable-bind-v1 — one bind path for joins, shared by MeTTa bodies and SAP → `.claude/plans/quack-multitable-bind-v1.md`

**Status:** PROPOSAL; nothing built. D-QMB-0..5.

- `Binder` gains a default `addresses(table, field)`; `Draft::via(field)` scopes predicates to the addressed table; `bind_joined` returns the `Query` plus the `Foreign` slot layout it assumes.
- Every hop conjoins the target's live plane as a `Semijoin`, so a deleted or dangling target is a known FALSE.
- v1 binds `=` on coded foreign fields only; `<>`, `I32` and optional foreign fields are refused until pinned; cyclic and n:m bodies wait for the council-p7 predicates.

## 2026-10-16 — d-holo-h14d-logic-mask-read-v1 — C's own operation: logic → address mask → masked read → terminal → `.claude/plans/d-holo-h14d-logic-mask-read-v1.md`

**Status:** PRE-REGISTERED; not run.
Expand Down
8 changes: 6 additions & 2 deletions .claude/board/LATEST_STATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
## 2026-10-16 — main after #1584
## 2026-10-16 — WCOJ map items 1–3 run (branch `ccr-9f3b8075-74u47l-wcoj-probes`, in PR)

Contract inventory delta: `ordered_lane::gallop_partition_point` (cursor seek, galloping), `ordered_lane::seek_partition_point` + `SEEK_LINEAR_GAP` (hybrid by gap hint, thresholds from v4 timings) and `SealedFacetLane::seek_from` (witnessed). Outside the contract: `lance-graph-relalg::join_body::is_alpha_acyclic` (GYO) and `lance-graph-metta/examples/wcoj_probe.rs` (F4 fixture, bag oracle, P-7 check). Results: entry `2026-10-16-wcoj-probes-1-3.md`.

## 2026-10-16 — main after #1584, #1585, #1586

- **On `main` (#1584):** D-ASM-1b and D-ASM-8..11 queued; entry `2026-10-16-asm-accepted-proposals.md`. Nothing built.
- **In this PR:** D-ASM-12 (the `lance-graph-cog` content → NodeGuid address that `atomspace-lance` and the D-ASM-1b binder share); D-ASM-13 (the `lance-graph-cog` thinking API as a facade over NAL / ONA-shaped tables / R2IL / relalg); the forks `matrix` and `atomspace-storage` recorded; the MORK stable branch recorded.
- **#1586 (merged):** D-ASM-12 (the `lance-graph-cog` content → NodeGuid address that `atomspace-lance` and the D-ASM-1b binder share); D-ASM-13 (the `lance-graph-cog` thinking API as a facade over NAL / ONA-shaped tables / R2IL / relalg); the forks `matrix` and `atomspace-storage` recorded; the MORK stable branch recorded.

## 2026-10-16 — main after #1582 (merged `e08e5659`)

Expand Down
14 changes: 14 additions & 0 deletions .claude/board/PR_ARC_INVENTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## 2026-10-16 — lance-graph PR #1586 (merged `f2892f98`, branch `ccr-9f3b8075-74u47l-coresearch-wcoj`, head `2284376a`, 1 commit) — board: co-research map for worst-case-optimal joins (D-ASM-11)

- **Added:** entry `2026-10-16-coresearch-wcoj-leapfrog.md` (leapfrog family mapped onto our surfaces, ADOPT-NOW / PROBE / PARK / SKIP per idea, fixtures F2/F3a/F3b/F4, probes P-1..P-12).
- **Locked:** none; the map ratifies nothing.
- **Deferred / open:** items 1-3 run in #1587; closing atoms specified in `.claude/plans/wcoj-closing-atoms-v1.md`.
- **Confidence:** n/a (board).

## 2026-10-16 — lance-graph PR #1585 (merged `9252e5cf`, branch `ccr-9f3b8075-74u47l-asm-queue-2`, head `4399cb72`, 3 commits) — board: `lance-graph-cog` address + thinking API (D-ASM-12/13), leapfrog arms

- **Added:** STATUS D-ASM-12 (content → NodeGuid atom address in `lance-graph-cog`), D-ASM-13 (thinking API as a facade over NAL / ONA-shaped tables / R2IL / relalg); D-ASM-11 split into Q-E / Q-A with arms A and B; the #1584 arc entry.
- **Locked:** the thinking API adds no opcode, interpreter or executor; leapfrog is prior art to learn from, decided by measurement.
- **Deferred / open:** all rows Queued; `lance-graph-cog` not created.
- **Confidence:** n/a (board).

## 2026-10-16 — lance-graph PR #1584 (merged, branch `ccr-9f3b8075-74u47l-asm-queue`, head `018be049`, 1 commit) — board: queue the accepted D-ASM follow-ups (D-ASM-1b, 8–11)

- **Added:** STATUS D-ASM-1b (Atomese front end in the binder), D-ASM-8 (learn measures), D-ASM-9 (`lance-graph-das` probe), D-ASM-10 (MORK oracle), D-ASM-11 (leapfrog probe); entry `2026-10-16-asm-accepted-proposals.md`.
Expand Down
17 changes: 16 additions & 1 deletion .claude/board/STATUS_BOARD.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## D-QMB — multi-table bind for Quack (2026-10-16)

Plan: `.claude/plans/quack-multitable-bind-v1.md`. Shared by D-ASM-1/11 and SAP joins.

| D-id | scope | status | gate / falsifier |
|---|---|---|---|
| **D-QMB-0** | tests first: two-table draft == expert query + slot layout; binder call count; nested-loop oracle incl. dangling and deleted targets | Queued (not authorized) | disable: drop the live `Semijoin` → deleted target kept (red); skip slot dedup (red) |
| **D-QMB-1** | `Binder::addresses` (default), `Draft::via`, `Bound`, `bind_joined`, `BindError::{NotAnAddress, Unsupported}` | Queued (not authorized) | the four existing `Binder` implementers compile unchanged |
| **D-QMB-2** | SAP: CATS hours through a functional employee assignment | Queued (not authorized) | answer == the SAP fixture's expected rows |
| **D-QMB-3** | MeTTa: two-atom acyclic body through `via` | Queued (not authorized) | answer == datafrog SET |
| **D-QMB-4** | nested `via` chains in one program | Queued (not authorized) | check the #1521/#1522 withdrawal first |
| **D-QMB-5** | cyclic bodies and n:m relations | Queued (gated on the council-p7 predicates) | answer == datafrog SET on F2/F3a/F3b/F4 |

## D-WAL — `LanceCycleWriter` vs the lancedb 0.40 MemWAL write path (2026-10-14)

Plan: `.claude/plans/wal-shootout-v1.md`. Feeds D-LNC-7; decides nothing.
Expand Down Expand Up @@ -31,7 +44,9 @@ Council 2026-10-16: `metta-datalog-assimilation-v1-council-v3.md` is the ratifie
| **D-ASM-8** | `learn`-shaped measures (marginals, MI/PMI, cosine, Jaccard) as a reading of pair counts in `lance-graph-arm-discovery`; counts from D-ASM-3, never a loop; no `lance-graph-learn` crate (entry `2026-10-16-asm-accepted-proposals.md`) | Queued (not authorized; gated on D-ASM-3) | measures == an oracle run of upstream `learn` on one corpus; `(opencog matrix)` definitions sourced first |
| **D-ASM-9** | `lance-graph-das` attention-broker probe: `w = edge.count / node.count`, rent, spread over the D-ASM-2 hop | Queued (not authorized; gated on D-ASM-2; crate not created) | attention values == DAS broker on one fixture; crate created only when the probe runs |
| **D-ASM-10** | MORK as fourth oracle (Hyperon · PeTTa · datafrog · MORK), built as a separate binary outside the workspace, results only | Queued (not authorized) | MORK answers recorded beside the other three, divergences recorded, never averaged |
| **D-ASM-11** | Leapfrog probe on a cyclic 3-way join, split into Q-E (exact existence mask where the semijoin chain over-approximates) and Q-A (binding enumeration emitting keyed counts, D-ASM-3's missing carrier), written from the paper (Veldhuizen, *Leapfrog Triejoin*, arXiv 1210.0481v5, ICDT '14); the zipper shape is the probe's question, not a premise — arm A: leapfrog triejoin over the existing sealed ordered lanes, with aperture depth as `open`/`up` and a galloping `seek` from the cursor (the paper's amortized O(1 + log(N/m)); today's `bound_aperture` is a fresh `partition_point`); cleanest, already integrated; arm B: leapfrog triejoin over a prefix-shared trie zipper (PathMap-like), studied as prior art to learn from (worst-case optimal on cyclic joins, which a semijoin chain is not); the arm that wins on cost per element and integration is adopted, and what B teaches (variable order, prefix sharing, seek pattern) is carried into A either way | Queued (not authorized; gated on D-ASM-2) | Q-E: mask == datafrog's SET of head rows; Q-A: == datafrog as a BAG; per-element cost on the v4 arm only; margin and lessons pre-registered before the run; findings from B recorded even when A wins |
| **D-ASM-11** | Leapfrog probe on a cyclic 3-way join, split into Q-E (exact existence mask where the semijoin chain over-approximates) and Q-A (binding enumeration emitting keyed counts, D-ASM-3's missing carrier), written from the paper (Veldhuizen, *Leapfrog Triejoin*, arXiv 1210.0481v5, ICDT '14); the zipper shape is the probe's question, not a premise — arm A: leapfrog triejoin over the existing sealed ordered lanes, with aperture depth as `open`/`up` and a galloping `seek` from the cursor (the paper's amortized O(1 + log(N/m)); today's `bound_aperture` is a fresh `partition_point`); cleanest, already integrated; arm B: leapfrog triejoin over a prefix-shared trie zipper (PathMap-like), studied as prior art to learn from (worst-case optimal on cyclic joins, which a semijoin chain is not); the arm that wins on cost per element and integration is adopted, and what B teaches (variable order, prefix sharing, seek pattern) is carried into A either way | Queued (not authorized; gated on D-ASM-2). Pre-work in #1587: F4 fixture, bag oracle, `seek_from` (P-1), GYO (P-3), P-7 insufficiency shown (entry `2026-10-16-wcoj-probes-1-3.md`); closing atoms split into D-ASM-11A/B | Q-E: mask == datafrog's SET of head rows; Q-A: == datafrog as a BAG; per-element cost on the v4 arm only; margin and lessons pre-registered before the run; findings from B recorded even when A wins |
| **D-ASM-11A** | Closing atom for functional relations: `Pred::EqU32ViaLane` + ndarray `eq_u32_via_lane_to_mask` (spec `.claude/plans/wcoj-closing-atoms-v1.md` §2) | Spec ratified 2026-10-16; authorized 2026-10-16 (ungated from D-ASM-2) | G1 exact mask == datafrog; G2 op count fixed and < the disjunction; G5-A disables |
| **D-ASM-11B** | Closing atom for n:m relations: `MaskOp::RunsMeet` (gated, beside `Gather`) + ndarray `runs_meet_under_to_mask` + lgj-abi status arm (spec §3) | Spec ratified 2026-10-16; authorized 2026-10-16, after D-ASM-11A | G0 fixtures; G3 edge oracle + projection; G4 elements-touched slope 1.5 ± 0.1; G5-B disables |
| **D-ASM-12** | `lance-graph-cog`: deterministic content → NodeGuid atom address, shared by the D-ASM-1b binder and the `atomspace-lance` StorageNode adapter (which calls it); replaces the Rocks `n@`/`l@`/`a@`/`h@` indexes | Queued (not authorized; crate not created) | same content → same address from both callers; no string or hash index reachable from a row; adapter carries no layout of its own |
| **D-ASM-13** | `lance-graph-cog` thinking API for OpenCog callers: a facade over existing algebra only — NAL (`lance-graph-nal`, global core methods), ONA-shaped term table + rule catalogue (D-ASM-5/6), R2IL procedures, relalg IR, all lowering to mask-risc | Queued (not authorized; gated on D-ASM-5/6 and D-ASM-12) | answers == OpenCog (PLN / ONA) on the same inputs, run outside the workspace; no new opcode, interpreter or executor (guard: every entry point resolves to an existing NAL/R2IL/relalg call) |

Expand Down
10 changes: 10 additions & 0 deletions .claude/board/TECH_DEBT.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## TD-NO-BOUNDED-U32-GATHER-1 (2026-10-16) — OPEN

`eq_u32_via_to_mask` and the planned `eq_u32_via_lane_to_mask` are scalar. An
`unsafe`, unbounded f32 gather exists on several ndarray backends
(`simd_avx512.rs:236-246`, `simd_avx2.rs:703`, `simd_scalar.rs:1099`), but no
bounds-masked u32 gather-and-compare wrapper does, and the out-of-range-is-false
contract needs one. Whether it pays on random access is unmeasured. Payoff: a
W1a wrapper plus a v4 per-element measurement against the scalar kernel.
Source: `.claude/plans/wcoj-closing-atoms-v1.md` §2.

## TD-KEYED-SINK-MERGE-IDENTITY-1 (2026-10-05) — OPEN

**Equal length is not semantic compatibility.** `Terminal::merge_group_sink`
Expand Down
39 changes: 39 additions & 0 deletions .claude/board/entries/2026-10-16-wcoj-closing-atoms-council.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 2026-10-16 — WCOJ closing atoms: 5+3 council record

**Status:** RATIFIED SPEC (`.claude/plans/wcoj-closing-atoms-v1.md`); not
authorized to build. Follows the P-7 insufficiency in
`2026-10-16-wcoj-probes-1-3.md`.

## Outcome

- **Part A, `Pred::EqU32ViaLane { fk, key, lane }`**: `EqU32Via` with the
constant replaced by the row's own lane. Comparison family, three-valued,
O(1) per row. Closes a cyclic body over functional relations.
- **Part B, `MaskOp::RunsMeet { .. }`**: for each row of R-edges, do two sorted
runs share a value. EXISTS family, beside `Gather{under}`, Semijoin's NULL
rule. Closes a cyclic body over n:m relations; elements touched ≤ N^1.5 [H].
- The two answer different questions over different head populations (node
rows vs R-edge rows); they coincide only when R is functional.

## What changed between rounds

| round | finding | consequence |
|---|---|---|
| premise | PREMISE-SPLIT: Part B is an EXISTS over a set, not a comparison | split into Q-A / Q-B; Part B gets Semijoin's NULL rule and a gated execution |
| S1 | no prior ruling; planner `AdjacencyBatch::intersect` and `WcoJoin` are stale parallels | not reused |
| S2 | `if let Filter::Semijoin` (`quack/lib.rs:584`) would misroute a new EXISTS leaf under `NOT` | becomes `matches!` over both |
| S3 | F2/F3a/F3b fixtures do not exist yet; the ndarray "no gather" doc is overstated | G0 writes them; sibling doc corrected |
| S4 | exhaustive `ExecError` match in lgj-abi; Pred `_under` absent in the Via family | Part B is a `MaskOp`; new error variant paired with lgj-abi |
| S5 | re-anchoring does not remove Part B; k-way is not AND of 2-way | decisions 10, 11 |
| R1, R2 | G5 NULL-under-`NOT` polarity was inverted | fixed: a NULL key is KEPT under `NOT` |
| R1 | visited-only order check made Ok/Err depend on the gate | complete check at validate |
| R1 | quack gates `RunsMeet` on the first resident plane, not all earlier conjuncts | stated; no "rejected rows do no work" claim |
| R1 | G3 compared R-edge rows with head rows `a`; G2 could not fail; G4 metric changed | edge-level oracle + projection; G2 vs the disjunction; G4 on elements touched |
| R3 | a refusal inside the tile loop leaves a partly written sink | order invariant checked before any tile; `ForeignLaneNotOrdered` |

## OPEN

- Authorization of D-ASM-11 (still gated on D-ASM-2).
- Part B's insufficiency is argued, not measured; G0 measures it.
- The sealed CSR witness that removes the per-execution O(|S| + |T|) check.
- A bounds-masked u32 gather backend for Part A (TECH_DEBT).
Loading
Loading