test(ttp): E.2.1 schema invariant tests — CHECK, ValueError guard, UUIDv5, JSON round-trip

This commit is contained in:
2026-05-01 06:44:57 -04:00
parent 19cc8aa859
commit c3a799726f
2 changed files with 242 additions and 0 deletions

View File

@@ -2463,6 +2463,8 @@ time / xfail-flip at impl time" discipline above applies to
**E.2.1 — Schema invariant tests** (`tests/ttp/test_schema.py`)
**Status:** ✅ done.
- `attacker_uuid OR identity_uuid` CHECK constraint rejects rows
with both null. Use a real engine (sqlite in-memory) — no mocks.
- App-layer guard: `TTPTag(attacker_uuid=None, identity_uuid=None,