Skip to content

contract: mirror OSM/Geo codebook concepts — COUNT_FUSE 68→79 (OGAR #152)#648

Merged
AdaWorldAPI merged 13 commits into
mainfrom
claude/medcare-bridge-lance-graph-wmx76z
Jul 4, 2026
Merged

contract: mirror OSM/Geo codebook concepts — COUNT_FUSE 68→79 (OGAR #152)#648
AdaWorldAPI merged 13 commits into
mainfrom
claude/medcare-bridge-lance-graph-wmx76z

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Jul 4, 2026

Copy link
Copy Markdown
Owner

What

Sync the zero-dep wire mirror lance_graph_contract::ogar_codebook::CODEBOOK
to OGAR #152 (the OSM Rails→OGAR harvest) so the compile-time
lance_graph_ogar::parity::COUNT_FUSE holds. Without this, the golden-image /
symbiont / lance-graph-ogar build breaks the moment OGAR #152 lands on main
(mirror::CODEBOOK.len() != ogar_vocab::class_ids::ALL.len()).

Why now

lance-graph-ogar is workspace-excluded, so its COUNT_FUSE does not
fire in lance-graph's per-PR CI — only in the OGAR-activation build. That let the
mirror drift ahead of OGAR undetected (network_layer was wire-declared here
first with no OGAR counterpart). This PR closes the drift on both sides.

Changes

  • +10 Geo (0x0FXX) OSM concepts in CODEBOOK: osm_nodeosm_user
    (0x0F010x0F0A).
  • ConceptDomain::Geo + canonical_concept_domain(0x0F) => Geo; parity
    assert 0x0F00 → Geo (0x1000 stays Unassigned).
  • domains_agree() gains Geo and Genetics arms (Genetics was
    latently missing — no 0x0E codebook entry had exercised it; the new 0x0F
    entries would have tripped the total-match).
  • network_layer (0x0804) — the mirror already carried this OCR concept;
    OGAR L0-L4 Lane Akkumulator + LanceDB Integration + COCA Migration #152 now mints its authoritative counterpart, so both sides reach
    class_ids::ALL == CODEBOOK.len() == 79.

Cross-repo lockstep (⚠ revert after merge)

COUNT_FUSE is a compile-time equality between the mirror and ogar_vocab.
OGAR main is still 68 until #152 merges, so the four ogar-* git deps in
crates/lance-graph-ogar/Cargo.toml are temp-pinned to the pushed #152 rev
58a64d4 (ALL = 79). Once OGAR #152 merges to main, revert those four deps
to branch = "main"
so the golden image resolves to one source again.

Verification

lance-graph-ogar: COUNT_FUSE 79 == 79 (compile-time) + parity test green
  (forward mirror⊆OGAR, reverse OGAR⊆mirror, domain agreement)
lance-graph-contract: ogar_codebook tests 13/13

Depends on

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYvNjD8M8LMNYbRy3gq2FP


Generated by Claude Code

Summary by CodeRabbit

  • New Features

    • Added support for a new Geo concept domain, including OSM-related concepts.
    • Expanded domain parity checks so Genetics and Geo are treated consistently across components.
  • Bug Fixes

    • Corrected domain mapping for Geo values that were previously treated as unassigned.
    • Updated dependency handling to keep related graph components in sync with the latest contract expectations.

claude added 13 commits July 4, 2026 16:39
Records the merged knowledge arc (brick-3 RAN / truncation-disallowed /
DO-arm 3-bucket triage / ogar lock a0c7936) plus the immutable mid-arc
supersession note: the OSINT mirror commits this branch briefly carried
were dropped in the rebase per the OGAR #146 zero-vocabulary-rows ruling
and never merged; main's ISSUES.md resolution is authoritative.
…, not on main

The 2026-07-02 OGAR+ruff review fan-out falsified a claim in the #625
record: ruff main carries mint + soc.rs; mint_factored + RadixCodebook
live only on claude/medcare-ruff-csharp-sync-4iahey (505fdc4), which
diverged before the soc promotion and lacks soc.rs — no branch carries
both. E-BRICK3-CORRECTION prepended; dated correction line appended to
the #625 PR_ARC entry per the corrections-append rule.
…, dedups, the ruff sync arc, one byte-truth ruling

Synthesizes three sessions' wishlists (this session's E-sweep, the
coverage session's grounded list, op-nexgen's R/L/O/X list): ratifies
the >=2-session convergences (two-sided fuses, test-pinned counts,
zero-dep metric folds, F17, board-collision fix), records two dedup
decisions (E2-ruby yields to R1 D-AR-3.5; disposition ledger == 3-bucket
triage, one doctrine), proposes the single ruff integration order +
minimal ruff governance, merges E7 + EdgeBlock into one operator
byte-truth ruling, guards the columnar interchange against a second
dialect split, and names the unclaimed probe-corpus archival gap.
…dings + wishlist claim-of-record)

Durable home for the F-pass process epiphanies (pin-propagation is the
third leg of the cross-repo arc; unpinned environments falsify true
states — verified live; CI-invisible fuses fire in consumers' builds;
claim-of-record prevents near-collisions, proven by the mint_factored
near-redo) and a status-annotated ledger converting the wishlist
synthesis from proposal to claim-of-record. Committed durability-first
under an observed churning environment before the rebase.
…ebts (F1-F7)

Prepend the process/meta epiphany (pin-propagation is the third leg of
the cross-repo arc; unpinned envs falsify true states, verified live;
CI-invisible fuses fire in consumers' builds; claim-of-record prevents
near-collisions, proven) to EPIPHANIES.md, and file the three concrete
debts (CI-excluded fuse, undecided ogar lockfile, board-prepend
conflicts) in TECH_DEBT.md. Full text + wishlist claim-of-record ledger
in the paired entropy-reduction handover.
Phase 1 verified already merged (ruff PR #39 -> main 3dba017; 18 tests
green) — read-before-act avoided a redundant PR. Frontier advances to
Phase 2 (ruff_python_spo inherits_from). Added the F2/F3 operating note:
local checkouts churned to stale snapshots repeatedly; remote survived;
push-early + git -C + re-fetch is the working discipline.
…ross-lane

Increment 1 (ruff PR #40) shipped the is_a input end — frontend-agnostic
Model.inherits on ruff_spo_triplet's shared IR + Odoo _inherit wiring,
self-edge reopen guard, 62-predicate-lock intact.

Increment 2 (OGAR lift: Model.inherits -> Class.parent/is_a) and
Increment 3 (askama ClassView x FieldMask -> row view, D-VCW-3) are the
OGAR and V3 sessions' lanes. Forwarded via CROSS_SESSION_BROADCAST rather
than built unilaterally (F4 claim-of-record). Ledger E2 rows updated:
E2-py SHIPPED, E2-ogar + E2-render OPEN with gates + required decisions.
…arent' → vocab mixins

ruff #40 merged → OGAR ruff-pin bumped → ogar-from-ruff lifts Odoo _inherit
(Model.inherits) onto Class.mixins. The multi-parent decision I earlier
forwarded as 'widen Class.parent to Vec' was already answered by the vocab:
Class::mixins doc names _inherit, Class::inheritance excludes mixins. Ledger
E2-ogar → SHIPPED; broadcast note for V3 LEG-3: FieldMask compose unions
parent ∪ mixins for Odoo inherited fields.
…an (operator clarification)

First PR per branch is fine to open autonomously when it is the first open PR
for the branch→base pair AND no parallel session is live on that branch. The
rule protects a clean linear PR history per branch (same family as F6/F4/F7),
not delivery. Recorded as ledger F8 + broadcast note for parallel sessions.
…s struct+methods not SurrealQL

Operator redirected LEG 3 to a struct-of-methods render (ClassView x FieldMask
-> struct fields; OGAR ActionDef DO-arm -> methods; on_enter => &mut self);
SurrealQL-AST render deprecated. Ledger E2-render -> SHIPPED; broadcast note
supersedes the earlier row-view spec.
The lance-graph half of path B (harvest -> byte-parity -> FacetCascade SoA
sink). facet_cascades_from_le_bytes (stride-16 twin of node_rows_from_le_bytes)
+ FacetSoa (Vec<FacetCascade> aligned column, from_le_bytes/as_le_bytes/get/
lookup_by_classid) + SoaEnvelope impl. 6 tests green, clippy -D warnings clean.

V3-shaped only: 16B key = facet_classid(4) | 6x(8:8) tiles
(HEEL.HIP.TWIG.LEAF.family.identity) = FacetCascade. The legacy V1
family-u24+identity-u24 node-key tail is NOT used (operator ruling: all
substrate is V3; V1 tail forbidden for new work). A class facet carries no
instance identity (id tier unused for a class address).

WIP protect-commit (F2 churn guard). Structural confirm pending; board
hygiene + OGAR producer probe land with the PR.
… separate column

Operator ruling B: the facet IS the V3 node key. The separate stride-16
facet-registry column (facet_soa, option A) is retired — under all-V3 the
FacetCascade (facet_classid | 6x(u8:u8) tiles = HEEL.HIP.TWIG.LEAF.family.identity)
IS the canonical key. family/identity are u8:u8 TILES, never u24. The flat
NodeGuid([u8;16]) with u24 family()/identity() accessors is the V1 shape,
legacy for new work (retirement flagged to the V3 session, not ripped here).
Sync lance_graph_contract::ogar_codebook::CODEBOOK to OGAR #152 so the
compile-time COUNT_FUSE in lance-graph-ogar holds against the OSM harvest:

- +10 Geo (0x0FXX) OSM concepts: osm_node/way/relation/changeset/
  element_tag/relation_member/way_node/note/gpx_trace/user.
- ConceptDomain += Geo; canonical_concept_domain 0x0F => Geo; the
  0x0F00 → Geo parity assert (0x1000 stays Unassigned).
- domains_agree() += Geo and Genetics arms (Genetics was latently
  missing — no 0x0E codebook entry had exercised it; the new 0x0F
  entries would have tripped it).

The mirror already carried network_layer (0x0804, an OCR concept
wire-declared here first); OGAR #152 now mints its authoritative
counterpart, so both sides land at class_ids::ALL = CODEBOOK.len() = 79.

TEMP-PIN ogar-vocab/class-view/ontology/adapter-surrealql to OGAR rev
58a64d4 (the #152 tip, ALL = 79). OGAR main is still 68 until #152
merges; revert the four git deps to branch = "main" once it lands so
the golden image resolves to one source again.

Verified: lance-graph-ogar builds (COUNT_FUSE 79==79) + parity test
passes (forward mirror⊆OGAR, reverse OGAR⊆mirror, domain agreement);
lance-graph-contract ogar_codebook tests 13/13.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYvNjD8M8LMNYbRy3gq2FP
@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds a Geo ConceptDomain with OSM-related codebook entries to lance-graph-contract, pins four OGAR git dependencies to a fixed revision, updates lance-graph-ogar parity matching for Genetics/Geo, and appends multiple dated board/handover markdown documents.

Changes

Geo Domain Codebook and OGAR Parity

Layer / File(s) Summary
Geo ConceptDomain, codebook entries, and tests
crates/lance-graph-contract/src/ogar_codebook.rs
Adds Geo variant for high-byte 0x0FXX, routes canonical_concept_domain accordingly, adds OSM CODEBOOK entries (0x0F01-0x0F0A), and updates the routing test.
OGAR dependency pin and cross-crate parity update
crates/lance-graph-ogar/Cargo.toml, crates/lance-graph-ogar/src/lib.rs
Pins ogar-vocab, ogar-class-view, ogar-ontology, ogar-adapter-surrealql to a fixed rev, and expands parity::domains_agree to accept Genetics/Geo matches.

Board and Handover Documentation

Layer / File(s) Summary
Cross-session broadcast transpile-chain entries
.claude/board/CROSS_SESSION_BROADCAST.md
Appends entries for transpile-chain Increment 1, LEG 2, PR-hygiene convention, and LEG 3 completion.
Process findings and correction epiphanies
.claude/board/EPIPHANIES.md
Adds fleet-cadence process findings and a split-brain minter correction section.
PR #625 board tracking updates
.claude/board/LATEST_STATE.md, .claude/board/PR_ARC_INVENTORY.md, .claude/board/TECH_DEBT.md
Records PR #625 shipment, arc inventory details, and a related fleet-cadence tech-debt entry.
Cross-session handover documents
.claude/handovers/2026-07-02-cross-session-wishlist-synthesis.md, .claude/handovers/2026-07-02-entropy-reduction-and-epiphany-ledger.md
Adds new handover docs recording wishlist synthesis decisions and a status ledger with process epiphanies and next steps.

Estimated code review effort: 2 (Simple) | ~12 minutes

Possibly related PRs

Poem

A byte of 0x0F hops into place,
Geo joins the codebook's embrace 🗺️
OSM ways and nodes align,
Pinned revs keep parity fine.
Boards grow long with notes each day—
this rabbit ships and hops away. 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is specific and accurately summarizes the codebook mirror update and COUNT_FUSE change tied to OGAR #152.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
crates/lance-graph-contract/src/ogar_codebook.rs (1)

685-709: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider adding explicit drift-guard assertions for the new osm_* ids.

codebook_ids_match_ogar_vocab exercises canonical_concept_id for every other domain added so far (Health, Auth, Automation, etc.) but the new Geo/OSM entries (osm_nodeosm_user, 0x0F01-0x0F0A) added in this PR have no corresponding assertions here. The generic codebook_has_no_duplicate_ids_or_zero_concept_slot test only checks uniqueness/non-zero slot, not that the ids match OGAR's authoritative values.

♻️ Suggested addition
         assert_eq!(canonical_concept_id("automation_trigger"), Some(0x0C09));
+        // 0x0FXX Geo (OGAR `#152` OSM harvest).
+        assert_eq!(canonical_concept_id("osm_node"), Some(0x0F01));
+        assert_eq!(canonical_concept_id("osm_user"), Some(0x0F0A));
         assert_eq!(canonical_concept_id("not_a_concept"), None);

As per coding guidelines, "Add Rust unit tests alongside implementations via #[cfg(test)] modules; prefer focused scenarios over broad integration tests."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/lance-graph-contract/src/ogar_codebook.rs` around lines 685 - 709,
`codebook_ids_match_ogar_vocab` is missing drift-guard coverage for the new
Geo/OSM concepts, so add explicit `canonical_concept_id` assertions for each
`osm_*` entry added in this PR (the `0x0F01`-`0x0F0A` range). Update the
existing `#[cfg(test)]` unit test in `ogar_codebook.rs` to verify the
authoritative ids match OGAR exactly, similar to the current checks for Health,
Auth, and Automation. Keep the assertions grouped with the other domain-specific
checks so future id drift is caught by this test.

Source: Coding guidelines

crates/lance-graph-ogar/Cargo.toml (1)

81-95: 🧹 Nitpick | 🔵 Trivial

Temporary pin is well-documented; consider linking a tracking issue for the revert.

The comment clearly states the revert condition ("REVERT the four deps to branch = "main" once OGAR #152 lands on main"), which is good practice. Since this is easy to forget once merged, consider referencing a tracking issue number so the revert isn't lost.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/lance-graph-ogar/Cargo.toml` around lines 81 - 95, Add a tracking
reference to the temporary OGAR git pin so the revert back to branch main is not
forgotten; update the Cargo.toml comment near the ogar-vocab, ogar-class-view,
ogar-ontology, and ogar-adapter-surrealql entries to mention the relevant issue
or task number for OGAR `#152`. Keep the existing revert condition, but make the
reminder actionable by naming the tracking issue in the same note.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@crates/lance-graph-contract/src/ogar_codebook.rs`:
- Around line 685-709: `codebook_ids_match_ogar_vocab` is missing drift-guard
coverage for the new Geo/OSM concepts, so add explicit `canonical_concept_id`
assertions for each `osm_*` entry added in this PR (the `0x0F01`-`0x0F0A`
range). Update the existing `#[cfg(test)]` unit test in `ogar_codebook.rs` to
verify the authoritative ids match OGAR exactly, similar to the current checks
for Health, Auth, and Automation. Keep the assertions grouped with the other
domain-specific checks so future id drift is caught by this test.

In `@crates/lance-graph-ogar/Cargo.toml`:
- Around line 81-95: Add a tracking reference to the temporary OGAR git pin so
the revert back to branch main is not forgotten; update the Cargo.toml comment
near the ogar-vocab, ogar-class-view, ogar-ontology, and ogar-adapter-surrealql
entries to mention the relevant issue or task number for OGAR `#152`. Keep the
existing revert condition, but make the reminder actionable by naming the
tracking issue in the same note.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0fd37b97-fb9f-455b-b951-1feebaccd2f5

📥 Commits

Reviewing files that changed from the base of the PR and between b74378c and 19d1b3a.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (10)
  • .claude/board/CROSS_SESSION_BROADCAST.md
  • .claude/board/EPIPHANIES.md
  • .claude/board/LATEST_STATE.md
  • .claude/board/PR_ARC_INVENTORY.md
  • .claude/board/TECH_DEBT.md
  • .claude/handovers/2026-07-02-cross-session-wishlist-synthesis.md
  • .claude/handovers/2026-07-02-entropy-reduction-and-epiphany-ledger.md
  • crates/lance-graph-contract/src/ogar_codebook.rs
  • crates/lance-graph-ogar/Cargo.toml
  • crates/lance-graph-ogar/src/lib.rs

@AdaWorldAPI AdaWorldAPI merged commit 7b48abd into main Jul 4, 2026
7 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 19d1b3aab7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# .len()) requires BOTH sides at 79. OGAR main is still 68 until #152 merges —
# pinning to the pushed rev keeps the lockstep green now. REVERT the four deps
# to branch = "main" once OGAR #152 lands on main (one source in the golden image).
ogar-vocab = { git = "https://github.com/AdaWorldAPI/OGAR", rev = "58a64d4701eaf70ff67fe53a5e2087d5d0c48c0d" }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Pin all golden-image OGAR deps together

When building the golden-image roots before OGAR #152 is on main, this pin only updates lance-graph-ogar's transitive OGAR source; I checked crates/symbiont/Cargo.toml and crates/cognitive-stack/Cargo.toml, and both still directly depend on ogar-vocab/ogar-ontology/ogar-adapter-surrealql with branch = "main" while also path-depending on this crate. Cargo treats branch=main and this rev as distinct sources, so those binaries resolve two OGAR copies: direct ogar_vocab remains the 68-concept main copy while lance_graph_ogar uses the 79-concept Geo/OSM rev. That defeats the one-source golden-image invariant and leaves code importing the direct OGAR crates without the new Geo classes even though the activation crate's parity passes; pin or remove/update the direct OGAR deps (and tracked locks) in those roots too.

Useful? React with 👍 / 👎.

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