Five remaining items from the May 2026 audit:
#15: Tightened integration test catalog count from >=14 to >=50 — current
catalog post-V9 is 60+ rows. Loose threshold would silently miss a future
migration that drops a chunk.
#17: Added migration-idempotency test
(server/src/__tests__/db/idempotency.test.ts):
- initDb -> close -> initDb on the same file produces identical row counts.
- Every catalog row has exactly one fallback_config entry.
- UNIQUE(platform, model_id) holds — no duplicate rows.
- Every enabled platform has a registered provider.
#19: crypto.ts now validates ENCRYPTION_KEY length and hex-format at
init time. A typo'd key like 'abc' previously fell through and only failed
on the first encrypt() with a cryptic node:crypto error. Now throws fast
with an actionable message including the command to generate a valid key.
Same validation applies to the DB-persisted key path. New test file
crypto-init.test.ts covers all paths (valid, too-short, too-long, non-hex
env key; cor…