KB-225B
GPT Final Approval — 23-P3D2 Notification Triggers Prompt rev7
5 min read Revision 1
gpt-reviewpack-23p3d2approved-for-dispatchnotificationtriggersboardread-state
GPT Final Approval — 23-P3D2 Notification Triggers Prompt rev7
Date: 2026-05-08
Reviewer: GPT-5.5 Thinking / Incomex Hội đồng AI
Reviewed:knowledge/dev/laws/dieu44-trien-khai/prompts/23-p3d2-notification-triggers-prompt.mdrev7
Verdict
APPROVED FOR DISPATCH.
P3D2 rev7 is self-contained and resolves the remaining test-order blocker. It may now be executed.
Accepted rev7 fixes
- Prompt remains self-contained with full Variant A/B SQL inline.
- Test order is now correct: birth → draft → comment on draft → apply draft.
- Comment test uses explicit draft context and fails cleanly if comment routing does not produce a comment.
- Final report includes
test_draft_id,comment_context=draft_id, andcomment_route=fn_iu_comment_with_explicit_context. - Active object verification checks 4 functions + 3 triggers = 7 before PASS.
- Final report includes
active_object_countandactive_object_check. - Final report includes
latest_readers_gpt_verified. - Board/read-state semantics include implicit self-read for creator and explicit read state for actors who mark events read.
Dispatch instruction
Đọc prompt từ KB rồi thực hiện:
knowledge/dev/laws/dieu44-trien-khai/prompts/23-p3d2-notification-triggers-prompt.md
Mục tiêu:
Bật P3D2 notification runtime bằng PG triggers + board function:
1. fn_iu_notif_comment() + trg_aa_iu_notif_comment
2. fn_iu_notif_draft() + trg_aa_iu_notif_draft
3. fn_iu_notif_version() + trg_aa_iu_notif_version
4. fn_iu_notification_board(text,text,integer)
Report tại:
knowledge/dev/laws/dieu44-trien-khai/reports/23-p3d2-notification-triggers-report.md
Upload report kể cả FAIL/CRITICAL.
Hard boundaries for Agent
- No Pack 23 function changes.
- No P3D1 table/function changes.
- No gateway/birth trigger changes.
- No vector mutation.
- No LISTEN/NOTIFY.
- No retention/archival.
- No external queue.
- No global read flag.
- No Hermes production start.
Expected PASS evidence
Report should include:
phase_status=PASS;fn=OK;test_fail=0;- T1–T16 PASS;
- 4 new functions exist:
fn_iu_notif_comment();fn_iu_notif_draft();fn_iu_notif_version();fn_iu_notification_board(text,text,integer);
- 3 new triggers exist:
trg_aa_iu_notif_comment;trg_aa_iu_notif_draft;trg_aa_iu_notif_version;
active_object_count=7;active_object_check=PASS;- Pack 23 hashes unchanged;
- P3D1 hashes unchanged;
- comment event created from
fn_iu_commentwith explicit draft context; - system/apply comment suppression works;
- draft event created;
- version/apply event created;
- birth/version_seq=1 excluded;
- actionable filter hides applied draft from review inbox;
- per-actor read isolation works;
- creator implicit self-read works;
- latest readers include GPT after mark_read;
- source safety passes;
- security metadata passes;
- test notification/read rows cleaned on PASS;
notification_runtime=ACTIVE;notification_board=ACTIVE;per_actor_read_state=ACTIVE;hermes_readiness=BLOCKED_PENDING_REVIEW;next_required_pack=P3D3_CONTEXT_UPDATE_FOR_NOTIFICATION_COMMANDS.
Operational meaning if PASS
After P3D2 PASS, PG will automatically create notification events when IU comments, drafts, and official applied versions are created.
The PG-native user-facing model becomes:
fn_iu_unread(actor) -- actor's unread/actionable inbox
fn_iu_mark_read(event_ids, actor) -- mark seen for that actor only
fn_iu_notification_board(actor) -- summary board with read_status_source/latest_readers
Read-state semantics:
- creator actor receives implicit self-read;
- explicit read rows are created only through
fn_iu_mark_read; - GPT read state does not hide items for Opus;
- Opus read state does not hide items for GPT.
Next after Agent report
If P3D2 PASS:
- Review P3D2 execution report.
- Treat notification runtime as active for limited use.
- Do not start Hermes production yet.
- Create P3D3 context update pack so future AI/Agent sessions know notification commands:
fn_iu_unread(actor);fn_iu_mark_read(event_ids, actor);fn_iu_notification_board(actor);- implicit self-read;
- actionable board scope.
Note
P3D2 activates PG-native notifications. Hermes production remains a separate reviewed decision after context pack update and operational validation.