KB-3F74

IU-0 Pack 2A — Context Graph Gate Application

5 min read Revision 1
iu-0pack-2acontext-graph-gatedieu20dieu43

IU-0 Pack 2A — Context Graph Gate Application

Date: 2026-05-04 Điều 20 §0 + Đ43: bắt buộc đọc context graph trước design không nhỏ Context pack build: 20260504-040018-372b48 (cron, 2026-05-04T04:00:22Z)


§1. Context Pack Used

Build ID: 20260504-040018-372b48 | Generated: 2026-05-04T04:00:22Z | Trigger: cron


§2. Evidence từ 5 files

PROJECT_MAP.md

  • 41 enacted laws, 289 active DOTs, 72,670 entities, 38 species, 4 databases
  • 275 open critical issues
  • Pack 2A impact: thêm 2 rows vào collection_registry (72,670 → 72,672). Minimal footprint.

LAWS_INDEX.md

  • Watch patterns: knowledge__dev__laws__%, knowledge__dev__ssot__%, knowledge__dev__architecture__%
  • Pack 2A design docs nằm trong knowledge__dev__laws__dieu44-trien-khai__* → context pack sẽ detect thay đổi.

DOT_REGISTRY.md

  • 289 active DOTs. Tier A: 51, Tier B: 219.
  • Pack 2A sử dụng DOTs đã registered: DOT_COLLECTION_REGISTER, DOT_COLLECTION_HEALTH, DOT_SCHEMA_TRIGGER_REGISTRY_ENSURE.

DB_MAP.md

  • 4 databases: directus (warehouse, 423MB), incomex_metadata (brain-store, 106MB), postgres (cluster-admin), workflow.
  • Pack 2A chỉ write vào directus DB qua Directus API (dot-collection-register). Không touch incomex_metadata/workflow/postgres.

RED_ZONES.md

  • "No ALTER TABLE trực tiếp" — Pack 2A không DDL ✅
  • "No manual INSERT/UPDATE vào kb_documents" — Pack 2A không touch KB ✅
  • "No built-in renderer fallback" — N/A ✅
  • "No case-dispatch per section" — N/A ✅
  • Không có red zone nào Pack 2A vi phạm.

§3. Domain/Law Resolver

Luật Liên quan Pack 2A Status
Đ2 Registry Đăng ký IU vào collection_registry Compliant — dùng DOT tool
Đ3 Metadata/Description Description theo §A.3 Collection format Compliant — đã soạn đúng form
Đ4 Birth Tạo qua DOT, không code trực tiếp Compliant — dot-collection-register
Đ7 Assembly First Writes qua Directus API Compliant
Đ14 No Duplicate Preflight check duplicate Compliant — Phase 1 verify
Đ20 v1.2 / NT15 Design trước execution, CGG Compliant — file 12 + 12a + 12b
Đ35 DOT Governance v5.2 Dùng registered DOT tools Compliant
Đ36 Collection Protocol dot-collection-register = GP1 tool Compliant
Đ43 System Context Context pack đã đọc Compliant — 12b này
Đ44 IU governance_role = observed (pilot) Compliant

§4. DOT/Tool Resolver

Tool Role trong Pack 2A Status dot_tools
dot-collection-register Đăng ký 2 collections Active, DOT_COLLECTION_REGISTER
dot-collection-health Verify sau đăng ký Active, DOT_COLLECTION_HEALTH
dot-schema-trigger-registry-ensure Sync IU triggers vào trigger_registry Active, DOT_SCHEMA_TRIGGER_REGISTRY_ENSURE
dot-trigger-guard Verify trigger governance Active, 2 event triggers

§5. DB/Runtime Resolver

Object DB Current state Pack 2A action
information_unit directus Table exists, 0 rows, MISSING collection_registry Register via DOT
unit_version directus Table exists, 0 rows, MISSING collection_registry Register via DOT
collection_registry directus 138+ rows, 9 triggers Target của DOT write
birth_registry directus Auto-populated by triggers Will auto-create row for new COL-*
meta_catalog directus Not touched by Pack 2A
directus_collections directus IU NOT present Pack 2A does NOT expose to Directus
dot_config description keys directus desc_template_collection_registry exists, min_length=30 Read-only reference
trigger_registry directus 107 rows dot-schema-trigger-registry-ensure will sync IU triggers
trigger_guard_* directus Whitelist-by-exception model dot-trigger-guard verify

§6. Red Zones cho Pack 2A

Red Zone Enforcement
Không raw SQL INSERT/UPDATE/DELETE vào registry DOT tools only
Không DDL Không CREATE/ALTER/DROP
Không Directus exposure Không gọi Directus API tạo managed collection
Không Pack 2B/2C Hard stop sau report
Không CRUD/IU production rows 0 INSERT vào information_unit/unit_version
Không vector/outbox Không Qdrant, không outbox table
Không unsupported tool params Preflight verify source_kind whitelist trước write

§7. Unknowns

# Unknown Disposition
1 source_kind native accepted by tool? Preflight Phase 1 verify → STOP nếu reject
2 Species cho IU Follow-up trước governed. Không blocking Pack 2A observed
3 Description provenance PROV-AI TD riêng. Pack 2A = PROV-DOT birth/basic
4 Rollback unregister Forward-only + --update. Full unregister = design riêng
5 275 open critical issues Pre-existing. Pack 2A không làm tệ thêm

CGG Verdict: PASS — Pack 2A không vi phạm red zone nào, dùng đúng DOT tools đã registered, scope minimal.

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/design/12b-iu0-pack2a-context-graph-gate-application.md