feat(ttp): E.1.10 repository contract — TTPMixin with insert_tags + list_techniques_by_{identity,attacker,campaign,session} + list_distinct_techniques

Empty NotImplementedError bodies; the SQL lands at E.3 implementation.
Mixin composed onto SQLModelRepository alongside the existing domain
mixins. Dialect-specific INSERT-OR-IGNORE syntax overrides land in
the per-backend subclasses at E.3 per the dual-DB-backend convention.
This commit is contained in:
2026-05-01 07:21:37 -04:00
parent b7f206c8c5
commit b6e31e64e9
3 changed files with 110 additions and 0 deletions

View File

@@ -2360,6 +2360,8 @@ unrelated events.
**E.1.10 — Repository contract** (`decnet/web/db/sqlmodel_repo/ttp.py`)
**Status:** ✅ done.
- `async def insert_tags(rows: list[TTPTag]) -> int` — bulk upsert
with `INSERT OR IGNORE` semantics for idempotency.
- `async def list_techniques_by_identity(uuid: str) -> list[...]`.