Skip to content

feat(contract): NodeGuid::mint_for tail-variant carrier (Phase 1 identity→V3)#615

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/identity-v3-mint
Jun 25, 2026
Merged

feat(contract): NodeGuid::mint_for tail-variant carrier (Phase 1 identity→V3)#615
AdaWorldAPI merged 1 commit into
mainfrom
claude/identity-v3-mint

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Phase 1 — migrate the identity to V3 (key-side)

Phase 1 of soa-value-tenant-migration-v2.md: migrate the address to V3 first, shape the tenants to V3 second. Forced, not chosen — OGAR #128's envelope parser resolves tail_variant upstream of value_schema, so the key must express V3 before value tenants can be shaped to it.

The carrier — NodeGuid::mint_for

A consumer mints its identity by its classid's tail, never by hardcoding new vs new_v2:

let g = NodeGuid::mint_for(classid_read_mode(c).tail_variant, c, heel, hip, twig, leaf, family, identity);

This is the exact key-side analog of the Phase-2 value-side to_node_row(classid_read_mode(c).value_schema, …)same classid_read_mode(c) lookup, sibling field. Migrating a class's identity to V3 becomes a one-line tail_variant flip in the registry, zero consumer rewrite (the "extend the one ReadMode, never a public new_v3" litmus from §2.1).

arm dispatches to tail
V1 new family(u24)·identity(u24)leaf ignored (V1 has no LEAF tier)
V2 | V3 new_v2 shared leaf·family·identity 3×u16 — V3 differs only in how the bytes are read (the (part_of:is_a) tile), not how they are stored, so it mints identically

No silent truncation (the footgun v2 exists to remove): the V2/V3 arm assert!s family/identity fit u16, mirroring new's own 24-bit guard. Out-of-range → loud panic, never a wrong key.

Feature gating

Cargo.toml: guid-v3-tail = ["guid-v2-tail"] — V3's mint path dispatches to new_v2, so the tail constructor must exist whenever a V3 classid can be minted. Honest gating per I-LEGACY-API-FEATURE-GATED; the TailVariant::V3 enum value itself stays unconditional, default-V1 (zero re-mint of the V1/V2 corpus, RESERVE-DON'T-RECLAIM).

End-to-end confirm

mint_for_osint_v3_is_end_to_end_routable (gated guid-v3-tail) closes the Codex-P2 EMPTY-fold from #613, both directions:

  1. mint OSINT-V3 (0x1000_0700) via the carrier → read_mode().tail_variant == V3;
  2. from_guid_prefix_v3 routes non-empty at depth 16 (the full HEEL·HIP·TWIG·LEAF cascade) while the v1 from_guid_prefix still returns None (the high-u16 marker the v1 fold refuses);
  3. decode_v2 reads the tiers back.

Plus mint_for_dispatches_to_the_right_constructor_per_tail (gated guid-v2-tail): V1 == new, V2 == V3 == new_v2.

Gates

  • Additive, zero-dep, layout-preserving, default-V1.
  • 737 lib green (default) / 744 (guid-v2-tail) / 747 (guid-v3-tail).
  • cargo clippy --all-targets -D warnings + cargo fmt clean.
  • Board: LATEST_STATE.md Contract Inventory updated in the same commit.

Next: Phase 2 (V3-shaped value tenants) — gated on the operator-locked value-slab offset + the 5+3 panels (not in this PR).

🤖 Generated with Claude Code

https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@AdaWorldAPI, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 25 minutes and 3 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0515785b-f2bb-4040-bdb6-029303a1da6b

📥 Commits

Reviewing files that changed from the base of the PR and between f686d3a and 3cbec0d.

📒 Files selected for processing (3)
  • .claude/board/LATEST_STATE.md
  • crates/lance-graph-contract/Cargo.toml
  • crates/lance-graph-contract/src/canonical_node.rs

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.

…tity→V3)

Phase 1 of soa-value-tenant-migration-v2.md: migrate identity to V3 by its
classid's tail_variant first, before shaping value tenants (Phase 2). The
parser resolves tail_variant UPSTREAM of value_schema, so the address must
express V3 before tenants can be shaped to it.

The key-side symmetric spine: a consumer mints with
`mint_for(classid_read_mode(c).tail_variant, …)` — never hardcoding new vs
new_v2 — the exact analog of the Phase-2 value-side
`to_node_row(classid_read_mode(c).value_schema, …)`. Migrating a class's
identity to V3 is then a one-line tail_variant flip in the registry, zero
consumer rewrite ("extend the one ReadMode, never a public new_v3").

  V1       -> new      (u24·u24 tail; leaf ignored — V1 has no LEAF tier)
  V2 | V3  -> new_v2   (shared leaf·family·identity 3xu16 — V3 differs only
                        in how the bytes are READ, the (part_of:is_a) tile,
                        not how they are STORED, so it mints identically)

No silent truncation (the footgun v2 removes): the V2/V3 arm asserts
family/identity fit u16, mirroring new's own 24-bit guard.

Cargo.toml: guid-v3-tail = ["guid-v2-tail"] — V3's mint path dispatches to
new_v2, so the tail constructor must exist whenever a V3 classid can be
minted (honest gating per I-LEGACY-API-FEATURE-GATED).

End-to-end confirm (mint_for_osint_v3_is_end_to_end_routable, gated
guid-v3-tail): mint OSINT-V3 via the carrier -> read_mode().tail_variant ==
V3 -> from_guid_prefix_v3 routes non-empty at depth 16 (the full
HEEL·HIP·TWIG·LEAF cascade) WHILE the v1 from_guid_prefix still returns None
— the Codex-P2 EMPTY-fold is gone, both directions proven -> decode_v2 reads
the tiers back. Plus mint_for_dispatches_to_the_right_constructor_per_tail
(gated guid-v2-tail: V1==new, V2==V3==new_v2).

Additive, default-V1 (zero re-mint of the V1/V2 corpus, RESERVE-DON'T-RECLAIM);
737 lib green default / 744 guid-v2-tail / 747 guid-v3-tail, clippy
--all-targets -D warnings + fmt clean. Board: LATEST_STATE Contract Inventory
updated (same commit).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF
@AdaWorldAPI AdaWorldAPI force-pushed the claude/identity-v3-mint branch from 12afd6f to 3cbec0d Compare June 25, 2026 17:21
@AdaWorldAPI AdaWorldAPI merged commit 26abde5 into main Jun 25, 2026
6 checks passed
AdaWorldAPI pushed a commit that referenced this pull request Jun 26, 2026
Consolidates the session's co-developed architecture for sinking
compiled semantics into the canonical GUID instead of SurrealQL AST DDL:
the structural AST of a transcode source (C#/Python/C++/Ruby) stored AS
the (part_of:is_a) GUID address in the lance-graph SoA, with behavior in
CausalEdge64 edges keyed by the GUID.

Key claims (all CONJECTURE, not built/measured):
- An AST has exactly two structural relations (is_a / part_of) and they
  ARE the two per-tier tile axes (is_a = TISSUE/what byte, part_of =
  PLACE/where byte).
- The class wrapper = OGAR ClassView / ruff_spo_triplet::Model IR; sink
  the rails-shaped declarative class-body, never a raw CSharpSyntaxTree.
- The one missing brick is a deterministic part_of/is_a rank-minter
  (exact, roundtrip-lossless on a finite known AST — not learned PQ).
- ruff-lsp is the natural language-agnostic serve surface (LSP ops ARE
  part_of/is_a queries).

OPEN GATE (flagged, not decided): whether part_of:is_a is path-only
(3 pairs / 6 bytes over HEEL/HIP/TWIG, per guid-canon-and-prefix-routing.md)
or full-key (6 pairs / 12 slots over the whole GUID, per operator framing).
Must be ratified against the V3 mint canon (PR #615 lineage) before any
packer is written.

Status: CONJECTURE. READ BY: integration-lead, truth-architect,
core-first-architect, family-codec-smith, baton-handoff-auditor.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYvNjD8M8LMNYbRy3gq2FP
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