KB-6305
dot-iu-cutter v0.2 — BR-2/3/7 Discovery Report (2026-05-15)
12 min read Revision 1
dieu44-trien-khaidot-iu-cutterv0.2br-2br-3br-7discovery-reportplanning-only2026-05-15
dot-iu-cutter v0.2 — BR-2 / BR-3 / BR-7 Discovery Report
document_path: knowledge/dev/laws/dieu44-trien-khai/v0.2-planning/dot-iu-cutter-v0.2-br-2-3-7-discovery-report-2026-05-15.md
revision: r1
date: 2026-05-15
author: Agent (Claude Code CLI, Opus 4.7 1M)
phase: v0.2 planning — consolidated discovery report (BR-2 + BR-3 + BR-7 closed)
predecessors:
- dot-iu-cutter-v0.2-br-2-identity-profile-jsonb-discovery-2026-05-15.md
- dot-iu-cutter-v0.2-br-3-canonical-address-reader-writer-inventory-2026-05-15.md
- dot-iu-cutter-v0.2-br-7-sandbox-tac-role-clarification-2026-05-15.md
mutation_performed: false
ddl_written: false
phase_alpha_design_started: false
§1 — Summary
br_2_status: RESOLVED — no authority/format_version data hiding in identity_profile jsonb; canonical_address duplicated but harmlessly; Phase α additive columns safe from double-storage
br_3_status: RESOLVED — 21 PG functions + 11 triggers reference canonical_address; zero views; Nuxt is only app-layer reader (READ-ONLY field selection); dot/agent-data/Directus flows clean; Phase α additive columns do not break any reader/writer surface
br_7_status: RESOLVED — sandbox_tac is a static test fixture (76 rows, single-timestamp seed 2026-04-27, disjoint namespace, full TAC mirror); Phase α should MIRROR additive columns to sandbox_tac.logical_unit (Option II)
cumulative_status: 3 of the 6 hard blockers (BR-2, BR-3, BR-7) now closed
remaining_hard_blockers: 3
BR-1 already CLOSED in prior turn (GPT selected Option D)
BR-4 OPEN — authority backfill rule design
BR-5 OPEN — Đ24 ratification of production syntax as v1
BR-6 OPEN — split/merge metadata propagation TD absorption (gates P0-2 only; not Phase α DDL)
Note: BR-1 was implicitly closed when GPT selected Option D in this session prior to this work item. The discovery report intentionally counts it among the resolved set.
§2 — BR-2 Findings (identity_profile JSONB)
identity_profile_top_level_keys_distinct: 3
body_sha256 (string; 27 of 86 rows)
canonical_address (string; 27 of 86 rows — duplicates the column value)
source_span (object; 27 of 86 rows — {start_line, end_line})
authority_like_keys: 0
format_version_like_keys: 0
address_like_keys: 1 (canonical_address — value-equal to the column)
implication: adding explicit `authority` and `canonical_address_format_version` columns to public.tac_logical_unit
creates ZERO double-storage with identity_profile.
Cosmetic cleanup of the duplicated canonical_address key inside identity_profile is OPTIONAL and non-blocking.
Full evidence: BR-2 discovery doc.
§3 — BR-3 Findings (reader/writer inventory)
pg_functions_referencing_canonical_address: 21
IU lifecycle family: 15 (fn_iu_create / _plan / _preflight / _edit / _edit_plan / _save / _classify_existing / _verify_invariants / _create_edit_draft / _apply_edit_draft / _notif_draft / _notif_comment / _notif_version / _unread / _birth_gate_layer1)
IU notification + comment: 2 (fn_iu_notification_board, fn_iu_comment)
TAC + event family: 3 (fn_tac_birth_gate_lu, fn_event_unread, fn_event_capture_system_issues)
sandbox helper: 1 (sandbox_tac.fn_sbx_lu_parent_same_doc)
pg_triggers_referencing_canonical_address: 11
tac_logical_unit: 1 (trg_tac_birth_gate_lu — GUARD)
information_unit: 5 (gateway_write_guard, birth_gate_layer1/2, updated_at, birth_information_unit)
unit_edit_draft: 1 (notif_draft)
event_outbox: 1 (event_outbox_type_validate)
birth_registry: 3 (auto_certify, change_flag_matrix, count_birth_registry)
pg_views_referencing_canonical_address: 0
check_constraints (btrim<>''): 3 (event_outbox, iu_notification_event, unit_edit_draft)
indexes_on_canonical_address: 5 (3 UNIQUE: tac_logical_unit / information_unit / sandbox_tac.logical_unit; 1 regular: idx_iu_canonical; 1 composite: idx_ued_address_status_created)
app_layer_readers:
Nuxt SSR + client bundles: READ-only (explicit field selection on `logical_unit_id.canonical_address`; render + depth path)
dot: NONE
agent-data: NONE
Directus flows: NONE (by name; payload-jsonb scan not exhaustively performed but Phase α additive scope does not change vocabulary)
phase_alpha_reader_writer_risk: LOW
- additive columns invisible to existing readers/writers
- Nuxt query field selection is explicit; new columns are not auto-included
- no view layer to update
- sister tables out of Phase α scope per Option D direction
- sandbox helper (fn_sbx_lu_parent_same_doc) is sandbox-only; not impacted by additive public columns
phase_alpha_required_inspection_during_design (read-only):
- fn_tac_birth_gate_lu body — confirm no implicit constraint that would conflict with new authority/format_version columns
Full evidence: BR-3 inventory doc.
§4 — BR-7 Findings (sandbox_tac)
sandbox_tac_schema_tables: 8 (full mirror of TAC family)
sandbox_tac.logical_unit_rows: 76 (single-timestamp seed 2026-04-27 00:56:46 — static fixture)
sandbox_tac.logical_unit_columns: 12 of 13 IDENTICAL to public.tac_logical_unit (identity_profile is nullable in sandbox, NOT NULL in public)
address_namespace: disjoint from public (zero overlap; sandbox uses D38-C1A-… vs public D38-DIEU{N}-…)
indexes_and_constraints: mirror public (UNIQUE on canonical_address; PK on id; btree on doc_code + parent_id)
sandbox_helper_function: sandbox_tac.fn_sbx_lu_parent_same_doc
classification: STATIC TEST FIXTURE
recommendation: Option II — mirror Phase α additive columns onto sandbox_tac.logical_unit;
NO backfill of sandbox rows until BR-4 rule design generalizes;
Phase α dry-run env restores BOTH schemas to reflect production layout
Full evidence: BR-7 clarification doc.
§5 — Cumulative Blocker Status (post-BR-2/3/7)
| ID | Title | Status | Notes |
|---|---|---|---|
| BR-1 | option selection | CLOSED | GPT selected Option D (Hybrid phased) prior to this work item |
| BR-2 | identity_profile inspection | CLOSED | this session; no double-storage risk |
| BR-3 | reader/writer inventory | CLOSED | this session; 21 functions + 11 triggers + 2 Nuxt bundles inventoried; Phase α risk LOW |
| BR-4 | authority backfill rule | OPEN | needs Đ0-G review + design pass |
| BR-5 | Đ24 ratification of v1 syntax | OPEN | governance request, not technical inspection |
| BR-6 | split/merge metadata propagation TD | OPEN | gates P0-2 design only (not Phase α DDL); TD file must be authored or read |
| BR-7 | sandbox_tac role | CLOSED (advisory) | this session; Option II (mirror) recommended |
Total HARD blockers remaining: 3 — BR-4, BR-5, BR-6 Of the 3, only BR-4 and BR-5 block Phase α DDL authoring. BR-6 blocks P0-2 design, which is downstream of Phase α (per Option D phasing).
§6 — Can Phase α Design Start?
phase_alpha_design_can_start? NOT_YET — 2 prerequisites remain (BR-4, BR-5)
prerequisites_remaining_for_phase_alpha_DDL_authoring:
BR-4 authority backfill rule design
purpose: decide HOW to populate authority on 86 existing tac_logical_unit rows
candidates: derive from lifecycle_status='draft_only' → authority='draft'; OR from doc_code regex; OR uniform DEFAULT 'draft' for all 86 rows
governance: Đ0-G review of the rule
output: a backfill-rule design doc
BR-5 Đ24 ratification of production canonical_address syntax as v1
purpose: the DEFAULT value of canonical_address_format_version (e.g., 'd38-v0' or 'd38-v1') needs Đ24 ratification
governance: Đ24 council pass; expected outcome is the version string + the syntax-grammar attached
what_CAN_proceed_in_parallel_(non-blocking_for_Phase_α_DDL_but_can_start):
- decision_backlog remainder (v0.2-D-5/D-6/D-7) design — independent of canonical_address syntax
- P0-2 / P0-6 design SKELETON — fields that don't cite address (verdict enum, reviewer_identity, escalation_ref, prior_review_decision_id); the address-dependent fields wait for Phase α completion
what_CANNOT_proceed:
- Phase α DDL authoring (waits on BR-4 + BR-5)
- P0-2 manifest_envelope/manifest_unit_block design (waits on BR-1 closed [done] + BR-6 [open])
- any production migration
- any application code change
- any deploy
§7 — Recommended Next Action
recommended_next_action: BR-4 authority backfill rule design + BR-5 Đ24 ratification request
specifics:
1. Author a BR-4 design doc proposing 2–3 backfill rule candidates with pros/cons; submit for Đ0-G review.
Candidate A: uniform DEFAULT 'draft' for all 86 rows (simplest).
Candidate B: derive from lifecycle_status mapping (lifecycle 'draft_only' → authority 'draft').
Candidate C: derive from doc_code prefix regex.
Recommendation in the doc: Candidate B (lifecycle-derived).
2. Author a BR-5 Đ24 ratification request enumerating:
- production format syntax: D{doc}-DIEU{N}-{S|ROOT}[-P{n}][-{n}]
- examples observed in production data (the 86 + 98 + 13 + 44726 + 76 rows)
- proposed version string (e.g., 'd38-v1')
- non-law artifact format (open per P0-1 §9 item 8) — defer to a separate Đ24 follow-up
3. AFTER GPT review of BR-4 + BR-5 documents and explicit User selection:
- BR-4 rule selected → backfill plan locked
- BR-5 version string ratified → DEFAULT value locked
- Phase α DDL authoring can begin in a SEPARATE session under explicit prompt
4. In parallel, OPTIONAL: BR-6 split/merge TD authoring (if not yet authored) — gates P0-2 only; safe to run alongside BR-4/BR-5
5. agent_self_advance_to_phase_alpha_DDL: PROHIBITED
each_step_terminates_at_GPT_review_or_explicit_user_prompt: TRUE
§8 — Cross-References
br_2_doc: knowledge/dev/laws/dieu44-trien-khai/v0.2-planning/dot-iu-cutter-v0.2-br-2-identity-profile-jsonb-discovery-2026-05-15.md
br_3_doc: knowledge/dev/laws/dieu44-trien-khai/v0.2-planning/dot-iu-cutter-v0.2-br-3-canonical-address-reader-writer-inventory-2026-05-15.md
br_7_doc: knowledge/dev/laws/dieu44-trien-khai/v0.2-planning/dot-iu-cutter-v0.2-br-7-sandbox-tac-role-clarification-2026-05-15.md
prior_reconciliation_report: knowledge/dev/laws/dieu44-trien-khai/v0.2-planning/dot-iu-cutter-v0.2-canonical-address-reconciliation-report-2026-05-15.md
prior_options: knowledge/dev/laws/dieu44-trien-khai/v0.2-planning/dot-iu-cutter-v0.2-canonical-address-reconciliation-options-2026-05-15.md
prior_discovery: knowledge/dev/laws/dieu44-trien-khai/v0.2-planning/dot-iu-cutter-v0.2-canonical-address-reconciliation-discovery-2026-05-15.md
v0_2_scope_backlog: knowledge/dev/laws/dieu44-trien-khai/planning/dot-iu-cutter-v0.2-scope-backlog-2026-05-15.md
v0_1_p0_1_design: knowledge/dev/laws/dieu44-trien-khai/migration-design/dot-iu-cutter-v0.1-p0-1-canonical-address-migration-design-2026-05-15.md
split_merge_metadata_TD_reference: knowledge/dev/laws/dieu44-trien-khai/backlog/td-p1-split-merge-metadata-propagation-gap-2026-05-15.md
§9 — Hard Boundaries (re-stated)
no_DDL_written: TRUE
no_SQL_mutation: TRUE
no_ALTER_TABLE: TRUE
no_INSERT_UPDATE_DELETE: TRUE
no_migration: TRUE
no_change_to_tac_logical_unit: TRUE
no_change_to_sandbox_tac: TRUE
no_change_to_cutter_governance: TRUE
no_change_to_sister_tables: TRUE
no_app_code_modified: TRUE
no_directus_flow_modified: TRUE
no_design_started: TRUE (Phase α design awaits BR-4 + BR-5 closure)
no_deploy: TRUE
no_CUT_or_VERIFY: TRUE
no_dry_run_env_modified: TRUE
output_form: br_2_3_7_consolidated_discovery_report
agent_self_advance_to_phase_alpha_design: PROHIBITED
End of BR-2/3/7 discovery report.