KB-4059

07 — Reconstruction & Containment Axis Workflow (deterministic; fingerprint invariant; graph-vs-tree, design-only, 2026-06-02)

8 min read Revision 1
one-roof-governancereconstructioncontainmentiu_relationiu_tree_pathfingerprintmulti-parentgraph-vs-treegov-sivdesign-only2026-06-01

07 — Reconstruction & Containment Axis Workflow (Branch G)

Branch G. The two deterministic, structure-first axes — AX-RECON (original-document reconstruction / source order) and AX-CONTAINMENT (parent→child). Unlike topic, these are fingerprintable and non-exemptable, so their workflow is validation, not proposal/confidence. Verdict: RECOMMENDED — reuse information_unit anchors + iu_relation + iu_tree_path; enforce the reconstruction fingerprint invariant (GOV-SIV); graph is truth, tree is projection.


07.0 The deterministic/uncertain split (why these two are different)

GPT direction and hardening doc 03 §3.4: source reconstruction / containment are deterministic — they can be fingerprinted and the containment axis can validate them; the semantic topic axis requires evidence and review. So AX-RECON and AX-CONTAINMENT carry no confidence/zone — an assignment is either correct (passes the invariant) or it is an integrity defect to fix, not a low-confidence candidate.

07.1 Original-document reconstruction (AX-RECON)

  • Anchors (live): information_unit.doc_code (which document), section_code/section_type, sort_order (position). Envelope axis_a mirrors these as a projection.
  • Operation: fn_iu_reconstruct_source(doc_code) returns every source position 1..N.
  • Non-exemptable invariant (verbatim, hardening doc 03 §3.4): "must return every source position 1..N exactly once (contiguous + unique, sort_order strictly monotonic, gap_before_count=0), and the fingerprint md5(string_agg(canonical_address || ':' || content_hash, '|' ORDER BY source_position)) must be recomputable and change iff any piece body or ordering changes." Owner: GOV-SIV (health/integrity).
  • Workflow: ingest/cut produces IUs with doc_code+sort_order → reconstruction DOT recomputes the fingerprint → drift (content_digest ≠ indexed_digest) or gap raises reconstruction_integrity_fail (critical).

07.2 Parent-child containment (AX-CONTAINMENT)

  • Primary parent: information_unit.parent_or_container_ref (one).
  • Graph: iu_relation (relation_type='contains', 60 live, multi-parent allowed; bitemporal valid_time; evidence/provenance).
  • Closure (projection): iu_tree_path (root_unit_id, parent_id, depth, path_ids[], path_addresses[], sibling_order, path_hash, valid_from/to).
  • Change log: iu_tree_change_log; structure ops iu_structure_operation; grouping iu_piece_collection/iu_piece_membership.

07.3 Source order

sort_order (within a document) and sibling_order (within a parent in iu_tree_path) define order. Reconstruction reads ORDER BY sort_order; the tree reads ORDER BY sibling_order. Both are deterministic integers maintained at cut/compose time.

07.4 Integrity conditions and their detectors

Condition Definition Detector (deterministic) Issue type
missing segment a source position absent gap_before_count > 0 / non-contiguous 1..N reconstruction_gap (critical)
duplicate segment two IUs same position/content duplicate (doc_code, sort_order) or equal content_hash reconstruction_duplicate
dangling parent parent_or_container_ref/contains target missing parent ref not in information_unit containment_dangling_parent
cycle containment graph has a cycle recursive-CTE cycle check over iu_relation containment_cycle (critical)
multi-parent w/o primary >1 contains parent and no designated primary count(parents)>1 AND parent_or_container_ref null/ambiguous containment_primary_ambiguous
orphan non-root IU with no parent no contains edge and not flagged root iu_object_orphan
fingerprint drift body/order changed silently recomputed md5(...) ≠ stored reconstruction_integrity_fail (critical)

All are deterministic SQL checks (no confidence), run by GOV-SIV scanner DOTs (doc 09).

07.5 Multi-parent vs primary-parent (graph truth vs tree projection)

  • Graph = truth. iu_relation contains allows an IU to have multiple parents (e.g. a clause cited in two documents). Each edge is bitemporal and evidenced.
  • Tree = projection. The official treeview needs a single spanning tree, so each IU designates one primary parent (information_unit.parent_or_container_ref); iu_tree_path materializes that spanning tree. Secondary containment edges are visible only in the graph browser (doc 10), not the official tree.
  • Rule: never collapse the graph into the tree silently — containment_primary_ambiguous fires if multi-parent exists without a chosen primary.

07.6 IU assignment on these axes

Deterministic — assignment is intrinsic, not a separate confidence-bearing fact:

  • AX-RECON membership = (doc_code, section_code, sort_order) on the IU itself.
  • AX-CONTAINMENT membership = parent_or_container_ref + iu_relation edges + materialized iu_tree_path row. No axis_assignment row is needed for these (that table is for uncertain semantic axes). The Axis Registry rows AX-RECON/AX-CONTAINMENT declare assignment_store = 'intrinsic'/'iu.parent_ref'.

07.7 UI reading flow

  • Reconstruction reader: render IUs of a doc_code in sort_order → the original document, contiguous, with a fingerprint badge (verified/drifted).
  • Containment tree: render iu_tree_path spanning tree (primary parents), expandable, with sibling_order.
  • Graph browser: show all contains edges (incl. secondary parents) over v_kg_edges_all/universal_edges.
  • UI reads projections/views only (doc 10); it never authors structure.

07.8 Governance / integrity checks & ownership

  • Owner: GOV-SIV (integrity/health) for the invariants; structural edits route the approval ladder (IU cut/split/merge = high-risk = L2/L3, review_decision_id, manifests — hardening doc 03 §3.3).
  • Inheritance: owner-link inherits down the containment tree; risk links (cut/split/merge approval, DOT authority, audit, rollback, reconstruction integrity) are per-node, never inherited (M-DEF-7).
  • Non-exemptable: reconstruction + relation-integrity + vector-consistency + governance-coverage cannot be exempted for any IU (concept doc).

07.9 Relationship to topic (the boundary)

The containment axis can validate structure (deterministic); the topic axis cannot be validated this way (needs evidence/review). A correct design keeps them in separate axes (AX-CONTAINMENT vs AX-TOPIC) — an IU's place in the document tree says nothing certain about its semantic topic, and vice-versa. They share the common axis model (doc 03) but never collapse into one.

07.10 Verdict

RECOMMENDED. Both axes are fully served by live substrate (information_unit anchors, iu_relation, iu_tree_path, envelope projections) under the GOV-SIV-owned non-exemptable invariants. The workflow is detect-and-fix (deterministic), not propose-and-approve (uncertain) — the opposite discipline from topic (doc 06), which is exactly why the common axis model carries an axis_kind flag (doc 03 §03.3).

Back to Knowledge Hub knowledge/dev/reports/architecture/one-roof-axis-proposal-authorization-operating-substrate-design-2026-06-01/07-reconstruction-and-containment-axis-workflow.md