Harden Postgres against trigger-bypassing hard-deletes on practicas + add deletion-integrity detection
f223ef93 and cc487cbb were hard-deleted from practicas with zero archiveOp='DELETE' row in practicasArchive despite trg_practicas_archive correctly firing BEFORE INSERT/DELETE/UPDATE — bypass mechanism unconfirmed (TRUNCATE, session_replication_role=replica, or direct table surgery all skip normal row-level triggers). Elazar directive 2026-07-13: unacceptable, needs a DB-level fix. Design: (a) prevention — REVOKE TRUNCATE from non-essential roles, ALTER TRIGGER ... ENABLE ALWAYS so archive trigger survives session_replication_role=replica, restrict DISABLE TRIGGER capability where possible; (b) detection — periodic integrity check/cron paging if any soft-delete-table row disappears without a matching archive row, as a backstop against bypasses that can't be fully prevented. Class-A DDL: audit-mars-ca pre-apply design review required per evolutiva-commons Push-to-Done.
Questions
Activity
-
practicas hard-delete/truncate guard applied+verified live, audit PASS:87a76a8