From c28127e8caacb9b0ca346d8d391e08ab00975bbd Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 7 Aug 2026 11:18:51 +0000 Subject: [PATCH 1/2] =?UTF-8?q?contract(ogar=5Fcodebook):=20mirror=20the?= =?UTF-8?q?=20Blocks=20domain=20=E2=80=94=20blockly-rs=20hot-plug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The lance-graph half of blockly-rs's hot-plug, paired with the OGAR PR that mints the concepts and declares blocks_actions. `ConceptDomain::Blocks` (0x17XX) + the two rows OGAR minted: block_function (0x1701, the classid a stored FunctionNode is addressed by) and block_inventory (0x1702, the registry row). The opcode palette is deliberately NOT mirrored — an opcode is an FnIndex byte inside a body, resolved through ogar-loco's vocabulary table, never a classid. Two rows here, not 258. Both halves of the two-sided fuse followed: - COUNT_FUSE (compile-time) — OGAR class_ids::ALL 90 -> 92, mirror matches, so the build proves the counts agree. - domains_agree gained (O::Blocks, C::Blocks). Without it the runtime bijection failed with `domain disagreement for block_function (0x1701)` — measured, not assumed: the check caught the omission before this commit existed. lance-graph-ogar: 62 tests green (incl. the full id/domain bijection); lance-graph-contract: 1155 green. Merge order: OGAR first — this mirror's fuse compiles ogar-vocab as a sibling path dep, so the counts must agree at build time. --- .claude/board/LATEST_STATE.md | 28 +++++++++++++++++++ Cargo.lock | 1 - .../lance-graph-contract/src/ogar_codebook.rs | 19 ++++++++++++- crates/lance-graph-ogar/src/lib.rs | 1 + 4 files changed, 47 insertions(+), 2 deletions(-) diff --git a/.claude/board/LATEST_STATE.md b/.claude/board/LATEST_STATE.md index 04786891c..2a61bb8f6 100644 --- a/.claude/board/LATEST_STATE.md +++ b/.claude/board/LATEST_STATE.md @@ -1,3 +1,31 @@ +## 2026-08-07 — branch `claude/rust-scratch-abi-soa-gsamge` — `ogar_codebook`: the Blocks domain mirror (blockly-rs hot-plug, consumer half) + +### Current Contract Inventory — mirror sync (lance-graph-contract) + +- `lance_graph_contract::ogar_codebook` — `ConceptDomain::Blocks` (`0x17XX`) + + the two Blocks rows, mirroring OGAR's mint. This is the **consumer half of + blockly-rs's hot-plug**: `blockly-abi` declares ONE + `lance_graph_contract::hotplug::HotPlug` const and resolves it against + `ogar_vocab::capability_registry::resolve_hotplug`, which joins on + `class_ids::ALL`. Before the mint that join answered `UnknownClassid(0x1701)`. + - `("block_function", 0x1701)` — one function body; the classid a stored + `FunctionNode` is addressed by, and the only Blocks concept binding + capabilities (`lower_script` / `raise_calls` / `render_text` / `parse_text` + / `klickweg_address`, all real `blockly-abi` functions). + - `("block_inventory", 0x1702)` — the registry row; minted and addressable, + binds nothing (a registry read never touches a body). + - **The opcode palette is deliberately NOT mirrored.** An opcode is an + `FnIndex` byte inside a function body, resolved through `ogar-loco`'s + vocabulary table — never a classid. Two Blocks rows here, not 258; if this + ever counts in the hundreds the palette leaked into the codebook. + - Two-sided fuse followed on both halves: OGAR `class_ids::ALL` 90 → 92 and + `lance_graph_ogar::parity::COUNT_FUSE` (compile-time) agree, and + `domains_agree` gained its `(O::Blocks, C::Blocks)` pair — without it the + runtime bijection failed `domain disagreement for block_function (0x1701)`, + which is the check doing its job. + - Paired OGAR PR mints the concepts + the `blocks_actions` table; merge OGAR + FIRST (this mirror's fuse compiles against `ogar-vocab` as a sibling). + ## 2026-08-06 — branch `claude/vocab-tenant-bake` — `lance_graph_contract::identity_quad`: four external identifier spaces joined at BAKE time into one 96-bit facet payload ### Current Contract Inventory — new module (lance-graph-contract) diff --git a/Cargo.lock b/Cargo.lock index 6141727c9..324324594 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6636,7 +6636,6 @@ dependencies = [ name = "ndarray" version = "0.17.2" dependencies = [ - "blake3", "fractal", "matrixmultiply", "num-complex", diff --git a/crates/lance-graph-contract/src/ogar_codebook.rs b/crates/lance-graph-contract/src/ogar_codebook.rs index f9f5b18c8..aeab1c17d 100644 --- a/crates/lance-graph-contract/src/ogar_codebook.rs +++ b/crates/lance-graph-contract/src/ogar_codebook.rs @@ -86,7 +86,16 @@ pub enum ConceptDomain { /// (OGAR canon "256×256 centroid tile", D-BOTHCASC). Mirrors OGAR /// `ogar_vocab::ConceptDomain::Geo`; the parity tests pin `0x0F00 → Geo`. Geo, - /// Any high-byte slot not yet assigned a domain (`0x03XX`–`0x06XX`, `0x10XX`+). + /// `0x17XX` — Blocks (visual block-programming: the schema concepts a + /// stored block node is addressed by — `block_function` / + /// `block_inventory` — consumed by blockly-rs / scratch-rs). The opcode + /// palette is deliberately NOT here: an opcode is a byte inside a function + /// body resolved through `ogar-loco`'s vocabulary table, never a classid. + /// Mirrors OGAR `ogar_vocab::ConceptDomain::Blocks`; the parity tests pin + /// `0x1700 → Blocks`. + Blocks, + /// Any high-byte slot not yet assigned a domain (`0x03XX`–`0x06XX`, + /// `0x10XX`–`0x16XX`, `0x18XX`+). Unassigned, } @@ -109,6 +118,7 @@ pub fn canonical_concept_domain(id: u16) -> ConceptDomain { 0x0D => ConceptDomain::HR, 0x0E => ConceptDomain::Genetics, 0x0F => ConceptDomain::Geo, + 0x17 => ConceptDomain::Blocks, _ => ConceptDomain::Unassigned, } } @@ -575,6 +585,13 @@ pub const CODEBOOK: &[(&str, u16)] = &[ ("osm_note", 0x0F08), ("osm_gpx_trace", 0x0F09), ("osm_user", 0x0F0A), + // ── 0x17XX — Blocks (visual block-programming schema concepts) ── + // The two classids a stored block node is addressed BY. NOT the opcode + // palette (256 Blockly/Scratch operation bytes) — those stay `FnIndex` + // bytes inside a function body, resolved through `ogar-loco`'s vocabulary + // table, and are deliberately withheld from this codebook. + ("block_function", 0x1701), + ("block_inventory", 0x1702), ]; /// Resolve a **canonical-concept** string to its stable `u16` codebook id via diff --git a/crates/lance-graph-ogar/src/lib.rs b/crates/lance-graph-ogar/src/lib.rs index 506b4ad33..959729b5e 100644 --- a/crates/lance-graph-ogar/src/lib.rs +++ b/crates/lance-graph-ogar/src/lib.rs @@ -146,6 +146,7 @@ pub mod parity { | (O::HR, C::HR) | (O::Genetics, C::Genetics) | (O::Geo, C::Geo) + | (O::Blocks, C::Blocks) | (O::Unassigned, C::Unassigned) ) } From 418a5e1c889b7da4f7559e918415d972a709f561 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 7 Aug 2026 11:36:05 +0000 Subject: [PATCH 2/2] =?UTF-8?q?Revert=20"contract(ogar=5Fcodebook):=20mirr?= =?UTF-8?q?or=20the=20Blocks=20domain=20=E2=80=94=20blockly-rs=20hot-plug"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit c28127e8caacb9b0ca346d8d391e08ab00975bbd. --- .claude/board/LATEST_STATE.md | 28 ------------------- Cargo.lock | 1 + .../lance-graph-contract/src/ogar_codebook.rs | 19 +------------ crates/lance-graph-ogar/src/lib.rs | 1 - 4 files changed, 2 insertions(+), 47 deletions(-) diff --git a/.claude/board/LATEST_STATE.md b/.claude/board/LATEST_STATE.md index 2a61bb8f6..04786891c 100644 --- a/.claude/board/LATEST_STATE.md +++ b/.claude/board/LATEST_STATE.md @@ -1,31 +1,3 @@ -## 2026-08-07 — branch `claude/rust-scratch-abi-soa-gsamge` — `ogar_codebook`: the Blocks domain mirror (blockly-rs hot-plug, consumer half) - -### Current Contract Inventory — mirror sync (lance-graph-contract) - -- `lance_graph_contract::ogar_codebook` — `ConceptDomain::Blocks` (`0x17XX`) - + the two Blocks rows, mirroring OGAR's mint. This is the **consumer half of - blockly-rs's hot-plug**: `blockly-abi` declares ONE - `lance_graph_contract::hotplug::HotPlug` const and resolves it against - `ogar_vocab::capability_registry::resolve_hotplug`, which joins on - `class_ids::ALL`. Before the mint that join answered `UnknownClassid(0x1701)`. - - `("block_function", 0x1701)` — one function body; the classid a stored - `FunctionNode` is addressed by, and the only Blocks concept binding - capabilities (`lower_script` / `raise_calls` / `render_text` / `parse_text` - / `klickweg_address`, all real `blockly-abi` functions). - - `("block_inventory", 0x1702)` — the registry row; minted and addressable, - binds nothing (a registry read never touches a body). - - **The opcode palette is deliberately NOT mirrored.** An opcode is an - `FnIndex` byte inside a function body, resolved through `ogar-loco`'s - vocabulary table — never a classid. Two Blocks rows here, not 258; if this - ever counts in the hundreds the palette leaked into the codebook. - - Two-sided fuse followed on both halves: OGAR `class_ids::ALL` 90 → 92 and - `lance_graph_ogar::parity::COUNT_FUSE` (compile-time) agree, and - `domains_agree` gained its `(O::Blocks, C::Blocks)` pair — without it the - runtime bijection failed `domain disagreement for block_function (0x1701)`, - which is the check doing its job. - - Paired OGAR PR mints the concepts + the `blocks_actions` table; merge OGAR - FIRST (this mirror's fuse compiles against `ogar-vocab` as a sibling). - ## 2026-08-06 — branch `claude/vocab-tenant-bake` — `lance_graph_contract::identity_quad`: four external identifier spaces joined at BAKE time into one 96-bit facet payload ### Current Contract Inventory — new module (lance-graph-contract) diff --git a/Cargo.lock b/Cargo.lock index 324324594..6141727c9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6636,6 +6636,7 @@ dependencies = [ name = "ndarray" version = "0.17.2" dependencies = [ + "blake3", "fractal", "matrixmultiply", "num-complex", diff --git a/crates/lance-graph-contract/src/ogar_codebook.rs b/crates/lance-graph-contract/src/ogar_codebook.rs index aeab1c17d..f9f5b18c8 100644 --- a/crates/lance-graph-contract/src/ogar_codebook.rs +++ b/crates/lance-graph-contract/src/ogar_codebook.rs @@ -86,16 +86,7 @@ pub enum ConceptDomain { /// (OGAR canon "256×256 centroid tile", D-BOTHCASC). Mirrors OGAR /// `ogar_vocab::ConceptDomain::Geo`; the parity tests pin `0x0F00 → Geo`. Geo, - /// `0x17XX` — Blocks (visual block-programming: the schema concepts a - /// stored block node is addressed by — `block_function` / - /// `block_inventory` — consumed by blockly-rs / scratch-rs). The opcode - /// palette is deliberately NOT here: an opcode is a byte inside a function - /// body resolved through `ogar-loco`'s vocabulary table, never a classid. - /// Mirrors OGAR `ogar_vocab::ConceptDomain::Blocks`; the parity tests pin - /// `0x1700 → Blocks`. - Blocks, - /// Any high-byte slot not yet assigned a domain (`0x03XX`–`0x06XX`, - /// `0x10XX`–`0x16XX`, `0x18XX`+). + /// Any high-byte slot not yet assigned a domain (`0x03XX`–`0x06XX`, `0x10XX`+). Unassigned, } @@ -118,7 +109,6 @@ pub fn canonical_concept_domain(id: u16) -> ConceptDomain { 0x0D => ConceptDomain::HR, 0x0E => ConceptDomain::Genetics, 0x0F => ConceptDomain::Geo, - 0x17 => ConceptDomain::Blocks, _ => ConceptDomain::Unassigned, } } @@ -585,13 +575,6 @@ pub const CODEBOOK: &[(&str, u16)] = &[ ("osm_note", 0x0F08), ("osm_gpx_trace", 0x0F09), ("osm_user", 0x0F0A), - // ── 0x17XX — Blocks (visual block-programming schema concepts) ── - // The two classids a stored block node is addressed BY. NOT the opcode - // palette (256 Blockly/Scratch operation bytes) — those stay `FnIndex` - // bytes inside a function body, resolved through `ogar-loco`'s vocabulary - // table, and are deliberately withheld from this codebook. - ("block_function", 0x1701), - ("block_inventory", 0x1702), ]; /// Resolve a **canonical-concept** string to its stable `u16` codebook id via diff --git a/crates/lance-graph-ogar/src/lib.rs b/crates/lance-graph-ogar/src/lib.rs index 959729b5e..506b4ad33 100644 --- a/crates/lance-graph-ogar/src/lib.rs +++ b/crates/lance-graph-ogar/src/lib.rs @@ -146,7 +146,6 @@ pub mod parity { | (O::HR, C::HR) | (O::Genetics, C::Genetics) | (O::Geo, C::Geo) - | (O::Blocks, C::Blocks) | (O::Unassigned, C::Unassigned) ) }