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
6 changes: 6 additions & 0 deletions .claude/board/AGENT_LOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 2026-10-14 — D-MTP-0 harvest: six substrate-mapper runs, one reply each

- Card `substrate-mapper` (run as a general-purpose agent with the card pasted; the card is not registered in this session), six units: `hyperon-atom`, `hyperon-space`, the minimal-MeTTa interpreter, the grounded stdlib, lance-graph `nal`/`r2il`/`relalg`, `quack`.
- Ledger: spot-checks `Space::query` L175, `complex_query` L340, `GroundingSpace` L17, interpreter dispatch L417/L453, `query` L604, `FoldDialect` L260 — all correct; 0 wrong. 1 missed: no map recorded that `ModuleSpace` splits conjunctions and requires `ModuleSpace` dependencies (`space/module.rs:33-48`); the orchestrator found it by reading the file in full.
- Cost: about 515k–646k subagent tokens per run. No conclusion came from a card.

## 2026-10-14 — D-HOLO H6b harvest: four substrate-mapper runs, one reply each

- Card `substrate-mapper`, four units: `holo_interval_probe.rs` (H6), mask-risc exec, mask-risc IR, ndarray `simd` mask re-exports.
Expand Down
8 changes: 8 additions & 0 deletions .claude/board/INTEGRATION_PLANS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 2026-10-14 (2) — metta-polyfill-v1 — Hyperon/MeTTa as a front end over the masking-algebra polyfill → `.claude/plans/metta-polyfill-v1.md`

**Status:** PROPOSAL; D-MTP-0 (map + measurements), D-MTP-1 (join probe, measured), D-MTP-1b (range hop, measured) and D-MTP-6 (datafrog oracle) done; D-MTP-2..5 not authorized.

- MeTTa is a declaration IR, not an execution IR: the Datalog subset lowers through `lance-graph-relalg` → R2IL → mask-risc; everything else stays in Hyperon's interpreter.
- Seam: a named `LanceSpace` implementing `hyperon_space::Space`; `ModuleSpace` splits conjunctions, so `&self` is not the seam.
- Measured PeTTa (SWI-Prolog) near-linear, Hyperon superlinear (anc_800: 0.42 s vs 417 s); new trie panic at ≥ 1,024 children.

## 2026-10-14 — d-holo-address-indexed-algebra-v1 — falsifiers H1, H5, H6 for the address-indexed algebra → `.claude/plans/d-holo-address-indexed-algebra-v1.md`

**Status:** PRE-REGISTERED; nothing measured.
Expand Down
15 changes: 15 additions & 0 deletions .claude/board/STATUS_BOARD.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## D-MTP — Hyperon/MeTTa over the masking-algebra polyfill (2026-10-14)

Plan: `.claude/plans/metta-polyfill-v1.md`. Proposed crate `lance-graph-metta` (not created).

| D-id | scope | status | gate / falsifier |
|---|---|---|---|
| **D-MTP-0** | Adoption map, MeTTa-as-IR verdict, PeTTa vs Hyperon measurements, trie panic ≥ 1,024 children | Done 2026-10-14 (entry `2026-10-14-metta-polyfill-map.md`) | — |
| **D-MTP-1** | Two-hop join lowered by hand through Quack `Semijoin` (relalg has no hop), n = 10²..10⁶, v4 | Measured 2026-10-14: pairs == datafrog at every n, counts == Hyperon/PeTTa; at 10⁶ emit 4.0–5.7 ns/pair vs datafrog 59–71 (7.2–9.6× with ingest charged per emitted pair); count 1.2–1.8 ns/row, the random `Gather` read, not sub-ns as expected | == oracles; two disable runs red as pre-registered |
| **D-MTP-1b** | The hop as a range: preimage of `valid`'s runs under a monotone `dst` vs the gather, clustered and scattered | Measured (§6d): R-declared count 0.0001–0.0004 ns/row vs gather 1.3–2.4 at 10⁶ | == datafrog; two disable runs red; costs reported |
| **D-MTP-2** | `LanceSpace` (`Space + SpaceMut`) as a named space for the non-recursive Datalog subset; golden corpus rerun | Queued (not authorized) | 32/33 golden files still pass; refusals named; whole-conjunction vs per-conjunct calls recorded |
| **D-MTP-3** | Recursive Datalog rules → relalg μ through the external driver d′ | Queued (not authorized) | `anc_n` answers identical; no fixpoint state in mask-risc |
| **D-MTP-4** | Fork fix for the expression-width trie panic (≥ 1,024 children), test first; distinct from the id-decoding fix `1ffdbd6` | Queued (needs operator's word) | red before, green after |
| **D-MTP-6** | datafrog as the exact Rust oracle (probe/test only) | Measured 2026-10-14 (v4): join 10⁶ in 65–69 ns/pair, seeded ancestors 10⁶ in 286–298 ns/tuple; counts match; not yet a committed probe | bag-of-pairs equality with Hyperon and PeTTa |
| **D-MTP-5** | PeTTa as second oracle in the probes | Queued (not authorized) | PeTTa/Hyperon divergences recorded, never averaged |

## D-RA — Relational algebra over coordinate populations, a D-CMR prototype (2026-10-13)

Plan: `.claude/plans/relalg-v1.md`. Crate: `crates/lance-graph-relalg` (own workspace root, excluded). Prototype for D-CMR-6 rules over residual comparisons and a lowering through R2IL.
Expand Down
20 changes: 20 additions & 0 deletions .claude/board/entries/2026-10-14-d-mtp-1-join.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 2026-10-14 — D-MTP-1 — the MeTTa two-hop join through Quack Semijoin (measured)

**Status:** MEASURED (v4, `avx512f=true`, release, best of 5, three runs). Plan
`.claude/plans/metta-polyfill-v1.md` §6a (pre-registration) and §6b (results). Probe
`crates/lance-graph-metta/examples/join_probe.rs`.

**Outcome:**
- `(match &kb (, (parent $x $y) (parent $y $z)) ($x $z))` lowers to
`Plane(valid) AND Semijoin { fk: dst, foreign: valid }` → one mask-risc program
(`Gather`); pairs are emitted only over the kept bits. `lance-graph-relalg` has no hop,
so the plan's "through relalg" was corrected to Quack.
- Pairs == datafrog (fork) at n = 10²..10⁶ on a total (F1) and a partial (F2) relation;
counts == Hyperon and PeTTa. Two disable runs red exactly as pre-registered.
- At 10⁶: emission 4.0–5.7 ns/pair against datafrog 59–71 ns/pair; with ingest charged
per emitted pair, 6.5–7.1 ns (F1) and 8.6–9.2 ns (F2, 666,666 facts for 476,190 pairs). The folded count is 1.2–1.8 ns/row, not the sub-nanosecond the plan
expected: the cost is the dependent random read of the gather, not the mask algebra.

**Open:** a layout where the hop is a coordinate range (no per-row gather); one-to-many
relations; recursion (D-MTP-3); the `Space` adapter (D-MTP-2); symbol → address
resolution cost.
19 changes: 19 additions & 0 deletions .claude/board/entries/2026-10-14-d-mtp-1b-range-hop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 2026-10-14 — D-MTP-1b — the hop as a range (measured)

**Status:** MEASURED (v4, `avx512f=true`, release, best of 5, three runs). Plan
`.claude/plans/metta-polyfill-v1.md` §6c (pre-registration) and §6d (results). Probe
`crates/lance-graph-metta/examples/join_range_probe.rs`.

**Outcome:**
- With `dst` non-decreasing over rows (checked once at ingest), the two-hop join's kept rows
are `valid`'s runs intersected with their preimages under `dst` (`partition_point`).
Pairs == datafrog on a BFS tree (F3), the same tree with every third level removed (F4)
and both under a random address permutation; the range path refuses the permuted lane.
- At 10⁶ the count costs 0.0001–0.0004 ns/row with runs recorded at ingest (O(runs·log n),
0.1–0.4 µs total) and 0.04–0.05 ns/row when the runs are scanned from the plane, against
1.3–2.4 ns/row for the gather program on the same data. Pair emission is 1.2–2.0 ns/pair.
- Clustering alone (same gather, local reads) saves only 11–36 %; the win comes from the
hop being a range, not from locality.

**Open:** the order witness is probe-local (the contract's `OrderedLaneWitness` covers sealed
facet lanes only); a chained range for the second hop; scattered layouts keep the gather.
29 changes: 29 additions & 0 deletions .claude/board/entries/2026-10-14-metta-polyfill-map.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 2026-10-14 — D-MTP-0 — where Hyperon/MeTTa attaches to the masking-algebra polyfill

**Status:** MEASURED (engine comparison, v4 host, single whole-run timings) + VERIFIED-IN-CODE
(Hyperon fork `1ffdbd6`). Plan `.claude/plans/metta-polyfill-v1.md`. No crate, no code.

**Outcome:**
- MeTTa works as a declaration IR (rules, facts, queries as typed S-expressions, names resolved
once to addresses), not as the execution IR. Execution: MeTTa Datalog subset → `lance-graph-relalg`
→ R2IL `FoldDialect` → mask-risc. Term construction, bags, grounded ops, types and state stay in
Hyperon's unchanged interpreter.
- Seam: `hyperon_space::Space::query` (`hyperon-space/src/lib.rs:175`). A space queried directly by
`match` gets the whole `(, …)` pattern (`stdlib/core.rs:163`); `ModuleSpace` splits it into single
conjuncts first and panics on a non-`ModuleSpace` dependency (`space/module.rs:33-48`). So the
adapter is a named space, never `&self` or a module dependency.
- Measured, same generated programs: two-hop join PeTTa 0.29 / 0.41 / 1.47 s vs Hyperon 0.11 / 5.9 s /
panic at n = 10² / 10³ / 10⁴; recursive ancestor PeTTa 0.29 / 0.33 / 0.42 s vs Hyperon
0.28 / 7.4 / 417 s at n = 50 / 200 / 800. Answers correct wherever an engine finished.
- New panic, separate from the id-decoding fix already on the fork (`1ffdbd6`, branch
`fix-trie-key-value`, on which these runs were taken): an expression with ≥ 1,024 children passed to a MeTTa function aborts in
`TrieKey::start_expr` (`hyperon-space/src/index/trie.rs:539`, `TK_MAX_EXPRESSION_SIZE = 1 << 10`);
1,023 children works. This stopped the n = 10⁴ join.
- Rust Datalog oracle: datafrog 2.0.1 from the fork `AdaWorldAPI/datafrog` (v4, best of 5) runs join 10⁶ in 65–69 ms (65–69 ns/pair) and the
seeded ancestor query 10⁶ in 0.29 s; join_10000 in 0.5 ms against PeTTa 1.47 s and Hyperon > 600 s.
Oracle and comparison bar only, never a production engine (hash/sort joins beside mask-risc).
- Crate name: `lance-graph-metta` (one concern: front end + `Space` adapter); "cog" would mix in
PLN, the miner, attention and Classic AtomSpace (AGPL).

**Open:** whether `match &self` can reach whole conjunctions without patching Hyperon; D-MTP-1..5
not authorized; the expression-width panic has no fix yet.
5 changes: 4 additions & 1 deletion .claude/board/entries/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ index row, (3) no duplicate entry id. Checks 1 and 2 are deliberately
opposite directions; the stranding this convention prevents shows up in
exactly one of them, never both.

331 entries, 2026-08-06 .. 2026-10-14.
334 entries, 2026-08-06 .. 2026-10-14.

| date | entry id | finding | file |
|---|---|---|---|
| 2026-10-14 | `revision-layer-invariants` | | [2026-10-14-revision-layer-invariants.md](2026-10-14-revision-layer-invariants.md) |
| 2026-10-14 | `D-MTP-0` | where Hyperon/MeTTa attaches to the masking-algebra polyfill | [2026-10-14-metta-polyfill-map.md](2026-10-14-metta-polyfill-map.md) |
| 2026-10-14 | `ledger-revision-after-1553` | | [2026-10-14-ledger-revision-after-1553.md](2026-10-14-ledger-revision-after-1553.md) |
| 2026-10-14 | `D-NALP-4` | | [2026-10-14-isa-truth-exact-codes.md](2026-10-14-isa-truth-exact-codes.md) |
| 2026-10-14 | `D-MTP-1b` | the hop as a range (measured) | [2026-10-14-d-mtp-1b-range-hop.md](2026-10-14-d-mtp-1b-range-hop.md) |
| 2026-10-14 | `D-MTP-1` | the MeTTa two-hop join through Quack Semijoin (measured) | [2026-10-14-d-mtp-1-join.md](2026-10-14-d-mtp-1-join.md) |
| 2026-10-14 | `D-HOLO-H6b` | normal forms on the Context × Operation tile (measured) | [2026-10-14-d-holo-h6b.md](2026-10-14-d-holo-h6b.md) |
| 2026-10-14 | `D-HOLO` | | [2026-10-14-d-holo-falsifiers.md](2026-10-14-d-holo-falsifiers.md) |
| 2026-10-13 | `D-PROD-V4` | | [2026-10-13-production-targets-v4.md](2026-10-13-production-targets-v4.md) |
Expand Down
Loading
Loading