07 — Điều 45 v0.2.1 Cleanup Patch (metadata + council wording + MOT boundary)
07 — Điều 45 v0.2.1 Cleanup Patch (metadata + council wording + MOT boundary)
Date: 2026-05-26 Scope: Small cleanup patch following v0.2 DRAFT review. KHÔNG đổi substance luật; chỉ sửa 3 hạng mục an toàn trước Council/User approval. Law file revision: v0.2 (rev 9) → v0.2.1 (rev 16). Status: v0.2.1 DRAFT — CHƯA BAN HÀNH. User approval còn yêu cầu (
enactment_approved=false). Mutation footprint: 100% law-drafting + KB metadata. KHÔNG DDL/DML/migration/event_outbox/Qdrant/production_documents/START-HERE/alias touch.
§1. Ba hạng mục cleanup
| Fix | Mô tả | Vị trí trong luật |
|---|---|---|
| F1 | KB metadata/title/tags không còn nói "v0.1" — nay thống nhất v0.2.1 DRAFT | Document-level metadata (title + tags) |
| F2 | Council wording an toàn hơn: council_round_1_gpt_patch_applied=true (không phải _approved) + enactment_approved=false + user_approval_required=true |
§22 verification block |
| F3 | MOT không bao giờ là executor — loại future_MOT_executor khỏi §11.5 enumeration; §13.4 codify MOT.is_executor=false + role triple + permitted/forbidden labels |
§11.5 + §13.4 |
§2. F1 — Metadata/title/tags sync
§2.1 Trước
KB_metadata_v0_2:
title: "Điều 45 — … — v0.1 DRAFT" # nói dối; body đã v0.2
tags:
- law
- dieu-45
- …
- v0.1 # nói dối
- council-review-pending
§2.2 Sau
KB_metadata_v0_2_1:
title: "Điều 45 — Luật Hàng Đợi & Điều Phối Tác Vụ PG-native (PG-Native Queue & Task Orchestration Law) — v0.2.1 DRAFT"
tags:
- law
- dieu-45
- queue
- task-orchestration
- pg-native
- outbox
- trigger-in
- trigger-out
- draft
- v0.2.1 # current
- v0.2-draft # query convenience
- council-review-round-1-addressed
- council-review-pending-round-2
- user-approval-required
§2.3 Lý do
- Title trong list_documents là cái Council/User đọc trước khi bấm vào file. Nếu title nói "v0.1" họ sẽ tin v0.1 đang là current — gây nhầm lẫn trên surface duyệt luật.
- Tag
v0.1nếu giữ sẽ làm filtertag:v0.2-draftbỏ qua file này. council-review-pendingmơ hồ (Round nào?); thay bằngcouncil-review-round-1-addressed+council-review-pending-round-2.user-approval-requiredrõ ràng cho human reader.
§3. F2 — Council wording an toàn
§3.1 Trước (v0.2)
version=v0.2
council_round_1_gpt_approved=true # ⚠ ngầm hiểu BAN HÀNH approval
council_round_2_gemini_approved=false
council_approved=false
§3.2 Sau (v0.2.1)
version=v0.2.1
council_round_1_gpt_patch_applied=true # GPT Round 1 review đã được address
council_round_1_gpt_review_addressed=true
council_round_2_gemini_review_addressed=false
council_approved=false
enactment_approved=false # explicit không BAN HÀNH
user_approval_required=true # explicit user gate
§3.3 Lý do
_approvedngầm hiểu là phê duyệt BAN HÀNH. Thực tế GPT Round 1 chỉ là review + patch suggest; Claude đã apply patch nhưng GPT KHÔNG có quyền BAN HÀNH luật.- Council Round 1 outcome = "review đã được address bằng patch v0.2" — wording an toàn hơn là
_patch_applied. - Thêm
enactment_approved=false+user_approval_required=trueđể mọi tool/observer đọc verification block đều thấy gate User chưa qua. - KHÔNG xoá
council_approved=false— vẫn là master gate cuối.
§4. F3 — MOT executor boundary cleanup
§4.1 Mâu thuẫn nội tại trong v0.2
| Section | Wording v0.2 | Hệ quả |
|---|---|---|
| §11.5 executors | - future_MOT_executor # khi MOT spec ổn định (§13.4) |
Liệt MOT vào danh sách executor |
| §13.4 MOT | MOT_itself_is_not_an_executor |
MOT KHÔNG phải executor |
Cùng v0.2 nói hai điều ngược nhau.
§4.2 Patch v0.2.1
§11.5 sau patch:
executor_boundary:
executors:
- DOT
- Agent
- Hermes
- Codex
- PG_worker
- external_worker
- future_Kestra_adapter
not_executors:
- MOT # template/orchestrator sinh job graph — KHÔNG phải executor (xem §13.4)
future_MOT_executor đã bị xoá khỏi enumeration. Thay vào: not_executors list explicit chứa MOT để future-proof bất kỳ ai duyệt §11.5.
§13.4 sau patch:
mother_of_task_clause:
MOT:
is_executor: false
role:
- emits_job_graph
- generates_workflow_instances_from_template_config
- delegates_execution_to_queue_executors
permitted_labels:
- MOT_template_generator
- MOT_job_graph_generator
- future_MOT_orchestrator # nhãn cho instance runtime đa-bước (KHÔNG phải executor)
forbidden_labels:
- future_MOT_executor # đã loại khỏi §11.5 — MOT KHÔNG bao giờ là executor
relation_to_queue:
- MOT_emits_job_graph
- queue_orchestrates_steps
- each_step_may_be_an_information_unit
- trigger_in_trigger_out_go_through_queue
- MOT_itself_is_not_an_executor
- MOT_instance_state_lives_in_PG_per_§6.7
- MOT_step_lifecycle_follows_work_state_machine_§6.7
§4.3 Hệ quả luật
- Khi mở sub-design pack MOT trong tương lai, design phải dùng nhãn
MOT_template_generator,MOT_job_graph_generator, hoặcfuture_MOT_orchestrator— KHÔNG dùng nhãn có hậu tố_executor. - MOT step (đơn vị nhỏ hơn) được thực thi bởi executor thực sự (DOT/Agent/Hermes/Codex/PG_worker/external_worker/future_Kestra_adapter) — MOT chỉ sinh graph + delegate.
- MOT runtime ↔ executor giao tiếp qua queue substrate (§11.5 rules giữ nguyên).
§5. Cái KHÔNG đổi trong v0.2.1
- 22 sections cấu trúc — nguyên.
- 8 nguyên tắc §0 — nguyên.
- Vocab §6.1 (event_domain/stream/lane/severity/classification) — nguyên.
- §6.2 staging lifecycle 7-state — nguyên.
- §6.3 DOT run vocab — nguyên.
- §6.6 event_vs_job + §6.7 work state machine (v0.2 patches) — nguyên.
- §11.5 6 rules — nguyên (chỉ enumeration executors thay đổi).
- §13.4 7 relation_to_queue items — nguyên (chỉ thêm is_executor + role + labels).
- §14 NVSZ 4-layer — nguyên.
- §15.5 silent gap invariant (v0.2 patch) — nguyên.
- §16-§21 — nguyên.
- §22 các keys khác — nguyên.
- Cross-compat với D22/D28/D29/D30/D31/D32/D35/D36/D37/D39/D43/D44 — nguyên (zero amend).
§6. Sequence patch v0.2.1
| Step | Action | Revision |
|---|---|---|
| 1 | Patch §22: split council_round_1_gpt_approved → _patch_applied + enactment_approved=false + user_approval_required=true + version v0.2.1 |
10 |
| 2 | Patch §22 footer keys: add v0_2_1_cleanup_patch_applied + mot_is_executor=false + mot_role line |
11 |
| 3 | Patch §11.5 executors list: drop future_MOT_executor; add not_executors: [MOT] |
12 |
| 4 | Patch §13.4 MOT clause: add is_executor: false, role, permitted_labels, forbidden_labels |
13 |
| 5 | Patch title/version-history line: v0.2 → v0.2.1 with cleanup explanation | 14 |
| 6 | Patch footer: v0.2 → v0.2.1 + add cleanup tag | 15 |
| 7 | update_document(title, tags) refresh KB metadata to v0.2.1 | 16 |
Mỗi step idempotent, dễ rollback nếu Round 2 / User yêu cầu.
§7. Risk register (post-v0.2.1)
| Risk | Probability | Severity | Mitigation |
|---|---|---|---|
User reject not_executors list ở §11.5 (chỉ muốn comment trong §13.4) |
Low | Low | Move to comment-only |
| Council yêu cầu bump version → v0.3 thay vì v0.2.1 | Low | Low | Easy patch |
Gemini Round 2 yêu cầu strict YAML schema cho mother_of_task_clause |
Low | Low | Document hiện đã codify đủ |
Tag v0.2-draft trùng với tag tự nhiên — gây nhập nhằng filter |
Low | Low | Tag cleanup tại lần ban hành |
§8. Cái Claude không tự thêm trong v0.2.1
- KHÔNG bump anti-pattern count §17 (vẫn 14 hard-reject + 3 soft-warn) — chờ Round 2 / User quyết về A8'/A14'.
- KHÔNG codify số
stale_thresholdcụ thể — vẫn ở DP3. - KHÔNG ban hành substrate MOT — vẫn design seam.
- KHÔNG ban hành luật.
§9. Verification list (KB findability sau v0.2.1)
Required search/list/read keys:
| Key | Expected location |
|---|---|
v0.2.1 DRAFT (title) |
KB metadata title của law file |
v0.2.1, v0.2-draft (tags) |
KB metadata tags |
council_round_1_gpt_patch_applied |
law §22 verification block |
enactment_approved=false |
law §22 verification block |
MOT is not an executor / MOT_itself_is_not_an_executor |
law §13.4 + report 07 |
MOT emits job graph / MOT_emits_job_graph |
law §13.4 |
future_MOT_executor chỉ xuất hiện như forbidden_label hoặc trong giải thích cleanup — KHÔNG xuất hiện trong enumeration executors: |
law §13.4 + report 07 |
§10. Mutation footprint declaration
PATCH_DIEU45_V0_2_1_METADATA_AND_MOT_BOUNDARY_CLEANUP thực hiện:
- ✅ 6 patches vào law file (revision 10 → 15).
- ✅ 1 update_document call (revision 16) cho title + tags.
- ✅ 1 upload report mới (this file).
- ✅ Refresh 00-summary v0.2.1 marker (next).
- ❌ KHÔNG DDL.
- ❌ KHÔNG DML production.
- ❌ KHÔNG migration.
- ❌ KHÔNG install pg_cron.
- ❌ KHÔNG upgrade PostgreSQL.
- ❌ KHÔNG đụng event_outbox / Qdrant / production_documents.
- ❌ KHÔNG đụng START-HERE / mark-cut alias.
- ❌ KHÔNG thay đổi substance luật ngoài 3 cleanup items.
§11. Next step
- (Optional) Gemini Council Round 2 review v0.2.1.
- User approve v0.2.1 (hoặc yêu cầu patch tiếp).
- Ban hành Điều 45 v1.0 (sau khi User approve).
- Dispatch DP1–DP7 theo §18.4 + §19 open Q.
07 — Điều 45 v0.2.1 Cleanup Patch | 2026-05-26 | Claude Opus 4.7 (1M) | Cleanup-only — substance giữ nguyên — CHƯA BAN HÀNH.