feat(contract): 6×(8:8) FacetCascade + V3 (part_of:is_a) fold + OSINT-V3 (custom:canon split)#613
Conversation
…(P-A)
Extend the single classid→ReadMode dispatch with a third axis tail_variant
{V1,V2,V3} resolved by classid_read_mode(), mirroring OGAR #128's
classid → {tail_variant, value_schema, edge_codec} envelope parser. Never a
public new_v3 — the registry field IS the mechanism, symmetric with value_schema.
Additive / default-V1 / non-breaking (nothing reads tail_variant yet). DEFAULT +
OSINT/FMA/PROJECT/ERP = V1 (L1, no corpus re-mint). Structural parity fuse names
all three axes vs the #128 canon.
OSINT-V3 is the first wired V3 class (gated `guid-v3-tail`):
CLASSID_OSINT_V3 = 0x1000_0700 — the generation marker sits in the HIGH (custom)
u16, leaving the canon LOW u16 (0xDDCC) untouched, so classid_concept_domain
(which masks `classid as u16`) still routes ConceptDomain::Osint. This is the
Codex-P1 fix: the rejected low-half 0x0000_1007 read domain 0x10 = Unassigned.
No router flip — the live Custom:Canon byte order is preserved.
OSINT_V3 ReadMode = {V3, Cognitive, CoarseOnly} (same value model as OSINT, V3
tail). Gated test proves BOTH facts: tail_variant == V3 AND
classid_concept_domain(0x1000_0700) == Osint. FMA-V3 (0x1000_0A01) + Genetics
(domain TBD — 0x0D is HR, not Genetics) deferred to a follow-up.
Plan: .claude/plans/soa-value-tenant-migration-v2.md §2.1/§2.2.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR adds a ChangesV3 tail routing and facet substrate
Sequence Diagram(s)sequenceDiagram
participant H as soa_graph::hhtl_path
participant R as classid_read_mode
participant V3 as NiblePath::from_guid_prefix_v3
participant V1 as NiblePath::from_guid_prefix
H->>R: guid.classid()
R-->>H: tail_variant
alt tail_variant == V3
H->>V3: guid
else
H->>V1: guid
end
sequenceDiagram
participant G as NodeGuid
participant P as NiblePath::from_guid_prefix_v3
participant F as from_packed
G->>P: raw GUID bytes
P->>F: full-depth HEEL·HIP·TWIG·LEAF path
F-->>P: NiblePath or EMPTY
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd1302fcca
ℹ️ 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".
| /// `classid as u16` → low half) — unlike the rejected low-half `0x0000_1007`, | ||
| /// which read domain `0x10` = `Unassigned`. Resolves to [`ReadMode::OSINT_V3`]. | ||
| #[cfg(feature = "guid-v3-tail")] | ||
| pub const CLASSID_OSINT_V3: u32 = 0x1000_0700; |
There was a problem hiding this comment.
Avoid using a high-u16 V3 class marker
With guid-v3-tail enabled, this high-u16 marker makes every OSINT-V3 NodeGuid fail the existing HHTL lowering: NiblePath::from_guid_prefix returns None whenever classid >> 16 != 0 (crates/lance-graph-contract/src/hhtl.rs:291-299), and soa_graph::hhtl_path turns that into NiblePath::EMPTY (crates/lance-graph-contract/src/soa_graph.rs:143-149). Any OSINT-V3 domain projected through the existing graph surface will therefore render hhtl_depth = 0 and nearest_anchor will compare empty paths rather than the node's HEEL/HIP/TWIG prefix; either reserve a marker that the prefix fold can carry or add a V3-aware path lowering before registering this classid.
Useful? React with 👍 / 👎.
Resolves the Codex P2 on #613 (OSINT-V3 0x1000_0700 folded to EMPTY on the graph surface) and lands the operator-directed 6-tier homogeneous facet. Key-side routing (hhtl.rs / soa_graph.rs): - NiblePath::from_guid_prefix_v3 (feature guid-v3-tail) folds the 4 HHTL tiers HEEL·HIP·TWIG·LEAF in FULL — BOTH bytes per 8:8 tile (part_of high + is_a low), depth 16. classid is NOT folded, so a V3 classid's high-u16 generation marker never gates routing. - soa_graph::hhtl_path is now schema-driven: a V3 classid (tail_variant==V3) routes via from_guid_prefix_v3 -> non-empty path; every other classid keeps the v1 fold. Fixes the latent EMPTY-fold. - from_guid_prefix's "high u16 reserved-zero" doc + guard scoped to v1-fold; NOT a global classid law (V3 abolishes it by never folding classid). Value-side facet (canonical_node.rs): - FacetTier { lo, hi } (2B) + FacetCascade { facet_classid: u32, tiers: [FacetTier;6] } (16B = facet_classid(4) | 6x(8:8)=12, harvest 5.1). - ALWAYS 8:8, content-blind: only the consumer projects meaning (part_of:is_a / 256:256 palette centroid / group:member / column:row / concatenated u16 ...). as_u16 + morton (the 2bit x 2bit Morton-tile reading, the amortization benefit), hi_chain/lo_chain, hi_distance/lo_distance. - A reading over a borrowed [u8;16] - carries NO value-slab offset, so it does not touch the operator-LOCKED 480B layout (the classid->ClassView byte-pick is the separate, panel-gated step). Board hygiene: EPIPHANIES E-FACET-8-8-ALWAYS + LATEST_STATE Contract Inventory. 739 lib tests green (default 737 + guid-v3-tail), clippy -D warnings + fmt clean. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF
facet module — content-blind 8:8 substrate + zero-cost reinterpret
#614
CodeRabbit flagged MD028 on #614 — the blank line between the new facet entry and the #613 entry breaks the blockquote. Quote it (`>`) so the two entries stay in one blockquote, the fix CodeRabbit suggested. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF
Same MD028 fix as #614: quote (`>`) the blank line between the new Phase-1 entry and the #613 entry so they stay one blockquote. Preempts the identical CodeRabbit nit on this PR. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF
…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
What (P-A)
Extends the canonical
classid → ReadModeregistry with thetail_variantaxis — which KEY shape (V1 / V2 / V3) a classid mints, resolved by the sameclassid_read_mode(c)lookup that already resolvesvalue_schemaandedge_codec. This is the reusable mechanism for the SoA value-tenant migration: migrating a class's identity to V3 = fliptail_varianton itsReadModeconst; later migrating its tenants = flipvalue_schemaon the same const. Two field-flips on one registry entry, no consumer rewrite either time.Companion to #612 (the §2.2 doc correction); this is the code that §2.2 describes.
Changes (
crates/lance-graph-contract)TailVariant { V1=0 (default), V2, V3 }enum (+is_layout_preserving).ReadModegainstail_variantas its first field; all five existing consts pinned toTailVariant::V1→ zero re-mint of the V1/V2 corpus (RESERVE-DON'T-RECLAIM;DEFAULT.tail_variant = V1).is_layout_preservingextended to the three-axis form.const _): assertsReadMode's field set == the three canon axes{tail_variant, value_schema, edge_codec}from OGAR feat: Phase 3 BF16 wiring + φ-spiral reconstruction theory #128 — structural-against-canon, not runtime (OGAR'stail_variantis to-wire too).guid-v3-tailfeature gates the first V3 entry:CLASSID_OSINT_V3 = 0x1000_0700+ReadMode::OSINT_V3 {V3, Cognitive, CoarseOnly}+BUILTIN_READ_MODESinsert.Tests
read_mode_osint_v3_routes_v3_tail_and_osint_domainassertsclassid_read_mode(0x1000_0700).tail_variant == V3andclassid_concept_domain(0x1000_0700) == Osint— proving the high-u16 marker routes V3 without touching the canon domain byte.guid-v3-tail),clippy -D warningsclean.FMA-V3 (
0x1000_0A01) and Genetics-V3 (domain TBD) are deferred ("rest later").🤖 Generated with Claude Code
https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF
Generated by Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Documentation