Skip to content

feat(contract): facet_schema — classid-selected 6x2 | 4x3 | 2x48 facet readings#619

Merged
AdaWorldAPI merged 2 commits into
mainfrom
claude/facet-schema-modes
Jun 28, 2026
Merged

feat(contract): facet_schema — classid-selected 6x2 | 4x3 | 2x48 facet readings#619
AdaWorldAPI merged 2 commits into
mainfrom
claude/facet-schema-modes

Conversation

@claude

@claude claude Bot commented Jun 28, 2026

Copy link
Copy Markdown

Summary

Adds lance_graph_contract::facet_schema — a small, purely additive module
that formalizes the classid-selected format of a FacetCascade's 12 payload
bytes. 96 bits tiles three ways, all exact, all re-tilings of the same
bytes
(no re-encoding, no byte moved):

schema tiling precedent
TierCascade 6 × (8:8) (part_of:is_a) the existing FacetCascade::tiers / hi_chain / lo_chain
SpoTriplet 4 × (8:8:8) (subject:predicate:object) the ruff_spo_* triple corpus
Pair48 2 × 48-bit already present: helix Signed360 and cam_pq [u8; 6] are both 48-bit

New API on FacetCascade (all const): payload(), schema(),
as_triplets(), as_pair48(), from_triplets(), from_pair48(); plus the
FacetSchema enum + FacetSchema::of_classid().

Scope / safety

  • Additive only. New module + one pub mod line; no existing type, method,
    or layout changed.
  • Does NOT touch the value slab. The operator-LOCKED 480-byte NodeRow.value
    / ValueTenant / soa-value-tenant-migration-v1/v2 surface is untouched —
    this is purely the 16-byte key facet.
  • Default-preserving. FacetSchema::TierCascade == 0, so every existing
    facet keeps its 6 × (8:8) meaning.
  • One flagged provisional: the exact bit-position of the schema sub-field
    within the {domain}{schema} facet_classid is marked pending ratification
    in FacetSchema::of_classid (defaults to TierCascade); the explicit
    as_*/from_* accessors need no convention.

Test Plan

#[cfg(test)] round-trip tests included (triplet/pair48 round-trip + classid
preserved; payload is the 12 bytes after the classid; both re-tilings are the
same bytes; schema defaults to TierCascade). Relies on lance-graph CI for
cargo test / clippy / fmt (authored via API without a local build).


🤖 Generated with Claude Code

https://claude.ai/code/session_01Mwq1QKpw4zRd6oaGRoJhF2


Generated by Claude Code

@AdaWorldAPI AdaWorldAPI merged commit 1804762 into main Jun 28, 2026
5 checks passed
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.

1 participant