KB-7B50

GPT Review — P10A-2B D35 Execute + Render Prompt v0.1

4 min read Revision 1
s187gpt-reviewp10a-2bd35execute-rendermicro-patchproduction-mutation

GPT Review — P10A-2B D35 Execute + Render Prompt v0.1

Date: 2026-04-29

Verdict

APPROVE WITH SMALL PATCHES — nearly ready for execution.

P10A-2B v0.1 is concise and correctly focuses on executing the already-reviewed package, rendering D35 back from PostgreSQL, and producing user-visible deliverables. It is not overcomplicated.

Because this is the first real insert into TAC core/member tables, a few safety guardrails must be added before dispatch.

Law / constitutional check

No conceptual conflict after small patches.

  • Hiến pháp / Zero Trust: aligned if SHA/package/schema/backups are verified immediately before execution.
  • Điều 38 / LSL-01: aligned. This is the first visible information-unit pilot.
  • Điều 33 / PostgreSQL SSOT: aligned. Pilot rows go into PG; source KB remains reference.
  • Gate separation: aligned. No Nuxt/KG/vector/broad migration.
  • Đ41: aligned. KB deliverables are canonical; temp files/logs must be recorded.

Accepted points

  1. Fresh preflight exists.
  2. SHA verification of package artifacts exists.
  3. Insert is run once using psql -v ON_ERROR_STOP=1 -X.
  4. Post-verify row counts and lifecycle states are included.
  5. Render + original + diff + tree + counts + rollback instructions are included.
  6. Hard exclusions are correct.

Required small patches

Patch 1 — Add backup/safety snapshot preflight

Before execution, verify backup/safety evidence from existing P9/G9 or current backup state.

Minimum acceptable wording:

  • Verify latest relevant DB backup/safety snapshot reference exists from P9/G9, or capture pg_dump --schema-only + row-count snapshot for TAC tables before insert.
  • Do not run a destructive backup operation; this is just safety evidence.
  • If no backup/snapshot evidence can be found, STOP and report.

Patch 2 — Strengthen schema unchanged check beyond column count

Column count = 54 is a useful quick check but insufficient. Add one compact check:

  • capture and compare target table constraint/trigger counts against P10A-2A expectations;
  • expected: 4 target tables, 54 columns, 6 TAC triggers enabled, and no new collision rows.

No need to repeat full schema discovery.

Patch 3 — Pub_id extraction must be robust

The insert SQL emits RAISE NOTICE 'pub_id=%'. Prompt should require:

  • parse pub_id from insert output;
  • verify it is a valid UUID;
  • verify SELECT id FROM tac_publication WHERE id='<pub_id>' returns exactly 1;
  • if pub_id cannot be parsed, STOP and do not guess.

Patch 4 — Rollback is not automatic after post-commit mismatch

If insert commits but row-count/lifecycle/render verification fails, do not automatically execute rollback. Stop, report IDs, and await GPT technical decision.

If insert command fails before COMMIT, rely on transaction rollback and verify no D35 partial rows.

Patch 5 — Render output conversion should be explicit

The render SQL returns rows, not markdown by itself. Add:

  • save raw render output;
  • transform rows into markdown with a small deterministic script using depth/title/body;
  • if parser/transform fails, still upload raw render output and report failure.

Directive to Opus 4.6

Patch P10A-2B v0.1 with the five small changes above. Do not rewrite the whole prompt.

After patch, GPT considers it ready for dispatch under delegated technical approval unless the patch introduces new scope.

Do not add new design debates. Do not ask User for technical approval.

Current state

  • P10A-1 discovery: PASS.
  • P10A-1B candidate v2: PASS.
  • P10A-2A package: PASS accepted.
  • P10A-2B v0.1: nearly ready, needs small safety patch.
  • User-visible result: pending P10A-2B execution.