KB-3FC1
GPT Review — P3D Pack1 Phase4 v5 ROLLED_BACK at G7 + v6 Directive
5 min read Revision 1
gpt-reviewp3dpack1phase4v5rolled-backg7v62026-05-11
GPT Review — P3D Pack 1 Phase 4 v5 ROLLED_BACK at G7 + v6 Directive
Date: 2026-05-11 Reviewer: GPT-5.5 Thinking / Incomex Hội đồng AI Reviewed:
knowledge/dev/laws/dieu44-trien-khai/reports/p3d-pack1-phase4-vocab-species-seed-implementation-report.mdknowledge/dev/laws/dieu44-trien-khai/reviews/opus-post-dispatch-review-p3d-pack1-phase4-v5-rolled-back-g7-2026-05-11.mdknowledge/dev/laws/dieu44-trien-khai/prompts/p3d-pack1-phase4-governance-vocab-species-prep-implementation-prompt-DRAFT.mdrev7/v5
Verdict
Agent execution was correct. ROLLED_BACK status is accepted.
No production data was damaged. No vocab rows were committed. The failure is a prompt-vs-production function contract mismatch at G7, not a bad seed, not a data corruption issue, and not an agent behavior issue.
Accepted evidence
- G1–G6 PASS.
- Live delta was computed from runtime data.
- Dry-run preview found the expected run snapshot: section/publication/unit_kind deltas, all live-derived or contract-declared.
- Inserted rows were captured by
RETURNINGinside the transaction before G7. - G7 failed before COMMIT because the prompt called a non-existent 4-arg/table-returning version of
fn_iu_create_plan. - PostgreSQL transaction auto-rolled back.
- Post-rollback check found
0rows with the run marker. dot_configvocab state remained unchanged.- Agent did not retry, improvise, edit prompt, seed species, migrate, or run extra sections after hard failure.
Root cause
DRAFT v5 assumed the wrong planner contract.
Prompt assumed:
fn_iu_create_plan(p_canonical_address, p_unit_kind, p_title, p_body) RETURNS row(status, resolved_unit_kind, would_create)
Production has:
fn_iu_create_plan(
p_canonical_address text,
p_title text,
p_body text,
p_actor text,
p_unit_kind text,
p_section_type text,
p_owner_ref text,
p_publication_type text,
p_parent_ref uuid
) RETURNS jsonb
This must be fixed in DRAFT v6.
Decision
Do not re-dispatch v5. Do not manually retry G7. Do not seed with ad-hoc SQL.
Patch DRAFT v6 narrowly:
- tighten G3 so it verifies function signature/return type before any delta/insert;
- fix G7 to call the 9-arg JSONB-returning function;
- parse/check JSONB result safely;
- keep all v5 no-hardcode and single-transaction properties unchanged.
No-hardcode constraints for v6
- Do not hardcode seed lists.
- Do not hardcode section/publication value for the planner probe if it can be selected from live registered vocab.
law_unitremains allowed only as Pack 1 EVOLVE contract-required value.- The planner probe should derive supporting
section_type/publication_typefrom livedot_configwhere needed. - No species mapping execution.
- No migration.
- No DDL.
Required v6 verification logic
G3 enhancement
Before creating deltas/inserting rows, G3 must verify:
public.fn_iu_create_planexists;- it returns
jsonb; - it has the expected 9 input argument names/types or an equivalent production-compatible signature;
- if signature differs, STOP before seed.
G7 enhancement
G7 must:
- call
fn_iu_create_planwith named args matching production signature; - pass
p_actorusing the run marker or another run-scoped actor string; - pass
p_unit_kind := 'law_unit'because this is the Pack 1 EVOLVE contract value; - choose
p_section_typefrom live registereddot_configvocab if needed, not from a hardcoded seed list; - use
NULL::uuidforp_parent_refif no parent is needed for planner probe; - store result as
jsonb; - verify JSONB has required keys before reading them;
- fail if
statuscontainsunresolved_vocab; - fail if
resolved_unit_kindis notlaw_unit; - commit only after G7 passes.
Status
phase4_vocab_v5_run=ROLLED_BACK_ACCEPTED
production_data_unchanged=true
v5_architecture=VALIDATED_EXCEPT_G3_G7_CONTRACT
v6_patch_allowed=true
agent_dispatch_allowed=false_until_GPT_USER_REVIEW
seed_execution_allowed=false_until_v6_approval
migration_allowed=false
next_action=OPUS_PATCH_DRAFT_V6_G3_G7_ONLY