GPT Review — DOT-119 P2 Report and 18c Directive
GPT Review — DOT-119 P2 Report and 18c Directive
Date: 2026-05-05 Reviewer: GPT-5.5 Thinking / Incomex Hội đồng AI Reviewed:
knowledge/dev/laws/dieu44-trien-khai/reports/dot119-repair-p2-script-rewrite-report.md
Verdict
P2 PASS.
Agent executed the DOT-119 script rewrite correctly and honored all hard boundaries.
Evidence verified from actual P2 report
- v1 backup created:
/opt/incomex/backups/dot-birth-trigger-setup.v1.bak.20260505080351- md5
a0b926d3fd373b8995aea2f4e8136e01
- v2 installed:
- md5
5883bce405b86ab436e885cf16fd22de - 365 lines
- permissions executable
- md5
- 18/18 smoke tests PASS.
synthetic_capability:"pass"verified forinformation_unitdry-run.- No-clobber checks PASS:
- 0 occurrences of
CREATE OR REPLACE FUNCTION fn_birth_registry_auto - 0 occurrences of
KNOWN_V2_FN_HASH
- 0 occurrences of
- Core invariants preserved:
fn_birth_registry_autohash unchanged:1f729b3571a74963089bb3ef388217f3- birth trigger count unchanged: 30
- birth_registry count stable within P2 run: 75,613 → 75,613
- Rollback did not happen:
- final state = v2 active
- Out-of-scope boundaries respected:
- no function edit
- no IU trigger
- no IU rows
- no Pack 2B
- no DDL/seed changes
Hardcode assessment
P2 satisfies the anti-hardcode direction:
- no hardcoded collection-to-column mapping in script;
- strategy/column/function choice derived from
collection_registrymetadata; - no hardcoded function hash as execution gate;
- function hash used only as audit/no-clobber evidence;
- smoke samples selected by metadata queries rather than fixed collections, except explicit target
information_unitfor synthetic dry-run, which is the intended next collection.
P3 decision
18b originally had P3 for HC registration. P3 is useful but not blocking for the main objective.
Given User priority is to continue toward IU usability, GPT recommends:
Skip/defer P3 as TD for now, and proceed to 18c — install IU birth trigger using repaired DOT-119.
Rationale:
- DOT-119 repair objective is complete.
- HC registration can be done later without blocking IU birth trigger.
- The main unresolved gate before Pack 2B is IU birth trigger.
Next directive to Opus/Ocus
Create 18c prompt, not runtime execution yet:
knowledge/dev/laws/dieu44-trien-khai/prompts/18c-iu-birth-trigger-install-prompt.md
18c should use the repaired DOT-119 v2, not raw CREATE TRIGGER.
18c scope
Install/verify birth trigger for information_unit only:
dot-birth-trigger-setup --collection=information_unit --dry-run --json
dot-birth-trigger-setup --collection=information_unit --execute --json
dot-birth-trigger-setup --collection=information_unit --verify --json
18c preflight
Prompt must verify:
- DOT-119 v2 is installed:
- md5
5883bce405b86ab436e885cf16fd22deor at least v2 behavior checks pass; - no
CREATE OR REPLACE FUNCTION fn_birth_registry_autoin script; - no
KNOWN_V2_FN_HASHin script.
- md5
collection_registryrow:information_unit.birth_code_strategy = synthetic_idbirth_code_column IS NULLbirth_identity_source = manual
information_unittable exists.- No IU rows yet:
SELECT count(*) FROM information_unit;expected 0.
- No existing
trg_birth_information_unittrigger. fn_birth_registry_autohash captured as run-local baseline and unchanged after 18c.- Current birth trigger count captured as run-local baseline.
- Current
birth_registrycount captured as run-local baseline; use run-local model, not hardcoded count.
18c execution
Use DOT-119 v2 only:
--dry-run --jsonmust show:- strategy
synthetic_id - args
'__birth_synthetic_id__' synthetic_capability:"pass"- proposed trigger SQL for
trg_birth_information_unit
- strategy
--execute --json- creates trigger if absent;
- if already exists and matches, should be idempotent/skip; but preflight expects absent.
--verify --json- must return exit 0 and status verified.
18c post-verify
Verify independently via SQL:
SELECT tgname, tgfoid::regproc, pg_get_triggerdef(oid)
FROM pg_trigger
WHERE tgname='trg_birth_information_unit' AND NOT tgisinternal;
Expected:
- exactly 1 row;
- function
fn_birth_registry_auto; - trigger definition includes
'__birth_synthetic_id__'.
Also verify:
- function hash unchanged;
- birth trigger count increased by exactly +1 from run-local baseline;
- birth_registry count unchanged during trigger install;
- information_unit row count remains 0.
18c report
Upload:
knowledge/dev/laws/dieu44-trien-khai/reports/iu-birth-trigger-install-18c-report.md
Report must include:
- preflight outputs;
- dry-run JSON;
- execute JSON;
- verify JSON;
- independent SQL trigger definition;
- function hash before/after;
- trigger count before/after;
- birth_registry count before/after;
- IU row count before/after;
- hard boundaries confirmation.
18c hard boundaries
- no raw CREATE TRIGGER;
- no function edits;
- no IU rows;
- no Pack 2B CRUD;
- no seed/DDL;
- no system_health_checks / P3 work.
After 18c report: HARD STOP. GPT/User reviews before opening Pack 2B.
TD / deferred item
P3 health-check registration remains deferred:
H-BIRTH-IDENTITY-UNCLASSIFIED/ related HC registration;- should be handled after 18c or during a later health-check hygiene pass.