KB-3641
RP DOT Cleanup — 01 State Recovery and Live Preflight
5 min read Revision 1
registries-pivotpreflightdot-toolstriggers2026-06-03
01 — State Recovery and Live Preflight (Hard Gate 0)
Sources reconciled
- GPT review:
gpt-review-rp-classification-view-apply-pass-next-dot-cleanup-antidrift-2026-06-03.md(accepts the view-apply package; mandates this DOT-cleanup + anti-drift macro). - Classification cleanup + view-apply package (KB): docs 03 (per-row plan), 04 (Đ26/DOT path), 07 (next plan).
- RP attach package (local):
registries-pivot-governance-attach-and-mapping-build-2026-06-03/. - Governance live-adoption bridge (local):
one-roof-governance-live-adoption-bridge-for-registries-pivot-2026-06-03/. - Đ26 Pivot Law §II-QUINQUIES "KHÔNG INSERT tay" (binds pivot mutation to the DOT path) — confirmed in the live
dot-matrix-retire/dot-matrix-updateheaders. - Live SQL:
~/one-roof-clone-finalization-2026-06-03/sql/rp_classification/(view, apply_guarded, verify, rollback).
Live state (read-only, DB=directus, 2026-06-03)
| Aspect | Value | Source |
|---|---|---|
| Mapping view | v_rp_classification_governance_map LIVE, 37 rows |
query_pg |
| Base table | pivot_definitions 37 rows |
query_pg |
| Entry fingerprint | md5 = 4eb00c8fe4d0937325278d7e5e12b7a3 |
F1 |
| L2 ospa | 0 | preflight |
| L2 ownership | 0 | preflight |
L2 gap (v_object_owner_gap) |
210 | preflight |
| L2 axis / topic | absent | prior macros |
gov_emit (event_outbox domain=governance) |
0 | preflight |
| idle-in-transaction | 0 | pg_stat_activity |
Mapping counts (the cleanup target distribution)
- species_status: clean 31, missing 4, ambiguous_meta 2, orphan 0
- composition_status: match 21, mismatch 3, drill_overload 9, no_ref 4
- classification_lane: governance_home 15, rp_local 20, inactive_retire 2
- registry_group_kind: domain 15, pivot_shape 22, unknown 0
- FAC-02 mapped: 9 exact
All numbers match the rehearsed/applied baseline exactly — the view is stable and the cleanup target set is unchanged.
DOT surfaces (live dot_tools, domain=pivot + classification.*)
| DOT | Name | status | operation | paired | coverage | note |
|---|---|---|---|---|---|---|
| DOT-113 | dot-pivot-declare | published | (null) | (null) | partial | _dot_origin=SUSPECT; INSERT-only |
| DOT-114 | dot-pivot-health | published | (null) | (null) | partial | 7-point health |
| DOT-307 | dot-pivot-virtual-create | published | – | – | partial | inserts meta_catalog, not cleanup |
| DOT-308 | dot-cron-pivot-setup | published | – | – | partial | cron mgmt |
| DOT-312 | dot-matrix-declare | published | create | DOT-315 | complete | INSERT matrix pivot |
| DOT-313 | dot-matrix-update | published | update | DOT-315 | complete | UPDATEs matrix_spec/name only |
| DOT-314 | dot-matrix-retire | published | delete | DOT-315 | complete | UPDATE is_active=false |
| DOT-315 | dot-matrix-health | published | health | 312/313/314 | complete | cron health |
| DOT-116 | dot-misclass-scanner | active | – | – | partial | classification.species scanner |
| DOT-123/145/146 | label/species map/register | active | – | – | partial | classification vocab |
Write-path risk on pivot_definitions (3 enabled triggers, tgenabled='O')
| Trigger | Timing | Fires on | Effect |
|---|---|---|---|
trg_after_pivot_definitions_change |
AFTER, STATEMENT | INSERT/UPDATE/DELETE | trg_pivot_def_refresh() (refresh) |
trg_birth_pivot_definitions |
AFTER, ROW | INSERT only | fn_birth_registry_auto('code') (writes birth_registry) |
trg_matrix_config_changed |
AFTER, ROW | INSERT/UPDATE WHEN matrix_spec IS NOT NULL | fn_matrix_config_changed() (matrix events) |
Implication: a targeted UPDATE of composition_level on the 3 Action-A rows (matrix_spec NULL) fires only the statement-level refresh trigger — the birth trigger is INSERT-only, the matrix trigger is gated off. This bounds the side effects of any future lawful dot-pivot-update.
Preflight verdict
✅ DB=directus, view present at 37 rows, all breakdowns at baseline, L2 gate CLOSED, idle_in_tx=0, triggers characterized, DOT surfaces enumerated, entry fingerprint captured. No mutation performed. Gate 0 PASSED — proceed read-only.