P3D Pack 1 Phase 4D — Execution Options Design
P3D Pack 1 Phase 4D — Execution Options Design
Date: 2026-05-11 Author: Opus 4.7 Status: OPTIONS ONLY — no execution, no lock
Option 1: Map current IU pilot rows only, defer future law_unit
What: INSERT one species_collection_map row for information_unit → an observed/atom species (from 8 PLAUSIBLE dry-run candidates). QT-001 backfill 12 birth_registry rows. Defer law_unit species until Phase 5.
| Aspect | Assessment |
|---|---|
| Benefit | Điều 29 compliance for pilot rows. Immediate. Minimal scope. |
| Risk | Future law_unit rows born with pilot species (wrong for law content). Two-round backfill needed. |
| Law alignment | Điều 29 partial fix. QT-001 aligned for backfill. |
| Hardcode risk | Low — species chosen from live candidates. But gom assignment may stick if not reclassified. |
| Future migration impact | Phase 5 must reclassify law_unit rows post-birth or during migration script. |
| Required next prompt | Phase 4D executable: species_collection_map INSERT + QT-001 backfill + post-implementation design. |
Option 2: Defer ALL species mapping/backfill to Phase 5 migration design
What: Accept the Điều 29 gap as documented/tracked. Phase 5 migration design resolves nesting → composition → species → mapping → backfill in one coherent pass.
| Aspect | Assessment |
|---|---|
| Benefit | No premature classification. No tech debt. One-pass solution. Composition determined by actual nesting decision. |
| Risk | Điều 29 gap stays open for 12 pilot rows (documented, planned closure). New IU rows before Phase 5 also get NULL species. |
| Law alignment | Điều 29 violation documented with explicit deferral rationale. QT-001 executed in Phase 5. |
| Hardcode risk | None — no species assigned yet, nothing to hardcode wrong. |
| Future migration impact | Clean — migration design includes species from day one. |
| Required next prompt | Phase 5 migration design (nesting decision first, then species + composition + migration + backfill). |
Option 3: Promote IU to governed + map to governed law/content species
What: QT-005 promotion (observed → governed). Then map to a governed species (e.g., the law species from dry-run, or a new dedicated species). Composition matches governed species's entity_species record.
| Aspect | Assessment |
|---|---|
| Benefit | Strongest classification. IU enters governed ecosystem (full inspect pipeline). Species matches content semantics. |
| Risk | Heavy scope: QT-005 + new species (possibly) + mapping + backfill + inspect setup. Premature if IU is still pilot. |
| Law alignment | Full Điều 29 compliance + QT-005 aligned. |
| Hardcode risk | Low if species derived from evidence. But promotion is irreversible governance decision. |
| Future migration impact | Clean for law_unit. But pilot rows (design_doc_section) may not fit governed law species. |
| Required next prompt | QT-005 promotion prompt + species_collection_map INSERT + QT-001 + inspect-pen setup + post-implementation design. |
Option 4: Post-birth correction tool (DOT-based)
What: Map IU to a default species (e.g., observed/atom) now. Build a DOT tool that runs post-birth, inspects unit_kind, and corrects species/composition in birth_registry based on discriminator rules in species_collection_map.
| Aspect | Assessment |
|---|---|
| Benefit | Discriminator logic activated without patching fn_birth_registry_auto. Species differentiation by unit_kind achieved. |
| Risk | Requires DOT tool development (new scope). Correction window between birth and DOT run (temporary wrong species). |
| Law alignment | Điều 29 partially via default mapping. Điều 0-G augmented by DOT correction. |
| Hardcode risk | Medium — correction rules in DOT tool must be data-driven from species_collection_map discriminator rows, not hardcoded. |
| Future migration impact | Good — tool applies to all future births, including law_unit migration. |
| Required next prompt | DOT tool design pack (correction spec + discriminator row seed + testing) + default mapping INSERT. |
Option 5: Patch fn_birth_registry_auto to use discriminators
What: Modify fn_birth_registry_auto to read discriminator_field/discriminator_value and match against NEW.<field> at birth time. Then seed discriminator rows in species_collection_map.
| Aspect | Assessment |
|---|---|
| Benefit | Full discriminator runtime. Species resolved correctly at birth time per unit_kind. No post-birth correction needed. |
| Risk | Function patch = governance decision. Changes a system-wide trigger function used by 162+ triggers. Testing required. |
| Law alignment | Strongest Điều 29 + Điều 0-G alignment. But function patch must follow its own governance procedure. |
| Hardcode risk | Low if discriminator logic reads data-driven rules from species_collection_map. |
| Future migration impact | Best — every future birth auto-resolves correct species. |
| Required next prompt | Separate governance pack for fn_birth_registry_auto enhancement + regression testing + discriminator row seed. Explicitly out of scope for Pack 1 Phase 4. |
Comparison summary
| Option | Scope | Điều 29 fix | Composition correctness | Tech debt | Recommended context |
|---|---|---|---|---|---|
| 1 (pilot only) | Small | Partial (12 rows) | Unknown (atom assumed) | Medium (reclassify later) | If Điều 29 gap is urgent |
| 2 (defer to Phase 5) | None now | Deferred | Correct (decided with nesting evidence) | None | If Phase 5 is near-term |
| 3 (promote + govern) | Large | Full | Correct if species chosen right | Low | If IU is ready for full governance |
| 4 (DOT correction) | Medium | Partial + correction | Correct after DOT run | Medium (new tool) | If discriminator needed but function patch too heavy |
| 5 (function patch) | Large, separate pack | Full | Correct at birth | None | If system-wide discriminator is justified |
Phase 4D Execution Options | 5 options with benefit/risk/law/hardcode/migration/next | No lock | 2026-05-11