feat(contract): NodeGuid::mint_for tail-variant carrier (Phase 1 identity→V3)#615
Conversation
|
Warning Review limit reached
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 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
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. Comment |
…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
12afd6f to
3cbec0d
Compare
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
…bstrate The doc was authored without awareness that V3 shipped (#613/#614 FacetCascade, #615 mint_for). Three alignments; the AST-as-(part_of:is_a) idea is preserved: - Slot-count "open gate" CLOSED: facet.rs FacetCascade = facet_classid(4) | 6x(8:8) = 6 tiers (HEEL.HIP.TWIG.LEAF.family.identity), const_-asserted = the full-key 6-pair/12-slot answer; the key carries the 4-tier routing prefix (NiblePath::from_guid_prefix_v3), the complete address is the FacetCascade value facet. Nothing left to ratify. - Carrier NOT missing: FacetCascade is content-blind and already lists (part_of:is_a) as a consumer projection (hi_chain=part_of, lo_chain=is_a). Only the deterministic rank-minter is genuinely new; it writes into existing tiers (no new type/layout). - classid row is 0x1000_0700-shaped (shipped CLASSID_OSINT_V3: marker hi u16, domain on lo u16); its (part_of:is_a) ordering flagged OPEN pending the operator's Canon:Custom correction. Doc-only, CONJECTURE status retained. Claude-Session: https://claude.ai/code/session_01TANd15SECEb1Gm4cpaRVD9
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 resolvestail_variantupstream ofvalue_schema, so the key must express V3 before value tenants can be shaped to it.The carrier —
NodeGuid::mint_forA consumer mints its identity by its classid's tail, never by hardcoding
newvsnew_v2:This is the exact key-side analog of the Phase-2 value-side
to_node_row(classid_read_mode(c).value_schema, …)— sameclassid_read_mode(c)lookup, sibling field. Migrating a class's identity to V3 becomes a one-linetail_variantflip in the registry, zero consumer rewrite (the "extend the oneReadMode, never a publicnew_v3" litmus from §2.1).V1newfamily(u24)·identity(u24)—leafignored (V1 has no LEAF tier)V2|V3new_v2leaf·family·identity3×u16 — V3 differs only in how the bytes are read (the(part_of:is_a)tile), not how they are stored, so it mints identicallyNo silent truncation (the footgun v2 exists to remove): the V2/V3 arm
assert!sfamily/identityfitu16, mirroringnew'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 tonew_v2, so the tail constructor must exist whenever a V3 classid can be minted. Honest gating perI-LEGACY-API-FEATURE-GATED; theTailVariant::V3enum 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(gatedguid-v3-tail) closes the Codex-P2 EMPTY-fold from #613, both directions:0x1000_0700) via the carrier →read_mode().tail_variant == V3;from_guid_prefix_v3routes non-empty at depth 16 (the fullHEEL·HIP·TWIG·LEAFcascade) while the v1from_guid_prefixstill returnsNone(the high-u16 marker the v1 fold refuses);decode_v2reads the tiers back.Plus
mint_for_dispatches_to_the_right_constructor_per_tail(gatedguid-v2-tail):V1 == new,V2 == V3 == new_v2.Gates
guid-v2-tail) / 747 (guid-v3-tail).cargo clippy --all-targets -D warnings+cargo fmtclean.LATEST_STATE.mdContract 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