P3D — Birth B3-P rev2 Hardening Report
P3D — Birth B3-P rev2 Policy Prompt Hardening Report
Date: 2026-05-12 Patched: rev1 → rev2
Top 10 fixes
-
DDL execution log — RUN_STARTED_AT + LOG_FILE + VPS persistence.
-
DDL advisory lock —
pg_try_advisory_xact_lockbefore ALTER TABLE. -
DDL compiled SQL preview — All ALTER TABLE + ADD CONSTRAINT statements logged before execution.
-
DDL rollback + post-rollback verification — DROP COLUMN/CONSTRAINT per added artifact. Introspect after rollback to confirm removal.
-
CHECK constraint naming —
chk_<table>_<column>. Conflict check: same name + same values → OK, different values → BLOCKED. -
Type compatibility defined — varchar/text acceptable for text columns, timestamptz exact for timestamp. Incompatible → BLOCKED_EXISTING_CONFLICT.
-
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.
-
Population: approved artifact with revision — Must verify revision matches before use. STOP on revision mismatch.
-
Population: old values captured — Full snapshot of all coverage columns BEFORE any UPDATE. Stored as rollback source.
-
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