Skip to content

contract(ogar_codebook): mirror the Blocks domain — blockly-rs hot-plug (consumer half) - #905

Closed
AdaWorldAPI wants to merge 2 commits into
mainfrom
claude/rust-scratch-abi-soa-gsamge
Closed

contract(ogar_codebook): mirror the Blocks domain — blockly-rs hot-plug (consumer half)#905
AdaWorldAPI wants to merge 2 commits into
mainfrom
claude/rust-scratch-abi-soa-gsamge

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

The lance-graph half of blockly-rs's hot-plug, paired with OGAR #255 (which mints the concepts and declares blocks_actions).

Merge OGAR #255 FIRST. This mirror's COUNT_FUSE is a compile-time assert against ogar_vocab::class_ids::ALL.len() via the sibling path dep, so the counts must already agree when this builds.

What lands

ConceptDomain::Blocks (0x17XX) + the two rows OGAR mints:

  • ("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.

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.

Why this is the "consumer half"

blockly-abi declares ONE lance_graph_contract::hotplug::HotPlug const and resolves it via ogar_vocab::capability_registry::resolve_hotplug, which joins on class_ids::ALL. The socket shapes (HotPlug / Activation / ActivationDrift / CapabilityAuthority) already live here, zero-dep; what was missing was the codebook mirror knowing the domain exists.

Both halves of the two-sided fuse followed

  • COUNT_FUSE (compile-time): OGAR class_ids::ALL 90 → 92, mirror matches — so the build itself 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, which is the fuse doing exactly its job.

Verification

  • cargo test -p lance-graph-contract — 1155 green
  • cargo test --manifest-path crates/lance-graph-ogar/Cargo.toml — 62 green, including the full id/domain bijection against the real OGAR sibling
  • cargo clippy -p lance-graph-contract --all-targets -- -D warnings — clean
  • cargo fmt — clean

Board hygiene

.claude/board/LATEST_STATE.md updated in the same commit (Current Contract Inventory — mirror sync), per the mandatory rule.


Generated by Claude Code

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.
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3f4e535f-ab0a-4f26-8286-05084b260374

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Aug 7, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_0559665f-fc6b-4f8d-b2e2-69142bbef08a)

@AdaWorldAPI AdaWorldAPI closed this Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants