KB-4D66 rev 4

04 — Open Questions Before Design (Điều 45)

12 min read Revision 4
dieu45-draftopen-questionsdesign-packcouncil-review-pending

04 — Open Questions Before Design

Date: 2026-05-26 (revised post-GPT Council Round 1 — v0.2) Scope: Câu hỏi cần Council/User trả lời TRƯỚC khi luật ban hành hoặc sub-design pack dispatch. Inherits + extends survey 08-questions-to-answer-before-design.md (28 câu). v0.2 update: Round 1 GPT Council đã trả lời tổng quát (xem 06-gpt-council-review-patch-v0-2.md). Round 2 (Gemini, optional) + User approval còn lại. §7 dưới đây thêm 3 câu hỏi mới phát sinh từ patch v0.2.


§1. Câu hỏi loại A — Cần Council quyết TRƯỚC khi ban hành Điều 45 v1.0

(Nếu không trả lời, luật ban hành với gap.)

A1. Bản dịch Vietnamese của tiêu đề luật

Câu hỏi: "Luật Hàng Đợi & Điều Phối Tác Vụ PG-native" — phê duyệt? Phương án: giữ hoặc đổi (ví dụ: "Luật Hàng Đợi Tác Vụ PG-native", "Luật Hàng Đợi & Định Tuyến"). Tác động: name của luật, file path. Default nếu không trả lời: giữ nguyên proposal.

A2. Mức cứng của §13 (customer-care/email/MOT)

Câu hỏi: Giữ "design seam, không normative Phase 1" (Claude soft) hay codify vocab cho customer, email, chat, mot ngay trong luật? Phương án:

  • (a) Design seam (Claude default) — luật forward-compatible.
  • (b) Codify vocab speculatively — luật rộng nhưng tạo speculative invariant.
  • (c) Xoá §13 — luật scope hiện hành tuyệt đối. Default: (a).

A3. Section count + ordering

Câu hỏi: Chấp nhận 22 sections (Claude) vs 20 (GPT)? Default: 22 (Claude added §0 executive summary + §22 verification block per enacted-law pattern).

A4. Mức enforce §6.4 inclusion criteria

Câu hỏi: Inclusion criteria 7+7 enforced tại event_type_registry insert hay là rubric guideline? Phương án:

  • (a) Rubric guideline (Claude default, mềm).
  • (b) Enforced — registry insert reject nếu rubric không pass. Default: (a) tại Phase 1, (b) bật ở DP nếu enforced ratification table được thêm.

A5. Phòng ngừa lạm dụng event_domain mới

Câu hỏi: Khi domain mới (customer/email/mot) muốn join queue, ai phê duyệt? Council? Agency owner? Default: Council ratification kèm Điều 35-style DOT registration model.

A6. Tên file luật

Câu hỏi: Path knowledge/dev/laws/dieu45-pg-native-queue-and-task-orchestration-law.md OK? Alternative: dieu45-luat-hang-doi-pg-native.md. Default: giữ English-style đồng nhất với D31/D35/D37 đã enacted (latin filename).


§2. Câu hỏi loại B — Sub-design pack (sau Điều 45 v1.0 ban hành)

B1. DP1 — pg_cron adoption

Câu hỏi: Cài pg_cron hay tiếp tục external invocation? Tác động luật: §5.4, §9.4. Pre-requisites trước DP1:

  • Verify pg_cron 1.6+ packaged trên pgdg-16 Debian source.
  • Confirm tất cả workers idempotent với pg_cron tick.
  • Decide cadence per worker.
  • Decide failure mode (cron job exception → who alerts?).

B2. DP2 — Job substrate shape

Câu hỏi: Long-running Agent/Hermes/MOT job dùng đâu? Phương án:

  • (a) Extend event_outbox với event_domain='job', event_stream='task', delivery_lane='delayed'.
  • (b) Tạo parallel table job_outbox với claim/start/done lifecycle.
  • (c) Stay event-only — external workers ghi event trail dù không có claim semantics. Tác động luật: §1.2 group D, §3.1, §3.2. Critical: quyết định này thay đổi định nghĩa "job" trong §2.

B3. DP3 — Retry policy concrete

Câu hỏi: max_attempts mặc định? Per-domain override matrix? Phương án:

  • (a) Universal max_attempts=5, backoff exponential.
  • (b) Per-domain trong dot_config: queue.retry.{domain}.max_attempts, queue.retry.{domain}.backoff_sec.
  • (c) Per-event_type via event_type_registry.retry_policy jsonb (schema change). Tác động luật: §8.1.

B4. DP4 — NOTIFY bridge

Câu hỏi: Bật pg_notify('event_universal', json) trigger trên event_outbox INSERT? Phương án:

  • (a) Bật — wake-up signal cho external listener (parallel với kb_vector_sync).
  • (b) Không bật — workers tick theo cadence ngoài. Tác động luật: §5.4 (LISTEN/NOTIFY là wake-up signal, không là SoT).

B5. DP5 — Trigger-IN vocab widening

Câu hỏi: iu_sql_event_route.target_event_domain vocab mở rộng đến đâu? Hiện hành: {iu, iu_sql}. Phương án mở rộng: {iu, iu_sql, piece, staging, system, birth_registry, governance, tac, kg, dot, health}. Tác động luật: §12.1.

B6. DP6 — Subscription configuration

Câu hỏi: event_subscription chỉ có 3 rows. Mở rộng đến đâu? Strategy? Phương án:

  • (a) Minimal-by-design (broadcast fallback) — chỉ thêm subscription khi cần override.
  • (b) Comprehensive — mỗi domain × stream có ít nhất 1 subscription explicit. Tác động luật: §11.4 (recipient resolution rule).

B7. DP7 — event_outbox partitioning

Câu hỏi: Partition theo created_at (monthly) ở threshold nào? Hiện hành: 131,746 rows. Tốc độ ~7,300/day (chủ yếu system/issue_opened). Tác động luật: không trực tiếp; §15 risk register cảnh báo.


§3. Câu hỏi loại C — Operational (sau ban hành)

C1. Worker silent gap (Q25 survey)

Hiện trạng: iu_outbound_default last_run 2026-05-22; today 2026-05-26 = 4-day gap. Câu hỏi: Gap này là expected (workload thực sự rỗng) hay external invoker đã dừng? Action: Hermes/Codex log audit — confirm invocation cadence.

C2. dead_lettered=0 vs attempts_written=67 (Q27 survey)

Hiện trạng: worker has written 67 attempts, 0 dead-lettered. Câu hỏi: Healthy (no real failure happened) hay worker error path không surface dead-letter? Action: sample one failed-attempt scenario in dev to confirm worker exception path.

C3. iu_notification_event legacy (Q7 survey)

Hiện trạng: 0 rows; legacy per 23-P3D4C0X §I. Câu hỏi: Drop hay giữ compat view? Phương án:

  • (a) Drop ngay (clean).
  • (b) Convert to view over event_outbox WHERE event_domain='iu' (compat).
  • (c) Keep empty as-is forever. Action: confirm no external reader; then (a).

C4. Event_outbox unique-index policy (Q5 survey)

Hiện trạng: survey không introspect actual unique indexes. Câu hỏi: Existing indexes match 23-P3D4C0X §C proposal? Action: \d event_outbox introspect trong dev session; document trong DP.

C5. Missing trace columns (Q6 survey)

Hiện trạng: live event_outbox thiếu causation_id, source_document_ref, import_batch_ref, processed_at, event_subject_type, source_function. Câu hỏi: Thêm bao giờ? Có cần thiết không? Phương án: thêm trong DP nếu use case xuất hiện; KHÔNG thêm preemptively.

C6. Sub-domain piece vs iu (Q28 survey)

Hiện trạng: vocab cho phép cả hai. Câu hỏi: Merge hay tách? Decision boundary: giữ cả hai vì có ngữ nghĩa khác (piece = đơn vị cấp dưới, iu = container). Có thể document boundary rule.


§4. Câu hỏi loại D — Cross-law / Hiến pháp

D1. Cập nhật architecture index

Câu hỏi: Sau ban hành Điều 45, ai cập nhật knowledge/dev/architecture/index.md? Default: sub-task của Council secretary; không thuộc Claude scope.

D2. Coordination với D36 v5.0 FINAL

Câu hỏi: D36 v5.0 hiện DRAFT 30%. Khi BAN HÀNH, có cross-ref Điều 45 §14 NVSZ? Default: YES — D36 §X cross-ref ngược.

D3. Coordination với D44 trien-khai

Câu hỏi: Phần queue trong D44 trien-khai (P3D4C0X, P3D4C1, P3D4C1U design docs) có cần migrate? Default: KHÔNG migrate file location. Chỉ thêm cross-ref banner đầu file: "Sau Điều 45 ban hành, ownership invariants thuộc Điều 45 §X."

D4. Coordination với Hiến pháp NT

Câu hỏi: Điều 45 có cần thêm NT mới vào HP? Default: KHÔNG — Điều 45 implement NT đã có (PG-first, SSOT, Assembly First). Không cần NT mới.


§5. Câu hỏi loại E — Test / Verification (sau migrate sub-design)

E1. Test plan cho event_outbox payload classification CHECK

Câu hỏi: Test cases gì để confirm CHECK reject body/vector/secret? Action: DP4 / DP5 test pack.

E2. Test plan cho dead-letter replay

Câu hỏi: Replay → re-attempt → re-fail → re-DL. Idempotency-key-preserved? Action: DP3 test pack.

E3. Test plan cho lease expiration

Câu hỏi: Holder crash → lease expires → new holder acquires. Race-free? Action: DP test pack.

E4. Regression test cho 9-domain × 7-stream × 2-lane CHECK

Câu hỏi: Mỗi vocab change phải có test trong D30 framework. Sub-pack ratification process? Action: đồng pha Điều 30.


§6. Câu hỏi loại F — Non-functional

F1. Performance ceiling event_outbox

Câu hỏi: Tại thread INSERT rate hiện tại (~7,300/day), khi nào reach 1M rows? 5M? Estimate: 1M ≈ 138 days; 5M ≈ 685 days. Action: monitor; partition khi gần 5M.

F2. Security review payload denylist

Câu hỏi: CHECK key list (body/content/raw/vector/embedding/secret/token/password/ssn/personal_data) đủ chưa? Action: annual security review.

F3. RLS policy

Câu hỏi: event_outbox cần row-level security cho multi-tenant không? Default: không tại Phase 1 (single-tenant); xem D7 §19 survey (cross-DB federation).


§6.5. Câu hỏi mới phát sinh từ v0.2 patch (GPT Council Round 1)

A7' — Anti-pattern count §17 sau v0.2

Câu hỏi: v0.2 ghi nhận A8' (giả định event_outbox phủ job queue) và A14' (private executor state machine bypass PG) trong §6.6/§6.7. Có chính thức bump §17 từ 14 → 16 hard-reject trong v0.3 không? Default: chờ Round 2 / User quyết. Hiện tại để dưới dạng cross-reference, không thay đổi §17.

A8' — Định nghĩa cứng stale_threshold trong §15.5

Câu hỏi: Luật chỉ ghi "stale_threshold theo §15.4 (vd 3×)" — có cần codify số multiplier ngay trong v0.3 hay để DP3? Default: để DP3.

A9' — Vocab succeeded_cleaned vs dlq_cleaned trong §6.7

Câu hỏi: v0.2 dùng nhãn chung cleaned cho hai dạng (active path cleaned, DLQ cleaned). Council có muốn tách chính thức? Default: giữ chung cleaned; tách tại DP2/DP3 khi có evidence cần.


§7. Câu hỏi mà Claude từ chối trả lời

Theo §6 GPT proposal rule "Phase 1 không tạo bảng mới":

  • ❌ Claude KHÔNG đề xuất schema mới cho job_outbox.
  • ❌ Claude KHÔNG đề xuất CHECK constraint mới cho iu_sql_event_route.target_event_domain widening.
  • ❌ Claude KHÔNG đề xuất concrete max_attempts number.
  • ❌ Claude KHÔNG đề xuất concrete worker tick cadence.
  • ❌ Claude KHÔNG đề xuất pg_cron job DSL.
  • ❌ Claude KHÔNG dispatch sub-design pack.

Mọi điều trên thuộc về Council + sub-design pack process.


§8. Risk register cho ban hành

Risk Probability Severity Mitigation
Council reject §13 design-seam softening Medium Low Patch v0.2 codifying customer/email vocab speculatively
Council reject 22 sections — yêu cầu nén về 20 Low Low Easy patch
Council reject ratify post-hoc (§18.1) Low High Explain rationale; offer mea culpa + future cycle commit
User reject Vietnamese-first format Low Medium Patch để add English summary appendix
Gemini Council Round 2 yêu cầu DDL examples Low Medium Reject — luật không chứa DDL
User insist pg_cron decision NOW Medium Medium Refer to DP1; if push, defer law to after DP1

§9. Pre-launch checklist

Trước khi ban hành Điều 45 v1.0:

  • Council Round 1 (GPT) pass — 2026-05-26 → v0.2 DRAFT patch applied.
  • Council Round 2 (Gemini) — optional theo Council policy.
  • User approve.
  • A1–A6 trả lời.
  • D1–D4 cross-law coordination.
  • Live PG re-verify substrate unchanged kể từ survey (2026-05-26).
  • File rename: remove "DRAFT" header.
  • Architecture index cập nhật.
  • HP cross-ref cập nhật.
  • Memory MEMORY.md cập nhật.

Sau ban hành:

  • Dispatch DP1–DP7 theo thứ tự ưu tiên Council quyết định.
  • Cross-ref banner D36/D44 design docs.
  • Monitor worker silent gap (Q25).
  • Monitor event_outbox volume.
Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/v0.6-dieu45-pg-native-queue-law-draft/04-open-questions-before-design.md