IU Core First Durable Structure Op — 07 Apply / Verify result
07 — First Durable Structure Operation — Apply / Verify Result
Referenced by sql/iu-core/runtime/140_structure_op_first_durable.sql.
Operation
| Field | Value |
|---|---|
| operation_id | b37fb5f1-a89e-4780-a9c3-1a8f35410a1d |
| operation_type | reparent_piece |
| actor_ref | iu_core_runtime_140 |
| child IU | D38-DIEU35-S4-P1-1 (5410e681-6d53-48ba-b202-076ecc857115) |
| new parent | D38-DIEU35-S4-P1 (3477ff71-b8a4-4dd8-b854-d86c1567ba83) |
| prior parent | null (was flat / root) |
Why this candidate (live discovery)
The survey found all 158 IUs flat. canonical_address encodes the intended
tree. D38-DIEU35-S4-P1-1 is a leaf (0 children, lifecycle_status='draft'),
and its address minus the last -segment is D38-DIEU35-S4-P1, an existing
root. Nesting it is semantically correct and the lowest-risk durable
operation: one row of information_unit, one iu_tree_path row, no subtree.
runtime/140 re-derives the parent and aborts (transaction rollback) unless the
child is found, flat, a leaf, and in the same document.
Envelope (one committed transaction; gate opened + closed within it)
| Phase | Result |
|---|---|
| plan | operation b37fb5f1-..., status planned |
| apply | ok=true, status enacted, tree_paths_refreshed=1, relation 7961cbb4-ebfb-4f2f-abfc-a658ddf1bb38 written |
| verify | ok=true — tree_path_ok, relation_ok, tree_acyclic all true; live_parent = expected_parent |
| gate | re-closed (iu_core.structure_ops_enabled='false') — layer ends inert |
Independent read-back (post-commit)
| Check | Value |
|---|---|
v_iu_structure_operation_log |
1 row — reparent_piece / enacted / relation_count=1 |
iu_relation |
1 — contains / active, created_by iu_core_runtime_140 |
child information_unit |
parent_or_container_ref = 3477ff71-..., lifecycle draft |
child iu_tree_path |
depth 1, parent 3477ff71-..., root 3477ff71-..., path length 2 |
| tree consistency | iu_tree_path 158 = v_iu_tree 158 = live IUs 158 |
Reversal (not executed — operation left correctly applied)
The operation is a genuine, correct improvement to the data model and is left
enacted. To reverse it: open the gate, SELECT fn_iu_structure_op_rollback('b37fb5f1-a89e-4780-a9c3-1a8f35410a1d'), close the
gate. The full compensation snapshot is in iu_structure_operation.impact_summary
(prior_parent=null, relation_written=7961cbb4-..., relation_retired=null).
The rollback path was independently proven by sandbox/050 on real rows.