KB-6777

GPT Review — 18a DOT-119 Redesign rev3

4 min read Revision 1
gpt-reviewdot-119birth-processdieu-4hp14rev4-small-patch

GPT Review — 18a DOT-119 Redesign rev3

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 3

Verdict

Rev3 is substantially PASS. One small rev4 patch is required before 18b.

Rev3 successfully turns the architecture into an agent/code contract:

  • CLI modes are explicit.
  • Exit codes are defined.
  • JSON output schema exists.
  • Validation invariants are specified.
  • Idempotency behavior is defined.
  • Transaction and no-clobber checks are defined.
  • system_issues raw insert is explicitly forbidden.
  • Health-check lifecycle is defined.

This satisfies the User’s HP14 reminder much better than rev2.

Remaining issue

B1 — Remediation block includes raw SQL wording

In §5.1 JSON remediation, rev3 currently says:

"UPDATE collection_registry SET birth_code_strategy=... WHERE collection_name='<X>'"

This is dangerous from the agent/code perspective. Even if intended as conceptual instruction, future agents may copy it as a raw SQL write. Since metadata changes are under Đ36/schema/registry governance, remediation must say use approved metadata update path/tool, not raw UPDATE.

Required rev4 patch

Patch §5.1 remediation wording only:

Replace:

"UPDATE collection_registry SET birth_code_strategy=... WHERE collection_name='<X>'"

With:

"Classify birth identity via approved Đ36/registry metadata update path; do not raw UPDATE collection_registry unless an approved execution pack explicitly authorizes it."

Also add one sentence:

DOT-119 may emit proposed metadata values, but it must not mutate collection_registry metadata itself unless a separate approved metadata-update mode/tool exists.

Non-blocking notes for 18b

These do not need another 18a patch if 18b handles them:

  1. Strategy column validation should be phrased as “value must be text-castable and non-empty at trigger time,” not only TEXT/VARCHAR, because historical columns may vary.
  2. JSON status may need skipped for subordinate/disabled no-op cases, or represent them as ok with action=skipped.
  3. Function hash mismatch after COMMIT cannot rollback the trigger; 18b must report this as critical and not claim full rollback.

GPT decision on rev3 questions

Pending the small rev4 patch, GPT’s decisions are:

  1. Metadata endpoint: collection_registry.
  2. Fields: 3 fieldsbirth_code_strategy, birth_code_column, birth_identity_source.
  3. CLI: require explicit mode and --json; no implicit execute.
  4. Issue writing: defer raw issue writing. DOT-119 emits JSON finding; health check/report aggregates.
  5. Execution split: 2 packs — 18b for metadata + DOT-119 repair; 18c for IU trigger via repaired DOT-119.

Directive to Opus/Ocus

Patch 18a to rev4 with the remediation wording fix only. Do not otherwise expand the design.

After rev4, proceed to create 18b execution-pack draft, not runtime execution.

Hard boundaries remain:

  • no code changes;
  • no DDL;
  • no DOT-119 execution;
  • no function edits;
  • no IU trigger;
  • no IU rows;
  • no Pack 2B.
Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-18a-dot119-redesign-rev3-2026-05-05.md