Opus Verification — Phase 3 Investigation BLOCKED (5 decisions needed)
Opus Verification — Phase 3 Investigation BLOCKED (correct)
Date: 2026-05-11 | Author: Opus 4.7 (verifier)
Verdict: Agent đúng. Status BLOCKED là chính xác.
5 blocker phải giải quyết trước migration. Tất cả đều là quyết định thiết kế, không phải bug.
6 phát hiện — em verify từng cái
| # | Phát hiện | Agent đúng? | Hệ quả |
|---|---|---|---|
| 1 | TAC hash = sha256(title|body|desc|profile pipe-delimited UTF8) | ✅ 10/10 match | Migration phải chọn: recompute hay preserve |
| 2 | IU hash = sha256(body UTF8) via fn_content_hash | ✅ 10/10 match | 2 rule khác nhau, cùng algo |
| 3 | Planner: 'law_unit' rejected, NOT bug | ✅ Đúng — Phase 2 positional arg mistake | Vocab chỉ có 1 entry mỗi loại |
| 4 | Species not wired: species_collection_map=0 for IU | ✅ 12/12 birth rows NULL species | IU nằm ngoài species pipeline |
| 5 | Composition not enforced: parent=NULL, edges=0 | ✅ | Hierarchy TAC (parent_id) sẽ mất nếu không map |
| 6 | TAC outside birth universe: 0 birth_registry | ✅ | Migration ≠ rebadge, phải register mới |
Sửa lại lỗi em đã nói sai trước đó
Em xin lỗi: Ở Phase 2 verification, em nói "planner nhận nhầm law_unit → design_doc_section" — đây là SAI. Agent chứng minh: Phase 2 test gọi fn_iu_create_plan bằng positional args, 'law_unit' rơi vào param p_title thay vì p_unit_kind, nên p_unit_kind=NULL → auto_single → design_doc_section. Khi gọi đúng named args, planner correctly rejects 'law_unit' là unresolved_vocab. Không phải bug, mà em gọi sai.
5 quyết định cần GPT/User chốt
Q1: Hash — recompute hay preserve?
| Option | Mô tả | Em khuyến nghị |
|---|---|---|
| Recompute | Migrate body → IU tính sha256(body) mới. TAC hash mất nhưng data đúng. | ✅ NÊN — hash IU rule thống nhất, không 2 rule trong 1 bảng |
| Preserve | Giữ TAC hash as-is → IU có mixed hash rules | ❌ Rối |
| Dual | Thêm cột source_hash giữ TAC hash | ⚠️ Có thể, nhưng thêm complexity |
Q2: Vocab — seed gì?
Phải seed vào dot_config trước migration:
vocab.unit_kind.law_unit(TAC dùng implicit)- 17 section_types từ
tac_section_type_vocab(heading, article, paragraph, definition, principle, etc.) - 10 publication_types từ
tac_publication_type_vocab(law, policy, sop, constitution, etc.)
Q3: Species — enforce hay defer?
| Option | Mô tả |
|---|---|
| Seed species_collection_map | Map IU/UV → species, birth_registry sẽ có species_code. Migration rows có species. |
| Accept NULL | Để NULL, DOT enrichment sau. Migration nhanh hơn nhưng data thiếu. |
Em khuyến nghị: Seed trước migration — species_collection_map chỉ cần 2 rows (information_unit, unit_version). Effort rất nhỏ, data đầy đủ hơn.
Q4: Composition — strategy?
TAC có parent_id hierarchy (86 rows, nhiều có parent). IU có parent_or_container_ref nhưng all NULL.
| Option | Mô tả |
|---|---|
| Map parent_id → parent_or_container_ref | Migrate hierarchy trực tiếp |
| Materialize universal_edges | Tạo edge contains cho mỗi parent-child |
| Defer | Để NULL, build hierarchy sau |
Em khuyến nghị: Map trực tiếp — parent_id → parent_or_container_ref là column mapping thuần. Edge materialization có thể làm sau bằng DOT.
Q5: Governance — promote hay giữ pilot?
collection_registry IU hiện là governance_role=observed, migration_state=pilot. Nếu migration 86 law units vào → IU chứa production data → phải là governed.
Em khuyến nghị: Promote sau migration pilot thành công — pilot 1 doc trước, verify, rồi promote.
Đề xuất thứ tự tiếp theo
- GPT chốt 5 quyết định (Q1-Q5) → document vào KB
- Phase 3B: Vocab + species seed (nhỏ, 2-3 INSERT vào dot_config + species_collection_map)
- Phase 3C: Hash reconciliation implementation (nhỏ — nếu recompute thì không cần change gì, migration tự tính)
- Phase 4: Pilot migration 1 doc (Đ28 hoặc Đ32, 23-27 rows) + verify round-trip 0 drift
- Phase 4B: Full migration (remaining 2 docs) + promote governance
Status
phase3_investigation=BLOCKED_CORRECT
hash_blocker=DECISION_NEEDED (recompute vs preserve)
vocab_blocker=SEED_NEEDED (law_unit + 17 section_types + 10 pub_types)
species_blocker=SEED_NEEDED_OR_ACCEPT_NULL
composition_blocker=STRATEGY_NEEDED
governance_blocker=PROMOTE_DECISION_NEEDED
migration_allowed=false
next_action=GPT_DECIDE_5_QUESTIONS
Opus Verification | Phase 3 BLOCKED correct | 5 decisions needed | 2026-05-11