03 — Parent Graph Live Commit Report
03 — Parent Graph Live Commit Report
Status: ✅ COMMITTED LIVE
Pre-image backup (all 13 affected rows, before)
All 13 child codes had parent_code = NULL before commit (verified, printed pre-image):
MTX-L2-ATOM, PIV-101, PIV-102, PIV-103, PIV-104, PIV-105, PIV-106, PIV-201, PIV-202, PIV-203, PIV-204, PIV-205, PIV-206 → all NULL.
⇒ Rollback = set those 13 to NULL (doc 08).
The committed statement
BEGIN;
UPDATE pivot_definitions SET parent_code = v.parent
FROM (VALUES
('PIV-101','PIV-001'),('PIV-102','PIV-001'),('PIV-106','PIV-001'),
('PIV-201','PIV-101'),('PIV-202','PIV-101'),('PIV-203','PIV-101'),
('PIV-204','PIV-101'),('PIV-205','PIV-101'),('PIV-206','PIV-101'),
('PIV-104','PIV-007'),('PIV-105','PIV-009'),('PIV-103','PIV-016'),
('MTX-L2-ATOM','MTX-L1-OVERVIEW')
) AS v(child,parent)
WHERE pivot_definitions.code = v.child;
-- pre-commit gate (all passed): roots 24 / children 13 / parents 6 / dangling 0 / inactive_parent 0
COMMIT;
UPDATE 13 → gate passed → COMMIT.
Post-commit persisted state
- roots 24 / children 13 / parents 6.
- parent rollup: MTX-L1-OVERVIEW=1, PIV-001=3, PIV-007=1, PIV-009=1, PIV-016=1, PIV-101=6.
- persisted parent_code-hash =
e0e89070781db28af753e20814432afb.
Count-refresh side-effect — characterised exactly (controlled + documented)
The UPDATE fired the designed statement-level trg_pivot_def_refresh. A row-grain before/after diff (rehearsed identically) shows the entire count-content delta:
| object | change |
|---|---|
pivot_results metric values |
exactly 1 row: PIV-201 {"species":"collection"} entities 1,132,202 → 1,132,205 (+3); total unchanged at 4 |
pivot_results rows added/removed |
0 / 0 |
meta_catalog record_count / active_count |
0 changes |
| L1 registry totals (PIV-001/007/009/016) | unchanged (169 / 309 / 168 / 42) |
| business / source tables | untouched |
The single changed value is a stale-cache catch-up (PIV-201 was one of the 3 needs_refresh=true rows at entry; live source had grown by 3). It is not caused by the parent_code edge — parent_code enters no count expression. Verified post-commit: PIV-201 collection entities = 1,132,205.
Advisory flag note
needs_refresh went 3 → 23 post-commit: the row-level fn_matrix_config_changed set the flag on the 13 updated pivots' result rows. This is advisory only — the statement refresh already recomputed those values (they are fresh); the system's refresh routine simply does not clear the flag. Left as-is (minimal touch; the next routine refresh clears it). No count error.
Verdict
The only intended mutation (13 parent_code values) is persisted. The only count-content side-effect is one designed, bounded, documented cache correction. No unexpected mutation; no rollback needed.