Commit e806058
committed
feat(contract): canonicalise #489 — wire-in + self-describing Display + retire Phase-A wrapper
OGAR/CLAUDE.md P0 audit of `canonical_node.rs` group-by-group:
- key: classid·HEEL·HIP·TWIG·family·identity (8·4·4·4·6·6 hex) — matches
- RFC-WAIVED ("No UUID ceremony") — matches
- 3×4 uniform tiers (each u16, tier-of-level = level>>2) — matches
- 16-byte EdgeBlock at fixed row offset — row-layout zero-fallback ladder
(default class reserves it, registry-resolved opt-out, "reserve-don't-
reclaim" applied at row level)
- self-describing Display — gap closed in this PR
Changes:
1. lib.rs: pub mod canonical_node; (size-asserts + tests now CI-enforced)
2. canonical_node.rs: impl Display emitting
`{classid:08x}-{heel:04x}-{hip:04x}-{twig:04x}-{family:06x}{identity:06x}`
so every printed GUID is self-describing at sight per canon. LE in-memory
bytes fold through the accessors so hex print is canon-ordered regardless.
3. Phase-A wrapper retired: identity.rs deleted (UUIDv8 NodeGuid + RFC
ceremony bits + IDENTITY_LAYOUT_VERSION + SHAPE_HASH_BITS/LOCAL_BITS —
all canon-incompatible per "wrappers adapt to the canon, never the
reverse"). lib.rs re-export switched to canonical_node::{EdgeBlock,
NodeGuid, NodeRow}.
4. Stale doc references reworded: hhtl.rs:192 (from_packed is a general HHTL
utility), lance-graph-ontology/src/registry.rs:405 (niblepath_of points
at the canon's classid·HEEL·HIP·TWIG resolution).
Tests: cargo test -p lance-graph-contract --lib → 594/594 green (−10
retired UUIDv8 tests, +2 Display, +8 wire-in canonical_node tests now
visible). cargo check -p lance-graph-ontology: clean (5 pre-existing
oxrdf::Subject deprecations in untouched files). cargo clippy -p
lance-graph-contract --all-targets -D warnings: clean.
Anchored on #482 (GUID canon) + #489 (canonical_node merged) + OGAR/CLAUDE.md
P0 (the canon: "wrappers audited against this canon group-by-group — never
the reverse").
https://claude.ai/code/session_01VysoWJ6vsyg3wEGc5v7T5v1 parent 1af2a45 commit e806058
6 files changed
Lines changed: 58 additions & 403 deletions
File tree
- .claude/board
- crates
- lance-graph-contract/src
- lance-graph-ontology/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
2 | 6 | | |
3 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
136 | 160 | | |
137 | 161 | | |
138 | 162 | | |
| |||
233 | 257 | | |
234 | 258 | | |
235 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
236 | 281 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
193 | | - | |
| 192 | + | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| |||
0 commit comments