KB-7659

GPT Review — P3D Pack1 Phase5C2 rev1 Not Approved Missing Schema Concepts

6 min read Revision 1
gpt-reviewp3dpack1phase5c2rev1not-approvedschema-concepts2026-05-12

GPT Review — P3D Pack 1 Phase 5C2 rev1 Candidate Not Approved: Missing Schema Concepts

Date: 2026-05-12 Reviewer: GPT-5.5 Thinking / Incomex Hội đồng AI Reviewed:

  • knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-pack1-phase5c2-dieu35-hybrid-pilot-migration-prompt-DRAFT.md rev1
  • knowledge/dev/laws/dieu44-trien-khai/reports/p3d-pack1-phase5c2-rev1-dispatch-candidate-patch-report.md
  • knowledge/dev/laws/dieu44-trien-khai/directives/gpt-directive-opus-p3d-pack1-phase5c2-write-rev1-dispatch-candidate-2026-05-12.md

Verdict

5C2 rev1 is directionally correct but NOT approved for Agent dispatch yet.

The authority blocker is correctly resolved, and the prompt adds major production safeguards. However, it still contains schema-sensitive column references that are used in executable sections without being present in the semantic field registry.

This is the same hardcode class we repeatedly removed in Phase 5C1 and 5C2A.

What is accepted

  1. publication_authority_ref_value = incomex_council is correct.
  2. publication_authority_vocab_key = vocab.publication_authority.incomex_council is correct.
  3. D3a hybrid remains correct.
  4. parent_or_container_ref = NULL remains correct.
  5. Execution log is required and present.
  6. Advisory transaction lock is required and present.
  7. One transaction for pilot migration is correct.
  8. Render fidelity checks are required and present.
  9. Exact-key rollback remains required.
  10. No TAC writes / no DDL / no function patch is correct.

Blocking issue: unresolved concepts used in executable sections

The prompt says all column names must come from semantic registry + live introspection, but several executable sections still use literal or placeholder fields not defined in §3.

Missing or incomplete concepts

The prompt uses these, but §3 does not resolve them:

tac_publication.doc_code
tac_publication.publication_type
tac_logical_unit.owner or owner_ref
target information_unit.identity_profile
birth_registry.entity_id / birth_entity
birth_registry.species / species_identifier exact field
birth_registry.collection_table / collection_table_key exact field
information_unit.canonical_address used in invariant loop
unit_version.id / information_unit.id assumptions around fn_iu_create result shape

Examples:

  • PF-1 uses p.<doc_code col> but tac_pub_doc_code is not in §3.
  • Migration C2 uses row.<owner col> but owner concept is not in §3.
  • Migration C2 uses row.<publication_type col> but publication type concept is not in §3.
  • C4 updates <identity_profile col> but IU identity profile concept is not in §3.
  • D4 hardcodes birth_registry WHERE collection_table = 'information_unit' AND entity_id::uuid ... AND species IS NULL instead of resolved concepts.
  • D6 uses canonical_address directly in the invariant loop.
  • §8B rollback uses <entity_id> without defining it.

These must be resolved before dispatch.

Required correction

Patch to rev2 by adding a complete concept registry for all fields used in executable sections.

Minimum additions:

tac_pub_doc_code
tac_pub_publication_type
tac_lu_owner_ref
iu_identity_profile
iu_pk
iu_canonical_address
uv_pk
birth_entity_ref
birth_species_identifier
birth_collection_key
birth_pk

Then update all executable sections to reference these concepts only.

If a concept is missing or ambiguous at runtime, gate must fail before write.

Additional hardening recommendations

1. Separate planner/result-shape discovery from write transaction

fn_iu_create shape discovery through SAVEPOINT is acceptable only if the prompt is explicit that any test row is fully rolled back and cannot leak birth_registry rows. Prefer planner-only if it returns enough keys; otherwise abort and ask GPT rather than committing discovery rows.

2. BirthRegistry verification must be exact

For inserted IU ids, verify exactly one birth_registry row per inserted IU, not merely “species non-null count = 0”. Required checks:

birth_row_count_for_captured_iu_ids = inserted_iu_count
birth_null_species_count = 0
birth_species_value = information_unit_atom
birth_composition_value = atom if composition field resolves

3. Authority vocab should be read by resolved dot_config columns

G0-10 already says live check. Ensure prompt states use resolved config_key and config_value, not literal key/value.

4. Rollback order must be validated against FK behavior

Deleting birth_registry before IU/UV is directionally sensible, but if triggers auto-manage birth_registry, Agent should first inspect or use exact delete order that succeeds in dry run/transaction. No pattern matching.

Required next action

Open:

P3D_PACK1_PHASE5C2_REV2_COMPLETE_SCHEMA_CONCEPTS

Mode:

PATCH 5C2 PROMPT ONLY — no execution

Status

phase5c2_rev1_candidate=NOT_APPROVED_FOR_DISPATCH
reason=missing_schema_concepts_in_executable_sections
publication_authority_ref_value=incomex_council
agent_dispatch_allowed=false
migration_allowed=false
next_action=OPUS_PATCH_5C2_PROMPT_REV2_COMPLETE_SCHEMA_CONCEPTS
Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-p3d-pack1-phase5c2-rev1-candidate-not-approved-schema-concepts-2026-05-12.md