KB-1B2E

GPT Review — 18a DOT-119 Redesign rev1

8 min read Revision 1
gpt-reviewdot-119birth-processdieu-4metadata-drivenrev2-required

GPT Review — 18a DOT-119 Redesign rev1

Date: 2026-05-05 Reviewer: GPT-5.5 Thinking / Incomex Hội đồng AI Reviewed: knowledge/dev/laws/dieu44-trien-khai/design/18a-dot119-metadata-driven-no-clobber-redesign.md rev 1

Verdict

Direction PASS, rev2 required before execution-pack design.

File 18a correctly reframes DOT-119 as a Đ4-governed birth-process tool and proposes the right architectural direction: metadata-driven, no-clobber, generic trigger installer. This is the right move under Điều 20.

However, several details must be corrected before moving to 18b.

What is correct

  1. Luật chủ quản is Đ4

    • DOT-119 implements the birth domain (birth.register).
    • Đ4/Birth Process Law is the professional law that owns the behavior.
    • Đ0-G remains constitutional principle; Đ4 operationalizes it.
  2. 3-tier architecture is right

    • Tier 1: birth identity metadata.
    • Tier 2: generic trigger installer.
    • Tier 3: master function governance separated from DOT-119.
  3. No-clobber is mandatory

    • DOT-119 must not embed or replace fn_birth_registry_auto.
    • Function governance must be separate.
  4. collection_registry is a plausible metadata endpoint

    • It already holds collection-level governance metadata.
    • It just received description_policy successfully.
    • It is visible to registry/governance workflows.

Required corrections for rev2

B1 — Clarify multi-law jurisdiction, not only Đ4

Đ4 is the professional/domain owner, but execution touches other legal domains. Rev2 must state:

  • Đ4 controls birth semantics and DOT-119 behavior.
  • Đ35 controls DOT lifecycle/registration/health of DOT-119 as a DOT tool.
  • Đ36 / collection protocol controls schema/registry changes to collection_registry if fields are added.
  • Đ20 / NT15 controls design-before-execute and cost/roundtrip discipline.
  • Đ43 controls context graph/metadata discoverability.

This prevents the future mistake: “Đ4 owns everything, so we can ignore DOT/schema governance.”

B2 — Do NOT default all remaining collections to synthetic_id

Rev1 says:

Phần còn lại (observed chưa có trigger) = DEFAULT synthetic_id

This is unsafe. It may silently classify collections whose birth identity has not been reviewed.

Correct approach:

  • Use unclassified / unknown default, or NULL with STOP behavior.
  • DOT-119 must STOP if strategy is missing/unknown.
  • Only explicitly classified collections get:
    • column
    • synthetic_id
    • subordinate
    • disabled

Recommended enum:

  • column
  • synthetic_id
  • legacy_id_single_colon or synthetic_id_legacy
  • subordinate
  • disabled
  • unclassified

Default should be unclassified, not synthetic_id.

B3 — Existing single-colon _id triggers need distinct strategy

Three existing collections use fn_birth_registry_auto_id() and produce table:id single-colon, not table::id double-colon.

Rev1 maps them to synthetic_id, but that loses semantic precision.

Rev2 should use either:

  • legacy_id_single_colon, or
  • synthetic_id_legacy

Do not migrate them conceptually to double-colon unless a migration is explicitly designed.

B4 — DOT-119 should not require function changes

Rev1 says fn_birth_registry_auto already reads collection_registry; this may be true for governance role, but DOT-119 redesign should not require fn_birth_registry_auto to read new birth_code_strategy fields.

Preferred model:

  • DOT-119 reads metadata and decides trigger argument.
  • Runtime function remains unchanged.
  • For column: trigger calls fn_birth_registry_auto('<column>').
  • For synthetic_id: trigger calls fn_birth_registry_auto('__force_synthetic__') or another absent sentinel column.
  • For legacy single-colon: trigger calls fn_birth_registry_auto_id() only for existing/explicit cases.

This avoids changing the master function.

B5 — Sentinel column must be formalized

If using absent-column fallback, do not use an ad hoc magic string without law/design.

Rev2 must define:

  • reserved sentinel: e.g. __birth_synthetic_id__;
  • DOT-119 must verify no real column has that name;
  • fn_birth_registry_auto v2 fallback behavior is intentionally used;
  • report must record sentinel use.

B6 — Metadata endpoint decision should remain candidate until legal/schema gate

Option A (collection_registry fields) is likely best, but it requires DDL. Rev2 should not present it as fully chosen until:

  • Đ36/schema impact is acknowledged;
  • Directus/collection registry metadata field visibility issue from description_policy is considered;
  • execution pack includes legal migration path.

Recommendation can remain Option A, but wording should be: “recommended pending GPT/User decision.”

B7 — Law/document amendment sequencing

Because DOT-119 is under Đ4, rev2 should propose:

  1. design 18a rev2;
  2. GPT/User approve;
  3. patch Đ4/birth-procedures wording for metadata-driven DOT-119 contract, or include exact amendment draft;
  4. only then 18b execution pack.

At minimum, file 18a rev2 must include Đ4 amendment draft text.

B8 — Migration plan must be read-only-first

Before seeding 166 rows, rev2 must require an agent preflight that derives current trigger mapping and proposes seed rows. Do not hardcode ellipsis ... in seed SQL.

Required seed report fields:

  • collection_name
  • current trigger function
  • current trigger arg
  • proposed strategy
  • proposed birth_code_column
  • confidence
  • notes

B9 — DOT-119 self-check should not grep only $0

A script self-grep is useful but insufficient. Also require:

  • CI/preflight check that file content has no CREATE OR REPLACE FUNCTION fn_birth_registry_auto;
  • runtime hash/capture of installed fn_birth_registry_auto before/after DOT-119 dry-run/execution;
  • hard stop if function changes.

Directive to Opus/Ocus

Patch file 18a to rev2. Do not execute.

Required rev2 changes:

  1. Add Law Jurisdiction Matrix:

    • Đ4 = domain owner;
    • Đ35 = DOT governance;
    • Đ36/collection protocol = schema/registry field owner;
    • Đ20 = design-before-execute;
    • Đ43 = context/metadata graph discoverability.
  2. Change default strategy from synthetic_id to unclassified.

    • DOT-119 must STOP on unclassified.
  3. Add explicit strategy for legacy single-colon _id triggers.

  4. Clarify DOT-119 reads metadata and generates trigger args; fn_birth_registry_auto remains unchanged.

  5. Define reserved sentinel for synthetic fallback, with no-real-column verification.

  6. Keep Option A recommended, but mark as pending decision and legal/schema gate.

  7. Add Đ4 / birth-procedures amendment draft.

  8. Add read-only seed-mapping preflight before any metadata seeding.

  9. Strengthen no-clobber checks beyond script grep: before/after function hash/source capture.

  10. Keep execution split:

  • 18b: metadata field + seed + DOT-119 script repair;
  • 18c: IU trigger via repaired DOT-119.

Hard boundaries:

  • no code changes;
  • no DDL;
  • no DOT-119 execution;
  • no function edits;
  • no IU trigger;
  • no IU rows;
  • no Pack 2B.

Current decision

18a rev1 is accepted directionally but not approved for execution planning. Need rev2 with the above corrections.

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-18a-dot119-redesign-rev1-2026-05-05.md