KB-1977

KG/dot-kg Discovery — 01 Live State & SSOT Confirmation

6 min read Revision 1
kgdot-kglive-statessot2026-06-04

01 — Live State & SSOT Confirmation

All numbers verified live 2026-06-04 via query_pg (RO) and ssh contabo → docker exec postgres psql -U directus (RW). Old reports treated as evidence; live wins.

Execution mode

EXECUTION_MODE. RO read channel (query_pg) + RW apply channel (ssh→docker psql, role directus, confirmed) + KB authoring (upload_document). No external-authority block for the safe/additive branches taken.

Safety baseline (verified)

check live value required ok
births (birth_registry) 1,158,132 (== before == after) net-zero
AX-PROCESS status CANDIDATE not active
AX-TOPIC status CANDIDATE not active
FAC-08 taxonomy nodes (taxonomy facet 9) 0 0
fn_process_node_substrate present present
workflows born 2 (WF-001/002) unchanged
approvals approved this macro 0 0
dot-kg DOTs executed this macro 0 0

The 36-vs-18 reconciliation (decisive)

  • Live: SELECT count(*) FROM dot_tools WHERE code LIKE 'DOT_KG_%'36, all status=active.
  • Law (Điều 39 v2.3 header): "26 bài toán | 36 DOT (18 cặp) | 10 quy trình". §7 gives the full 18-pair producer/verifier matrix.
  • Prior reports / memory: "18 dot-kg-* DOTs." → This counted pairs, not DOTs. Corrected: 36 DOTs = 18 pairs.

Trigger / pairing structure (live)

  • 36 DOTs: 15 cron + 18 on-demand + 3 dual. All 36 have a non-null paired_dot. 0 ever executed (last_executed all NULL). extra_metadata.execution_engine = 'pg_function'; script_path/file_path NULL.
  • Cấp B (producer) = the 18 on-demand DOTs; Cấp A (verifier) = the 15 cron + 3 dual DOTs. Live paired_dot matches the law's §7 matrix exactly (e.g. EXTRACT↔COMPLETENESS, DISCOVER_PROPOSE↔CONSTRAINT_CHECK, OVERRIDE_LOG↔OVERRIDE_AUDIT).
  • 10 sub-domains (live domain column): kg.formation(6), kg.governance(6), kg.business(6), kg.quality(4), kg.priority(4), kg.conversational(2), kg.eviction(2), kg.explain(2), kg.learning(2), kg.scaffold(2).
    • Drift note: these dotted domains are a live-DB grouping only. The law uses flat DOT-KG-{ACTION} naming + 10 lettered processes A–J, never dotted namespaces. The domain column is an implementation overlay, not law text.

The orphan finding (engine-confirmed)

v_axis_process_inventory lists 18 dot-kg rows — and they are exactly the 18 Cấp A (cron/dual) verifiers. The 18 Cấp B (on-demand) producers are absent, because the inventory filters trigger_type IN ('cron','event','dual','on-deploy') and drops on-demand. Verified by join: all 18 on-demand → in_inventory=false / producer; all 18 cron+dual → in_inventory=true / verifier. Each inventory row also has component_count=1, so the inventory recognises neither the 18 pairs nor the single A–J loop — it sees 18 unrelated singletons.

This generalises: system-wide there are 103 DOT_* DOTs, 0 ever executed; 30 are on-demand (inventory-invisible) and ~46 have NULL trigger (also excluded). The KG case is the cleanest, highest-evidence instance.

KG content side (live)

  • 16 IUs = all sections of knowledge/dev/laws/dieu39-knowledge-graph-law.md (unit_kind=law_unit, all lifecycle_status=draft). Section types span heading/section/process/technical_spec/governance_process/principle/reference_mapping/open_decision_list/changelog.
  • IU 10649925 = #7-36-dot-kg (section_type=technical_spec) — the textual bridge to the 36 DOTs.
  • knowledge_graph topic candidate tags 10 of the 16 IUs (the convergence hub on both axes).
  • v_information_piece_topic_process_map LIVE, 11 relations; KG↔KG_DOT_CLUSTER relation_class SHARED_IU+DOMAIN.

Process substrate (live)

  • dot_iu_command_run (run history): columns run_id, command_name, category, run_mode, run_status, mutating, params_digest, gate_snapshot, evidence, actor, created_at. 55 rows total, 0 reference dot-kg. Has a per-command run_id but no cross-DOT process_run_id/correlation_id.
  • job_queue (Type-2 runtime): rich correlation — run_id, idempotency_key, source_ref, target_ref, payload_ref, …. 13 rows, all cut.*, 1 shared run_id groups 6 jobs (one completed run). This is the system's only candidate with true runtime + cross-component correlation.
  • event_type_registry: 0 KG events registered (gap).
  • AX-PROCESS pilot substrate from prior macro LIVE: v_axis_process_inventory(60), v_axis_process_candidates(58), v_axis_process_governance_gap(4 OWNER_MISSING), v_axis_process_pivots(PIV-340..353), fn_process_node_substrate.

Bottom line

The pilot domain is real and rich on structure (36 DOTs, 18 governed pairs, a 10-step law, 16 IUs) but empty on runtime (0 executions, 0 KG events, 0 cross-DOT correlation). Discovery must score it on structural evidence and flag the runtime gap honestly — which the live engine does (dot:kg = strong_candidate_structural, not "verified").

Back to Knowledge Hub knowledge/dev/reports/architecture/kg-dot-process-discovery-and-document-building-pilot-2026-06-04/01-live-state-and-ssot-confirmation.md