GPT Review — 23-P3C3 Natural Save Router Prompt rev2
GPT Review — 23-P3C3 Natural Save Router Prompt rev2
Date: 2026-05-07
Reviewer: GPT-5.5 Thinking / Incomex Hội đồng AI
Reviewed:knowledge/dev/laws/dieu44-trien-khai/prompts/23-p3c3-iu-natural-save-router-prompt.mdrev2
Verdict
P3C3 rev2 is close, but do not dispatch yet. Rev3 small patch required.
Opus applied the 10 rev2 fixes correctly: exact fn_iu_create(text,text,text,text), deterministic TEST_NEW_ADDR flow, policy-aware T4/T13, explicit draft context for comment, no policy switch, and no comment approval.
The remaining issues are test-verification hardening, not design blockers.
Accepted rev2 decisions
fn_iu_savehas onlyautoanddraftmodes.mode='apply'remains excluded.fn_iu_create(text,text,text,text)is required exactly.- New address creation uses
fn_iu_create(address,title,body,actor). - T2/T3/T4 use the P3C3-created pilot IU, avoiding legacy data pollution.
- T7 comments via explicit draft context.
- P3C3 does not switch
iu_edit.policy.default_mode. fn_iu_commentremains free-flow, no approval.
Required rev3 fixes
P1 — T13 must verify draft/comment deltas, not only IU/UV
Rev2 says T13 branches counts by policy, but it only enforces IU and UV counts. It prints draft/comment counts without asserting them.
Patch T13 to verify expected draft/comment deltas too.
If POLICY_BEFORE=auto_apply:
- IU = before + 1
- UV = before + 2
- Draft = before + 2
- T2 draft-only
- T3 auto path creates draft then applies it
- Comment = before + 2
- T3 apply/system comment
- T7 free-flow comment
If POLICY_BEFORE!=auto_apply:
- IU = before + 1
- UV = before + 1
- Draft = before + 2
- T2 draft-only
- T3 draft-created-review-required
- Comment = before + 1
- T7 free-flow comment
If the actual lower-layer implementation creates extra system comments on draft-only, report the exact delta and fail; do not silently accept until reviewed.
P2 — Preflight should require all lower-layer function signatures used or protected
Rev2 verifies key functions, but the boundary hash list includes more functions than preflight validates. Add exact preflight checks for all lower-layer functions that P3C3 depends on or promises not to alter:
public.fn_iu_create(text,text,text,text)
public.fn_iu_create_edit_draft(text,text,text,text,text)
public.fn_iu_edit_plan(text,text,text,text)
public.fn_iu_comment(text,text,text,text,text,jsonb)
public.fn_iu_apply_edit_draft(uuid,text,text)
public.fn_iu_edit(text,text,text,text,text,text)
public.fn_iu_verify_invariants(text)
public.fn_content_hash(text)
fn_iu_comment_edit_draft may be checked by proname if exact signature is uncertain, but preferably exact if known. If any expected function is missing, STOP.
P3 — Hash boundary should assert expected function count
P3C_HASHES_BEFORE and P3C_HASHES_AFTER can be equal even if both are missing a function because preflight missed it. Add SQL count for the protected function list before/after.
Expected count should match the protected list count. If using exact list above plus fn_iu_comment_edit_draft, expected is 9.
Report:
protected_function_count_before=9
protected_function_count_after=9
T12 should require both hash equality and count equality.
P4 — T9 PUBLIC grant check should use aclexplode via LATERAL
Rev2 uses target-list aclexplode(proacl) twice. Use a safer query:
SELECT count(*)
FROM pg_proc p
LEFT JOIN LATERAL aclexplode(p.proacl) x ON true
WHERE p.proname='fn_iu_save'
AND p.pronamespace='public'::regnamespace
AND x.grantee=0
AND x.privilege_type='EXECUTE';
Expected 0.
P5 — Report should include P3C3 pilot IDs and status samples
Final report should include enough evidence to understand what was retained:
test_new_addr=<...>
t1_status=<...>
t1_unit_id=<...>
t1_version_id=<...>
t2_draft_id=<...>
t3_status=<...>
t3_draft_id=<...>
t3_version_id=<... if any>
t7_comment_status=<...>
Rows are intentionally retained. Make that visible.
P6 — Cleanup semantics should be printed in final report even on PASS
Rev2 prints cleanup semantics only in the cleanup block on failure. Add final report lines unconditionally:
cleanup_on_test_fail=drop_fn_iu_save_only
test_rows_retained_on_fail=true
test_rows_retained_on_pass=true
This prevents ambiguity in PASS reports.
Directive to Opus
Patch P3C3 prompt to rev3 with P1–P6.
Path:
knowledge/dev/laws/dieu44-trien-khai/prompts/23-p3c3-iu-natural-save-router-prompt.md
Do not dispatch after patch. Return for GPT/User final review.
Hard boundaries remain
- No dispatch.
- No table DDL.
- No trigger/gateway changes.
- No vector mutation.
- No notification implementation.
- No cleanup/pilot deletion.
- Do not alter P3C1/P3C2/P3B-FU functions.
- Do not implement P3D.
- Do not add comment approval.
- Do not switch broad-use policy in P3C3.
Summary
Rev2 fixed the real architectural blocker around fn_iu_create. Rev3 should make the evidence stricter: exact protected function inventory, real draft/comment count assertions, safer PUBLIC grant check, and retained pilot IDs in the final report. After that, P3C3 should be dispatch-ready.