Skip to content

Commit f1451da

Browse files
committed
ogar-fma-skeleton: drop 12+4 EdgeBlock — superseded by family nodes
Operator correction (2026-06-23): the 12-in-family + 4-out-of-family edge block is the OLD taxonomy, before family nodes. Removed EdgeBlock entirely. With the [container:member] family-node tiers, relations ARE the addressing: - local relation ⇔ shared family prefix (Guid::same_family) - cross relation ⇔ a reference to another node's Guid (unbounded) No fixed edge carve; the node stays a pure key+value block. Test `relations_are_family_prefix_not_an_edge_block` replaces the edge-block test; doc §5b updated. Also recorded: located + cascade HHTL modes may both be used on one key (operator's call). 22 tests green, clippy-clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYvNjD8M8LMNYbRy3gq2FP
1 parent 671bad6 commit f1451da

3 files changed

Lines changed: 63 additions & 73 deletions

File tree

crates/ogar-fma-skeleton/src/guid.rs

Lines changed: 55 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -241,60 +241,21 @@ pub const fn ontology_tier(parent_class: u8, child_class: u8) -> Tier {
241241
}
242242
}
243243

244-
/// The **12 + 4 edge block** — the family node's relations, exactly as the
245-
/// papillary-muscle worked example shows (`12 in-family + 4 out-of-family`).
246-
/// One byte per slot; the canonical [`KEY_BYTES`]-byte edge block.
247-
///
248-
/// - **`in_family`** (12) — *local* relations to sibling family nodes under
249-
/// the same parent (the papillary muscle's chordae tendineae, leaflet
250-
/// segments, adjacent myocardium, local vasculature/innervation). Each byte
251-
/// is the target's leaf `family_node` code.
252-
/// - **`out_of_family`** (4) — *inherited connector interfaces* to other
253-
/// systems (fibrous skeleton, coronary supply, conduction/autonomic nerves,
254-
/// ECM scaffold). Each byte is the target system/interface code.
255-
///
256-
/// Canonical, not mandatory: unused slots are zeroed (RESERVE-DON'T-RECLAIM),
257-
/// never shrunk. An instance inherits its family node's edge block as the
258-
/// template, then adds its own residue.
259-
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, Default)]
260-
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
261-
pub struct EdgeBlock {
262-
/// 12 local in-family relations (target leaf `family_node` codes).
263-
pub in_family: [u8; 12],
264-
/// 4 inherited out-of-family connector interfaces (system/interface codes).
265-
pub out_of_family: [u8; 4],
266-
}
267-
268-
impl EdgeBlock {
269-
/// The all-zero edge block (no relations asserted yet).
270-
pub const EMPTY: Self = Self {
271-
in_family: [0; 12],
272-
out_of_family: [0; 4],
273-
};
274-
275-
/// The 16 raw bytes (`in_family ++ out_of_family`).
276-
#[must_use]
277-
pub const fn bytes(&self) -> [u8; KEY_BYTES] {
278-
let mut b = [0u8; KEY_BYTES];
279-
let mut i = 0;
280-
while i < 12 {
281-
b[i] = self.in_family[i];
282-
i += 1;
283-
}
284-
let mut j = 0;
285-
while j < 4 {
286-
b[12 + j] = self.out_of_family[j];
287-
j += 1;
288-
}
289-
b
290-
}
291-
292-
/// Count of asserted (non-zero) in-family relations.
293-
#[must_use]
294-
pub fn in_family_degree(&self) -> usize {
295-
self.in_family.iter().filter(|&&b| b != 0).count()
296-
}
297-
}
244+
// ── Relations live in the family-node addressing, NOT a fixed edge block ──
245+
//
246+
// The pre-family-node taxonomy carved relations into a fixed `12 in-family +
247+
// 4 out-of-family` edge block (the papillary-muscle worked example shows it).
248+
// That is **superseded by family nodes** (operator, 2026-06-23). With the
249+
// `[container:member]` tier model, relations ARE the addressing:
250+
//
251+
// - **local relation** ⇔ shared family prefix — `Guid::same_family` (same
252+
// tiers up to the leaf `family_node`); no slots needed, the address says it.
253+
// - **cross relation** ⇔ a reference to another family node's `Guid` (the
254+
// target's address), unbounded — not a fixed-4 inherited-interface carve.
255+
//
256+
// So there is no `EdgeBlock` here. A node's neighbourhood is read from the key
257+
// space (prefix containment + family-node references), keeping the node a pure
258+
// `key + value` block with no special edge taxonomy.
298259

299260
#[cfg(test)]
300261
mod tests {
@@ -426,17 +387,45 @@ mod tests {
426387
}
427388

428389
#[test]
429-
fn edge_block_is_twelve_plus_four() {
430-
let mut e = EdgeBlock::EMPTY;
431-
e.in_family[0] = 0x11; // chorda tendinea-like local relation
432-
e.in_family[1] = 0x12;
433-
e.out_of_family[0] = 0xF1; // fibrous-skeleton interface
434-
assert_eq!(e.in_family.len(), 12);
435-
assert_eq!(e.out_of_family.len(), 4);
436-
assert_eq!(e.in_family_degree(), 2);
437-
let b = e.bytes();
438-
assert_eq!(b[0], 0x11);
439-
assert_eq!(b[12], 0xF1);
440-
assert_eq!(b.len(), KEY_BYTES);
390+
fn relations_are_family_prefix_not_an_edge_block() {
391+
// Superseding the 12+4 edge taxonomy: a local relation is a shared
392+
// family prefix; a cross relation is a reference to another node's Guid.
393+
let classid = Tier {
394+
container: 0x0A,
395+
member: 0x03,
396+
};
397+
let mut a = Guid::ZERO;
398+
a.set_tier(TIER_CLASSID, classid);
399+
a.set_tier(
400+
TIER_LEAF,
401+
Tier {
402+
container: 0x42,
403+
member: 0x01,
404+
},
405+
);
406+
let mut sibling = a; // same family node, identity attached
407+
sibling.set_tier(
408+
TIER_LEAF,
409+
Tier {
410+
container: 0x42,
411+
member: 0x02,
412+
},
413+
);
414+
let mut other_family = a;
415+
other_family.set_tier(
416+
TIER_LEAF,
417+
Tier {
418+
container: 0x99,
419+
member: 0x01,
420+
},
421+
);
422+
423+
assert!(
424+
a.same_family(&sibling),
425+
"local relation = shared family prefix"
426+
);
427+
assert!(!a.same_family(&other_family));
428+
// A cross relation is just the other node's address (a Guid), unbounded.
429+
let _cross_ref: Guid = other_family;
441430
}
442431
}

crates/ogar-fma-skeleton/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub mod morton;
6161
#[cfg(feature = "serde")]
6262
use serde::{Deserialize, Serialize};
6363

64-
pub use guid::{EdgeBlock, Guid, HhtlMode, LeafTile, Tier};
64+
pub use guid::{Guid, HhtlMode, LeafTile, Tier};
6565
pub use morton::FamilyAddress;
6666

6767
/// Re-export of the `bone` concept id from the canonical OGAR codebook

docs/FMA-SKELETON-CONVERGENCE-ANCHOR.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,13 @@ Both share the LEAF `familyNode:identity` and the 16-byte key; the mode is a
189189
ontology GUID (`ANAT0001-CARD-HERT-LVNT-PAPMUS-7A3F9C1D`) is the Cascade
190190
reading; the bone's spatial key is the Located reading.
191191

192-
**The `12+4` edge block** (`EdgeBlock`): every family node carries **12
193-
in-family** local relations (sibling/parent/child family-node codes) + **4
194-
out-of-family** inherited connector interfaces (e.g. fibrous skeleton, vascular
195-
supply, innervation, ECM scaffold). An instance inherits the family node's edge
196-
block as a template and adds its own residue. This is the canonical node edge
197-
block (12 in-family + 4 out-of-family, one byte per slot).
192+
**Relations live in the family-node addressing — not a `12+4` edge block.**
193+
The fixed `12 in-family + 4 out-of-family` carve is the *pre-family-node*
194+
taxonomy and is **superseded**. With family nodes, relations ARE the address:
195+
a **local** relation is a shared family prefix (`Guid::same_family`); a
196+
**cross** relation is a reference to another node's `Guid` (unbounded), not a
197+
fixed-4 inherited-interface slot. The node stays a pure `key + value` block
198+
with no special edge taxonomy.
198199

199200
**The splat projects onto the class.** The 4D ultrasound×Doppler splat is
200201
*mapped onto* the anatomy class addressed by this GUID — semantic + spatial +

0 commit comments

Comments
 (0)