KB-1D73

04 — Six-Object Commit/Deferred Pack + Re-Rehearsal (Branch B)

3 min read Revision 1
registries-pivotsix-objectcommit-deferredscalar-existsrehearsal-greenzero-mutation2026-05-31

title: 04 — Six-Object Commit/Deferred Pack + Re-Rehearsal date: 2026-05-31 decision: DEFERRED (no approval) — re-rehearsed GREEN, ready to commit on RG1+RG2

04 — Six-Object Commit/Deferred Pack (Branch B)

Because no approval exists (doc 02), this is the deferred path: the pack still compiles under BEGIN..ROLLBACK with no drift from the prior session, and is ready to commit the instant RG1+RG2 sign. Canonical SQL = gateway pack doc 03 (verbatim, unchanged); reproduced/abbreviated below.

A. Re-rehearsal result (this session, live, Section 1)

==PRE==  six views 0 · fn 0
V1 leaf=160
V2 invariant: 160 | Σrec 2,002,057 | Σact 2,001,909 | net_gap 148 | drift 3 | unverified 5 | orphan 0
V3 drift_closure: leaf_gap 148 == drift_gap 148
V4 coverage: 160 | backed 21 | missing 139
V5 verdict: FAILED | ok 152 | failed 3 | unverified 5
V6 class: balanced 152 · unmeasured 5 · model_a_surplus_recheck 1 · model_b_phantom_candidate 1 · model_b_unregistered_candidate 1
V7 tree: 37 nodes | 37 roots | 0 parents
V8 fn CAT-006: 309 | 163 | pivot_backed t | pivot_count 309
==POST==  six views 0 · fn 0   (rolled back clean)

No drift from prior pack (structure identical; only the live net_gap moved 132→148 as birth_registry wrote rows — expected, views compute live). Compiles, invariant + drift-closure hold, clean teardown.

B. The six objects (corrected, scalar-EXISTS, no fan-out — abbreviated; full text = gateway doc 03)

  1. v_registry_leaf_set — leaf rule composition_level<>'meta' AND entity_type NOT LIKE '%_total' AND entity_type<>'all' → 160 rows; no hardcoded CAT list.
  2. v_count_integrity — per-row; pivot_backed/pivot_count via scalar correlated subquery keyed on registry_collection (21/160); source_model-aware drift_classification (candidate).
  3. v_count_drift — the 3 drift exceptions from v_count_integrity.
  4. v_living_lists — every registry as a list + pivot_code/pivot_backed or PIVOT_MISSING.
  5. v_registries_pivot_tree — drill graph over parent_code (flat until wired).
  6. fn_registries_pivot_node_substrate(text) — leaf substrate resolver. Idempotent (CREATE OR REPLACE); rollback = DROP … IF EXISTS reverse order (fn, living_lists, count_drift, count_integrity, tree, leaf_set).

C. Commit procedure (macro M2 — DO NOT run until RG1+RG2 signed)

  1. Off-peak; psql -v ON_ERROR_STOP=1.
  2. BEGIN; SET LOCAL lock_timeout='3s'; statement_timeout='30s'; run 001–006 + 900_verify; confirm V1=160, V3 closure holds, V7 tree=37/37/0; green → COMMIT; else ROLLBACK;.
  3. Post-verify (900) after commit; stage 999_rollback.
  4. Do not also commit PIV-500/parent_code/threshold/pin (separate gated macros).

D. Deferred-state guarantee

Nothing committed this session. Six objects absent in PRE and POST (0→0). idle_in_tx 0. The pack is "hot" — a single off-peak transaction after sign-off creates the entire read-only foundation.

Back to Knowledge Hub knowledge/dev/reports/architecture/registries-pivot-ratify-foundation-commit-preview-campaign-2026-05-31/04-six-object-commit-deferred-pack.md