KB-2879 rev 2

E7 D4 Execution Gate v0.2 — Register 19 DOT-TAC-*

10 min read Revision 2

E7 D4 — Register 19 DOT-TAC-* Execution Gate (v0.2)

Phase: P9 Entry Gate, E7 D4 Trạng thái: DRAFT v0.2 — Domain FK remediated. Chờ GPT gate. Phiên: S183 | Ngày: 2026-04-27 Prerequisite: E7 D1–D3 PASS (v0.2 with FK domain validation) v0.1 blocker: domain FK "tac.*" not in vocabulary → FAIL. Remediated: mapped to existing domains. Scope: dot_tools INSERT ONLY (19 rows). Không taxonomy/labels/system_issues/P9.


1. Mục tiêu

POST 19 DOT-TAC-* vào dot_tools qua Directus API. Verify 19 rows. STOP.

2. Ràng buộc tuyệt đối

  1. CHỈ INSERT vào dot_tools. Không collection nào khác.
  2. CHỈ 19 rows đúng payload §4. Không thêm/bớt.
  3. Mọi domain value PHẢI tồn tại trong FK vocabulary (validated v0.2).
  4. KHÔNG tạo taxonomy_facets/labels/entity_labels/system_issues.
  5. KHÔNG chạy P9. KHÔNG implement DOT scripts. KHÔNG activate cron.
  6. Nếu bất kỳ POST fail → STOP + report partial state.
  7. Không retry/DELETE tự động. Rollback = gate riêng.
  8. Gateway: Directus API. Cấm SQL/UI.

3. Actor / Gateway Guard

  • Actor: Opus via Directus MCP. GPT không execute.
  • Logging: mỗi POST log timestamp, code, HTTP status, response ID.

4. Full Payload v0.2 (19 rows × 11 fields, FK-valid domains)

Shared: coverage_status = "partial", _dot_origin = "dot-dot-register|E7|S183", status = "active".

B-tier (7)

[
  {"code":"DOT-TAC-SCHEMA-ENSURE","name":"TAC Schema Ensure","description":"[B] Ensure tac_* tables exist in public schema. Paired: DOT-TAC-SCHEMA-VERIFY.","domain":"infrastructure.schema","operation":"ensure","trigger_type":"on-deploy","paired_dot":"DOT-TAC-SCHEMA-VERIFY","cron_schedule":null,"coverage_status":"partial","_dot_origin":"dot-dot-register|E7|S183","status":"active"},
  {"code":"DOT-TAC-COLLECTION-REGISTER","name":"TAC Collection Register","description":"[B] Register tac_* Directus collections. Paired: DOT-TAC-COLLECTION-VERIFY.","domain":"collection","operation":"register","trigger_type":"on-deploy","paired_dot":"DOT-TAC-COLLECTION-VERIFY","cron_schedule":null,"coverage_status":"partial","_dot_origin":"dot-dot-register|E7|S183","status":"active"},
  {"code":"DOT-TAC-ROLE-ENSURE","name":"TAC Role Ensure","description":"[B] Ensure tac-agent/tac-admin roles in Directus. Paired: DOT-TAC-ROLE-VERIFY.","domain":"infrastructure.deploy","operation":"ensure","trigger_type":"on-deploy","paired_dot":"DOT-TAC-ROLE-VERIFY","cron_schedule":null,"coverage_status":"partial","_dot_origin":"dot-dot-register|E7|S183","status":"active"},
  {"code":"DOT-TAC-BIRTH-GATE","name":"TAC Birth Gate","description":"[B] Validate new logical_unit/unit_version at INSERT. Paired: DOT-TAC-BIRTH-VERIFY.","domain":"data_quality","operation":"gate","trigger_type":"event","paired_dot":"DOT-TAC-BIRTH-VERIFY","cron_schedule":null,"coverage_status":"partial","_dot_origin":"dot-dot-register|E7|S183","status":"active"},
  {"code":"DOT-TAC-SEGMENTER","name":"TAC Segmenter","description":"[B] Segment documents into logical units. Paired: DOT-TAC-SEG-VERIFY.","domain":"kb","operation":"segment","trigger_type":"on-demand","paired_dot":"DOT-TAC-SEG-VERIFY","cron_schedule":null,"coverage_status":"partial","_dot_origin":"dot-dot-register|E7|S183","status":"active"},
  {"code":"DOT-TAC-VECTOR-SYNC","name":"TAC Vector Sync","description":"[B] Sync unit versions to Qdrant vectors. Paired: DOT-TAC-VECTOR-VERIFY.","domain":"infrastructure.sync","operation":"sync","trigger_type":"cron","paired_dot":"DOT-TAC-VECTOR-VERIFY","cron_schedule":null,"coverage_status":"partial","_dot_origin":"dot-dot-register|E7|S183","status":"active"},
  {"code":"DOT-TAC-LABEL-SYNC","name":"TAC Label Sync","description":"[B] Sync labels to entity_labels via Đ24. Paired: DOT-TAC-LABEL-VERIFY.","domain":"classification.label","operation":"sync","trigger_type":"on-demand","paired_dot":"DOT-TAC-LABEL-VERIFY","cron_schedule":null,"coverage_status":"partial","_dot_origin":"dot-dot-register|E7|S183","status":"active"}
]

A-tier (12)

[
  {"code":"DOT-TAC-SCHEMA-VERIFY","name":"TAC Schema Verify","description":"[A] Verify tac_* tables exist and match P5 schema.","domain":"infrastructure.schema","operation":"verify","trigger_type":"cron","paired_dot":null,"cron_schedule":"0 7 * * *","coverage_status":"partial","_dot_origin":"dot-dot-register|E7|S183","status":"active"},
  {"code":"DOT-TAC-COLLECTION-VERIFY","name":"TAC Collection Verify","description":"[A] Verify Directus collections for tac_* tables.","domain":"collection","operation":"verify","trigger_type":"cron","paired_dot":null,"cron_schedule":"30 7 * * *","coverage_status":"partial","_dot_origin":"dot-dot-register|E7|S183","status":"active"},
  {"code":"DOT-TAC-ROLE-VERIFY","name":"TAC Role Verify","description":"[A] Verify tac-agent/tac-admin roles and permissions.","domain":"infrastructure.deploy","operation":"verify","trigger_type":"cron","paired_dot":null,"cron_schedule":"45 7 * * *","coverage_status":"partial","_dot_origin":"dot-dot-register|E7|S183","status":"active"},
  {"code":"DOT-TAC-BIRTH-VERIFY","name":"TAC Birth Verify","description":"[A] Verify birth gate trigger active and config valid.","domain":"data_quality","operation":"verify","trigger_type":"cron","paired_dot":null,"cron_schedule":"0 6 * * *","coverage_status":"partial","_dot_origin":"dot-dot-register|E7|S183","status":"active"},
  {"code":"DOT-TAC-SEG-VERIFY","name":"TAC Segmentation Verify","description":"[A] Verify segmentation results: orphans, gaps, overlaps.","domain":"kb","operation":"verify","trigger_type":"cron","paired_dot":null,"cron_schedule":"0 8 * * *","coverage_status":"partial","_dot_origin":"dot-dot-register|E7|S183","status":"active"},
  {"code":"DOT-TAC-DAILY-INVARIANT","name":"TAC Daily Invariant","description":"[A] Run P5/P5b invariant checks on all enacted units.","domain":"data_quality","operation":"check","trigger_type":"cron","paired_dot":null,"cron_schedule":"0 3 * * *","coverage_status":"partial","_dot_origin":"dot-dot-register|E7|S183","status":"active"},
  {"code":"DOT-TAC-ENACT-GATE","name":"TAC Enactment Gate","description":"[A] Pre-enactment validation before draft to enacted.","domain":"governance.approval","operation":"gate","trigger_type":"event","paired_dot":null,"cron_schedule":null,"coverage_status":"partial","_dot_origin":"dot-dot-register|E7|S183","status":"active"},
  {"code":"DOT-TAC-HASH-DRIFT","name":"TAC Hash Drift Check","description":"[A] Detect content_hash drift on enacted unit versions.","domain":"data_quality","operation":"check","trigger_type":"cron","paired_dot":null,"cron_schedule":"0 4 * * 0","coverage_status":"partial","_dot_origin":"dot-dot-register|E7|S183","status":"active"},
  {"code":"DOT-TAC-VECTOR-VERIFY","name":"TAC Vector Verify","description":"[A] Verify vector parity with enacted unit versions.","domain":"infrastructure.sync","operation":"verify","trigger_type":"cron","paired_dot":null,"cron_schedule":null,"coverage_status":"partial","_dot_origin":"dot-dot-register|E7|S183","status":"active"},
  {"code":"DOT-TAC-LABEL-VERIFY","name":"TAC Label Verify","description":"[A] Verify entity_labels consistency with unit metadata.","domain":"classification.label","operation":"verify","trigger_type":"cron","paired_dot":null,"cron_schedule":"0 9 * * *","coverage_status":"partial","_dot_origin":"dot-dot-register|E7|S183","status":"active"},
  {"code":"DOT-TAC-LABEL-FACET-VERIFY","name":"TAC Label Facet Verify","description":"[A] Verify required facets (FAC-07/08/09) exist in taxonomy.","domain":"classification.label","operation":"verify","trigger_type":"on-demand","paired_dot":null,"cron_schedule":null,"coverage_status":"partial","_dot_origin":"dot-dot-register|E7|S183","status":"active"},
  {"code":"DOT-TAC-LABEL-FORMAT-VERIFY","name":"TAC Label Format Verify","description":"[A] Verify canonical_address matches D38 regex contract.","domain":"classification.label","operation":"verify","trigger_type":"on-demand","paired_dot":null,"cron_schedule":null,"coverage_status":"partial","_dot_origin":"dot-dot-register|E7|S183","status":"active"}
]

5. Pre-flight (ngay trước POST)

  1. Re-verify DOT-TAC-* = 0 in dot_tools
  2. Re-verify API healthy
  3. Confirm 19 payloads = §4 v0.2
  4. NEW v0.2: Confirm all domain values ∈ FK vocabulary

Nếu bất kỳ fail → STOP.

6. Execution

POST 19 items tuần tự (7 B-tier, 12 A-tier). After each: verify HTTP 200/201, code/status match. Fail → STOP.

7. Post-verify

GET DOT-TAC-* → expect 19 items, all active, all fields match. Paired consistency 7/7.

8. Rollback: STOP + report. No auto-DELETE. Gate riêng.

9. Action Log: reports/p9-e7-dot-register-log-2026-04-27.md

10. Scope Exclusions: taxonomy_facets ❌, taxonomy_labels ❌, entity_labels ❌, system_issues ❌, P9 ❌, DOT scripts ❌, cron activation ❌, DELETE ❌.


Patch log v0.1 → v0.2

# Issue Fix
1 domain FK "tac.*" invalid ✅ Remapped to 7 existing FK-valid domains
2 D2 dry-run missing FK validation ✅ Added criterion #11: all domain ∈ FK vocabulary
3 Failed attempt not logged ✅ Failed attempt log uploaded KB

E7 D4 Execution Gate v0.2 | S183 | 2026-04-27 | Opus 4.6 v0.1 FAIL (domain FK) → v0.2 remediated Chờ GPT gate