F-5 Ownership-Seed Rollback-Only — 05 Conflict & Negative Tests
05 — Conflict & Negative Tests
All six ran inside the live transaction, each isolated by SAVEPOINT n#; insert; ROLLBACK TO n#; under ON_ERROR_STOP=0. Every one failed closed with the expected error; transaction recovered each time (own stayed 2). Verbatim server errors:
N0 — duplicate active accountable → UNIQUE VIOLATION: duplicate key value violates unique constraint "uq_gov_obj_accountable" DETAIL: Key (object_type, object_ref, scope)=(collection, agents, audit) already exists. Conflict prevented at write time; v_object_owner_conflict returned 0 in-txn (can only observe non-active/historical rows). Structurally fail-closed.
N1 — invalid owner agency FK → violates foreign key constraint "governance_object_ownership_owner_gov_code_fkey" DETAIL: Key (owner_gov_code)=(GOV-NOPE) is not present in table "governance_registry".
N2 — invalid scope FK → violates foreign key constraint "governance_object_ownership_scope_fkey" DETAIL: Key (scope)=(not_a_scope) is not present in table "governance_responsibility_scope".
N3 — invalid owner_kind → violates check constraint "governance_object_ownership_owner_kind_check" (owner_kind='overlord').
N4 — delegated without TTL → violates check constraint "chk_delegated_ttl" (delegated + effective_to NULL).
N5 — invalid lifecycle_status → violates check constraint "governance_object_ownership_lifecycle_status_check" (lifecycle_status='pending').
Sequence note: failing rows reached synthetic ids 24–26; PostgreSQL sequences are non-transactional so the id sequence advanced even though every row rolled back — harmless id-gap, no rows persisted (post-rollback count=0).
Verdict: 6/6 fail closed. FK agency, FK scope, owner_kind, delegated-TTL, lifecycle, and single-accountable uniqueness all enforced by the substrate.