KB-5898
Trigger Guard + Đ26 P3 — DEPLOYED
3 min read Revision 1
reporttrigger-guardd26dot-3162026-04-05
Trigger Guard + Đ26 P3 — Report
Date: 2026-04-05 | Status: ✅ DEPLOYED
Việc 1 — Trigger Guard (DOT-316)
PG Tables
| Table | DB | Rows |
|---|---|---|
trigger_guard_config |
directus | 320 |
trigger_guard_config |
incomex_metadata | 5 |
trigger_guard_alerts |
both | 0 (clean) |
DOT-316 dot-trigger-guard
- Tier: A (critical monitoring)
- Cron: daily 3:15 AM UTC
- Paired: DOT-KB-PROTECT, DOT-PIVOT-HEALTH, DOT-GOV-VERIFY
- Logic: pg_trigger vs trigger_guard_config → mismatch = alert
- Auto-discovery: new triggers auto-added to config
- Registration: dot_tools DOT-316 (271 total DOTs)
- VPS git: commit
bdd46ea
First run result
✅ 0 mismatches (incomex_metadata)
✅ 0 mismatches (directus)
RESULT: ✅ ALL TRIGGERS MATCH CONFIG
Việc 2 — Đ26 P3
Root cause: trg_auto_sync_registry_counts DISABLED
- Trigger fires on INSERT to meta_catalog → syncs to v_registry_counts
- Likely disabled during bulk data operations and never re-enabled
- Safe to enable: only fires on INSERT, lightweight function
Fix applied
ALTER TABLE meta_catalog ENABLE TRIGGER trg_auto_sync_registry_counts- Updated trigger_guard_config: expected_enabled=TRUE
dot-pivot-health result
H1: pivot_count() ........... ✅ PASS (35 rows)
H2: All counts non-negative . ✅ PASS
H3: source_objects exist .... ✅ PASS (35/35)
H4: meta_catalog coverage .. ⚠️ WARN (126 entries missing pivot — data completeness, not broken)
H5: Orphan pivots .......... ✅ PASS (0 orphans)
H6: Duplicate detection .... ⚠️ WARN (4 duplicates — pre-existing)
H7: Count cross-check ...... ✅ PASS (23/23 match)
H8: L1 Integrity ........... ✅ PASS (ALL NOT NULL)
6/8 PASS, 2 WARNING (data completeness, not functionality)
Đ26 status
- Core pivot: ✅ 100% functional (pivot_count, refresh, cron, Nuxt)
- H4+H6 warnings: Data quality TDs — 126 meta_catalog entries without pivot + 4 duplicates
- Trigger guard: ✅ Protects against future disable
Trigger Guard deployed | Đ26 P3 enabled | 271 DOTs | 325 triggers protected