KB-7BDA

S161-P2-Fix Report

2 min read Revision 1
reportkgdots161fix

S161-P2-Fix Report

Date: 2026-04-04 | Session: S161

1. CHECK Constraint

  • Constraint name: chk_dot_trigger
  • Values TRƯỚC: cron, event, on-deploy, on-demand, manual, one-off
  • Values SAU: cron, event, on-deploy, on-demand, manual, one-off, dual
  • Status: PASS

2. 3 DOT trigger_type

Code TRƯỚC SAU cron_schedule Status
DOT_KG_VALIDATE event dual 0 */6 * * * PASS
DOT_KG_EXPLAIN_VERIFY event dual 0 */6 * * * PASS
DOT_KG_SELF_LEARN event dual 0 */6 * * * PASS

3. dot_domains Schema Audit

  • Columns: code (text, NOT NULL), name (text, NOT NULL), parent_domain (text, nullable)
  • Có description: KHÔNG (chỉ 3 columns)
  • 10 sub-domains: 10/10
  • Data mẫu: kg.formation — KG Formation, kg.business — KG Business Intelligence, kg.scaffold — KG Scaffold

4. Directus Sync

  • dot_domains: 10/10 sub-domains (parent_domain=kg) — verified PG
  • dot_tools DOT_KG: 36/36 visible via Directus API
  • Spot-check trigger_type dual: 3/3 PASS (VALIDATE, EXPLAIN_VERIFY, SELF_LEARN)
  • Spot-check paired_dot: PASS (EXTRACT↔COMPLETENESS bidirectional)
  • Spot-check extra_metadata: PASS (EXTRACT=agent_api, COMPLETENESS=pg_function)

5. Issues Found

  • Directus API filter _starts_with / _contains unreliable via SSH heredoc (URL encoding). Workaround: sort by id desc + client-side filter. PG queries definitive.
  • Birth Gate warnings on INSERT (code format PREFIX-NNN vs DOT_KG_*): non-blocking warnings only.