KB-2E25
RP Classification Cleanup + View Apply — 00 Readme First
5 min read Revision 1
registries-pivotgovernanceclassificationmapping-view2026-06-03view-appliedreadme
REGISTRIES_PIVOT_CLASSIFICATION_CLEANUP_AND_VIEW_APPLY — 00 Readme First
Date: 2026-06-03
Status: ✅ PASS
Headline: v_rp_classification_governance_map is APPLIED LIVE in production (directus). Registries-Pivot moved from diagnosis → usable governed-classification operation, with 0 base-table mutations and the L2 governance gate left CLOSED.
What happened
- Re-verified live state (read-only): RP live (pivot_definitions=37, pivot_results=126), L1 governance live (taxonomy_facets=10, taxonomy=58, entity_species=42, label_rules=38, entity_labels=824,230), L2 gated (ospa=0, ownership=0, gap=210, axis+topic ABSENT, gov_emit=0).
- Applied the mapping view
v_rp_classification_governance_mapto prod viasshin a fail-closed guarded transaction (guards: rows=37, orphan=0, domain=15, shape=22 — all passed, then COMMIT). - Proved entry==exit: every out-of-scope counter identical;
pivot_definitionscontent fingerprint byte-identical (md5=5a060f5460c3d9e02c4a6754cdee4fccentry and exit). The only delta is the new read-only view object. - Tested rollback non-destructively (DROP inside a transaction → view absent → ROLLBACK → view restored). Rollback DDL is valid and the view remains in place.
- Built the full cleanup plan, the Đ26/DOT-compliant cleanup path, the verification/regression suite, the UI/API read contract, and the next-RP implementation plan.
Two category-error corrections (surfaced as derived columns — no schema change)
| # | Error | Correction (view columns) |
|---|---|---|
| 1 | registry_group conflates DOMAIN (Vietnamese → governed FAC-02) with PIVOT-SHAPE (English → RP-local) |
registry_group_kind (domain=15 / pivot_shape=22), fac02_label_code+fac02_label_name (9 exact), pivot_kind |
| 2 | composition_level overloaded as DRILL-DEPTH on RP-local pivots vs entity composition on governed-home pivots |
composition_status = match(21) / mismatch(3 real bugs) / drill_overload(9) / no_ref(4) |
Document map
| Doc | Content |
|---|---|
01-state-recovery-and-live-preflight.md |
Full state recovery + Hard Gate 0 live preflight evidence |
02-mapping-view-apply-or-block.md |
Apply decision, guarded DDL, verification, entry==exit proof, rollback test |
03-classification-cleanup-plan.md |
Per-row cleanup plan for all dirty/mismatch/ambiguous/missing cases |
04-dot-compliant-cleanup-path.md |
Đ26/DOT lawful cleanup mechanism + exact DOT packet (no manual UPDATE) |
05-verification-and-regression-suite.md |
V1–V10 read-only verification suite + expected values |
06-ui-api-read-contract.md |
Read contracts, badges, L2-gate banner, JSON examples |
07-next-rp-implementation-plan.md |
Commit-now vs DOT-mediated vs L2-waiting; anti-drift schema plan |
08-final-go-nogo.md |
Final GO/NO-GO matrix + forbidden-compliance |
09-self-review.md |
Self-review against completion criteria |
SQL artifacts (local): /Users/nmhuyen/one-roof-clone-finalization-2026-06-03/sql/rp_classification/
v_rp_classification_governance_map.sql(canonical DDL)apply_guarded.sql(transactional fail-closed apply — what was actually run)rollback_v_rp_classification_governance_map.sql(DROP VIEW)verify_v_rp_classification_governance_map.sql(V1–V10)
Hard boundaries honored
- ❌ No Governance L2 rollout. L2 gate still CLOSED (ospa=0). The view does not touch ownership/axis/topic/ospa.
- ❌ No manual UPDATE/INSERT/DELETE to pivot_definitions (Đ26 §II-QUINQUIES "KHÔNG INSERT tay"; 3 side-effect triggers).
- ❌ No DOT execution, no event emit, no system_issues write, no Directus/Nuxt/Qdrant mutation, no law/version change.
- ✅ No governance island: the view joins governed truth (entity_species, taxonomy) and copies nothing.
- ✅ No claim that production governance gap=0 (gap=210, real).
ONE remaining blocker (unchanged): human L2/L4 ratification (ospa≥1) — blocks ONLY L2 rollout, NOT L1 classification operation, which is live and now usable via this view.
Next macro: REGISTRIES_PIVOT_CLASSIFICATION_DOT_CLEANUP_AND_ANTIDRIFT (execute the DOT packet at owner-go; design domain_facet/pivot_kind/drill_level schema split). See doc 07.