KB-6521

P3D — Birth B3-P rev2 Hardening Report

2 min read Revision 1
p3dbirth-systemb3prev2hardeningreport

P3D — Birth B3-P rev2 Policy Prompt Hardening Report

Date: 2026-05-12 Patched: rev1 → rev2


Top 10 fixes

  1. DDL execution log — RUN_STARTED_AT + LOG_FILE + VPS persistence.

  2. DDL advisory lockpg_try_advisory_xact_lock before ALTER TABLE.

  3. DDL compiled SQL preview — All ALTER TABLE + ADD CONSTRAINT statements logged before execution.

  4. DDL rollback + post-rollback verification — DROP COLUMN/CONSTRAINT per added artifact. Introspect after rollback to confirm removal.

  5. CHECK constraint namingchk_<table>_<column>. Conflict check: same name + same values → OK, different values → BLOCKED.

  6. Type compatibility defined — varchar/text acceptable for text columns, timestamptz exact for timestamp. Incompatible → BLOCKED_EXISTING_CONFLICT.

  7. Population: zero hardcoded counts — Removed all "29", "43", "20", "11", "4", "~20", "~28", "7", "3". Agent counts dynamically from classification artifact. Reports derived counts for verification.

  8. Population: approved artifact with revision — Must verify revision matches before use. STOP on revision mismatch.

  9. Population: old values captured — Full snapshot of all coverage columns BEFORE any UPDATE. Stored as rollback source.

  10. Population: rollback restores old values — Per-row restore from snapshot, not blanket NULL. Post-rollback verification compares with snapshot.


Confirmation

b3p_design_rev=2
b3p_ddl_prompt_rev=2
b3p_population_prompt_rev=2
agent_dispatch_allowed=false
phase5c2_migration_allowed=false

B3-P rev2 Hardening Report | 2026-05-12

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reports/p3d-birth-system-b3p-rev2-policy-prompt-hardening-report.md