C — Parent/Child/Grandchild Subtree Filter Evidence (2026-05-29)
C — Parent → Child → Grandchild Subtree Filter Evidence
Capability: subtree filter proving parent → children → grandchildren, with no orphan / no cycle, via the authoritative function. Verdict: PASS. Channel: read-only via shipped DOT wrapper. Mutation: none.
C.1 Command & function
- DOT command:
dot_iu_subtree(category=read, mutating=false). - Wrapper:
public.fn_iu_filter_axis_c_subtree(p_root uuid, p_sample_limit integer DEFAULT 100) RETURNS jsonb— STABLE; delegates to authoritative recursionpublic.fn_iu_subtree(p_root uuid).
C.2 Input
SELECT fn_iu_filter_axis_c_subtree('cb211ee6-2b61-496e-b191-ef502ea28345', 100);
(root = canonical D38-DIEU35-S4.)
C.3 Output — the tree (8 nodes, depth 0→2)
| relative_depth | canonical_address | iu_id | parent_id |
|---|---|---|---|
| 0 (root) | D38-DIEU35-S4 | cb211ee6-…-28345 | null |
| 1 (child) | D38-DIEU35-S4-P1 | 3477ff71-…-67ba83 | cb211ee6 |
| 1 (child) | D38-DIEU35-S4-P2 | caa1f95b-…-a785e4 | cb211ee6 |
| 1 (child) | D38-DIEU35-S4-P3 | 42d12348-…-7bd768 | cb211ee6 |
| 1 (child) | D38-DIEU35-S4-P4 | 3293c8a5-…-1ba77d | cb211ee6 |
| 2 (grandchild) | D38-DIEU35-S4-P1-1 | 5410e681-…-c857115 | 3477ff71 |
| 2 (grandchild) | D38-DIEU35-S4-P1-2 | 68375024-…-d78f38 | 3477ff71 |
| 2 (grandchild) | D38-DIEU35-S4-P1-3 | 982677b6-…-da8ede | 3477ff71 |
node_count = 8, min_relative_depth = 0, max_relative_depth = 2. Root → 4 children (P1–P4) → 3 grandchildren under P1 (P1-1/2/3): parent → child → grandchild proven.
C.4 Integrity (no orphan, no cycle)
"subtree_linkage": { "parent_outside_subtree": 0 },
"global_integrity": {
"orphan_dangling_parent": 0,
"self_parent_cycle": 0,
"self_in_ancestors_cycle": 0,
"root_with_nonzero_depth": 0,
"depth0_with_parent_stale": 23,
"stored_depth_parent_mismatch": 23
},
"authoritative_source": "fn_iu_subtree"
- Orphans: 0. Cycles: 0 (
self_parent_cycleandself_in_ancestors_cycleboth 0). Bad roots: 0. - Known caveat (not a defect):
depth0_with_parent_stale = 23andstored_depth_parent_mismatch = 23— these are the storedaxis_c_depthcolumn values that are stale becauseiu_core.three_axis_auto_refresh_enabled = false. The function carries the caveat string and computes structure fromfn_iu_subtree.relative_depth, which is authoritative. The 8-node tree above usesrelative_depth, so it is correct regardless of the stored-column staleness.
C.5 Cross-validation
fn_iu_subtree recursion agrees with the materialized iu_tree_path ancestor closure and the transitive iu_relation (contains) edge closure. Parent/child/grandchild is represented by iu_relation parent→child contains edges (60 edges) plus iu_tree_path (199 rows).
C.6 What a human can look at
Run SELECT * FROM fn_iu_subtree('cb211ee6-2b61-496e-b191-ef502ea28345') ORDER BY relative_depth, canonical_address; — 8 rows, the tree above, every node's parent_id resolving inside the subtree, depths 0/1/2.
C.7 Safety
Read-only STABLE function. No mutation, no gate touched.