KB-7ADB

Endgame Campaign — 06 KG Vocab / DOT / Projection Hardening

3 min read Revision 1
kgiu-relationv-kg-edges-allvocabdotdieu39universal-edgesno-second-sot2026-05-28

06 — KG Vocab / DOT / Projection Hardening — Result

Result: VERIFIED + exact next step. KG enrichment columns are live and fully populated; the relation vocab is a 6-value CHECK (not a table); the operational DOT-callable relation enrichment is specified as apply-ready (not committed — see §4). No second SoT, vector stays off.

1. v_kg_edges_all semantics (verified, 17 cols)

edge_source, edge_id, source_ref, source_collection, target_ref, target_collection, edge_type, edge_subtype, status, confidence, valid_time, provenance, metadata, created_by, created_at, assertion_mode, evidence.

  • security_invoker read-only UNION: enriched iu_relation (60, uuid-native) + universal_edges (2199, integer-keyed). 2259 edges, no SoT duplication.
  • assertion_mode + evidence (cols 16-17) projected — confirmed live (added in the prior superbundle, append-only CREATE OR REPLACE).

2. iu_relation live state

  • 60 rows, all relation_type='contains', all have provenance and assertion_mode populated (Điều 39 provenance-or-quarantine satisfied; backfilled prior bundle).
  • Vocab CHECK = {contains, derived_from, supersedes, replaced_by, merged_from, split_from} (6 lifecycle/structural types). This is the live enforced vocab.
  • Reconciliation: the conceptual KG atom vocab (IDENTITY / BELONGS_TO / CONTAINS / DEPENDS_ON / USED_BY / TRANSITIVE / PEERS / SIMILAR) is a design vocab; only contains is live. Expanding the live CHECK is DROP CONSTRAINT … ; ADD CONSTRAINT … CHECK(…) — deferred (governance + information-atom-law: each new edge type needs an atom-rule justification).

3. DOT surface today

  • dot_iu_kg_edge_audit (catalog #53, STABLE) exists — read/audit of enriched edges + fn_iu_kg_edge_audit().
  • No DOT-callable mutating relation insert/update wrapper yet.

4. Apply-ready (NOT committed this campaign — discipline)

Operational enrichment needs a governed mutating wrapper fn_iu_kg_relation_upsert(...) + catalog row (category=write, mutating=true) enforcing: vocab membership, Điều 39 provenance-or-quarantine (reject NULL provenance), assertion_mode set, self-edge reject (source<>target), and write-gate allowlist (dot_config.iu_create.gateway.allowed_marker_values). Deferred because: (a) adding a mutating DOT command is a heavier governance step than this campaign's inert-additive commits warrant; (b) the vocab-expansion decision (which edge types to allow) is an atom-law governance call. Commit it together with the vocab expansion under an explicit Điều 39 clause. Prompt 6 (doc 11) carries the full spec.

5. universal_edges bridge — FINAL direction

Keep iu_relation (uuid-native IU edges) and universal_edges (integer-keyed legacy) as separate SoTs, unified ONLY by the read-only v_kg_edges_all projection. Do NOT migrate IU edges into universal_edges (would create a hidden second SoT and lose uuid identity). This is the standing decision; no change needed.

Back to Knowledge Hub knowledge/dev/reports/architecture/endgame-iu-pilot-to-4mothers-readiness-campaign-2026-05-28/06-kg-vocab-dot-hardening.md