KB-7EDC

23-P3C4 — IU Policy Switch + Agent Context Pack — Report

4 min read Revision 1
p3c4reportiupolicycontext-packp3d-anchor

23-P3C4 — IU Policy Switch + Agent Context Pack — Report

Date: 2026-05-07 Prompt: knowledge/dev/laws/dieu44-trien-khai/prompts/23-p3c4-iu-policy-and-agent-context-prompt.md (rev5) Run TS: 20260507-125720 Log: /tmp/23-p3c4.20260507-125720.log (VPS)

Result Summary

Field Value
phase_status PASS
policy_action UPDATED_AUTO_APPLY_TO_REQUIRE_REVIEW
policy_before auto_apply
policy_after_switch require_review
policy_final require_review
switch_status APPLIED
rollback_status NOT_RUN
context_pack_upload PASS
p3d_anchor_upload PASS
context_upload PASS
functions_unchanged true
protected_count 10 → 10
test_fail 0

Test Matrix (T1–T8)

Test Status Detail
T1 — policy is require_review PASS dot_config.iu_edit.policy.default_mode = require_review
T2 — fn_iu_save new addr → official v1 PASS unit_version count=1, version_seq min=max=1, invariants all_pass=true
T3 — fn_iu_save existing addr (mode=auto) → draft, no UV created PASS status=draft_created_review_required, draft_id=ce6053c7-8a2e-4e59-88c9-d4e02f15dfa7, policy=require_review, guidance="Awaiting review.", next_action=fn_iu_apply_edit_draft, UV unchanged
T4 — reviewer apply draft creates official version PASS status=applied, version_id=255769b0-2848-48b5-bd0d-7fa54f811ade, UV +1
T5 — mode='draft' creates draft only, no UV PASS draft_id=5caf9ea6-cd0a-4983-9e19-7b2ad0f35a66, UV unchanged
T6 — fn_iu_comment free-flow → comment_added PASS unit_edit_comment +1
T7 — wrong-door direct INSERT into information_unit blocked PASS "IU Gateway blocked"
T8 — protected fn hashes unchanged, count=10 PASS hashes match, count 10→10

Pilot IU

  • Address: test/p3c4/pilot-20260507-125720
  • T3 draft id: ce6053c7-8a2e-4e59-88c9-d4e02f15dfa7
  • T4 applied version: 255769b0-2848-48b5-bd0d-7fa54f811ade
  • T5 draft-only id: 5caf9ea6-cd0a-4983-9e19-7b2ad0f35a66
  • Pilot retained (no cleanup per hard boundary).

Counts (before → after)

  • information_unit: 9 → 10
  • unit_version: 14 → 16
  • unit_edit_draft: 9 → 11
  • unit_edit_comment: 10 → 12

Policy Switch

  • Single key changed: iu_edit.policy.default_mode
  • Path: auto_applyrequire_review (rowcount-guarded UPDATE returned 1 row)
  • Verified post-switch via SELECT: require_review
  • Final query (after upload gate): require_review
  • Rollback: NOT_RUN (tests + upload all PASS)

Uploads

Artifact Path Status
Context pack knowledge/dev/laws/dieu44-trien-khai/context-packs/iu-agent-front-door-context.md PASS (revision 1, verified)
P3D anchor knowledge/dev/laws/dieu44-trien-khai/design/23-p3d-notification-outbox-read-state-design-anchor.md PASS (revision 1, verified)

AI Interface (production — require_review)

fn_iu_save(address, body, actor)          -- create/edit (new=official, existing=draft)
fn_iu_comment(address, actor, comment)    -- free-flow comment
fn_iu_apply_edit_draft(draft_id, actor)   -- reviewer approval

Notification

  • notification_design = PG_NATIVE_EVENT_OUTBOX_WITH_PER_ACTOR_READ_STATE
  • notification_implementation = DEFERRED_P3D
  • Anchor: knowledge/dev/laws/dieu44-trien-khai/design/23-p3d-notification-outbox-read-state-design-anchor.md

Hard-Boundary Compliance

  • ✅ No function changes (T8 hashes unchanged, count=10)
  • ✅ No table DDL / trigger / gateway change
  • ✅ No vector mutation
  • ✅ No notification implementation in P3C4
  • ✅ No cleanup / pilot deletion
  • ✅ Single dot_config key changed: iu_edit.policy.default_mode
  • ✅ Context pack contains no raw rollback instructions

Status

pack23_status = MINIMUM_EDIT_WORKFLOW_COMPLETE