Vellum/internal
mithral 129ad80f14 Guard the storage seam against erosion
Phase 3 built the seam; nothing stopped it being undone one convenient import at
a time. Two rules, both proven able to fail.

TestDatabaseSQLImportersAreDeclared freezes the blast radius of database/sql.
Twenty packages import it today and that set is now explicit. A new package that
needs its own SQL must be added deliberately, with a reason. The rule also fails
in the other direction — if a listed package stops importing database/sql, the
list must shrink, so it cannot rot into a meaningless allowlist.

TestThreadedConsumersStayOffSQL is the concrete regression guard: internal/
playback was moved onto catalog.Store, and this fails if it reaches for *sql.DB
again.

Both checks read non-test files only, so a package that needs database/sql
purely to build a test database is not forced onto the list.

Proven by breaking each on purpose:
  - dropping internal/media from the list  -> "imports database/sql but is not
    in sqlImporters"
  - adding internal/natsort (no SQL)       -> "is listed ... but no longer
    imports database/sql"
  - re-adding database/sql to playback     -> "undoes the seam"
All restored afterwards and the files verified unchanged.

Seven arch rules now, each able to fail. gofmt clean, build 0, vet 0, 25
packages pass.
2026-10-12 00:06:01 -04:00
..
apitoken Waves 9-10: Jellyfin and Subsonic clients can browse and play 2026-10-11 15:05:43 -04:00
arch Guard the storage seam against erosion 2026-10-12 00:06:01 -04:00
auth Wave 2: correctness and security 2026-10-11 13:31:34 -04:00
catalog Phase 3: a storage seam behind catalog, and one consumer threaded onto it 2026-10-11 16:16:07 -04:00
cli Beta blockers: async scans, admin CLI, deploy docs, pagination, password UI 2026-10-10 18:00:35 -04:00
core Wave 1: survive a real library 2026-10-11 13:10:34 -04:00
engine Waves 7-8: playback engine selection, and missing files you can see 2026-10-11 14:36:55 -04:00
home Phase 2: split the fat packages along real boundaries 2026-10-11 16:03:10 -04:00
httpapi Wave 3: search depth, transfer size, and the Home screen's tests 2026-10-11 13:46:18 -04:00
httpx Phase 1: accounts, sessions, per-library grants 2026-10-09 16:31:24 -04:00
jellyfin Close the Jellyfin test gap 2026-10-11 16:10:58 -04:00
jobs Wave 1: survive a real library 2026-10-11 13:10:34 -04:00
library Phase 2: split the fat packages along real boundaries 2026-10-11 16:03:10 -04:00
media Phase 2: split the fat packages along real boundaries 2026-10-11 16:03:10 -04:00
metadata Phase 2: split the fat packages along real boundaries 2026-10-11 16:03:10 -04:00
modules Phase 1: one item-access seam, and architecture rules that fail the build 2026-10-11 15:47:18 -04:00
natsort Phase 6a: directory grouping, audiobooks and music playback 2026-10-09 21:20:47 -04:00
playback Phase 3: a storage seam behind catalog, and one consumer threaded onto it 2026-10-11 16:16:07 -04:00
probe Waves 4-6: audio depth, ffprobe facts, and direct-play video 2026-10-11 14:14:32 -04:00
progress Wave 1: survive a real library 2026-10-11 13:10:34 -04:00
providers Phase 2: split the fat packages along real boundaries 2026-10-11 16:03:10 -04:00
scanner Phase 2: split the fat packages along real boundaries 2026-10-11 16:03:10 -04:00
search Wave 3: search depth, transfer size, and the Home screen's tests 2026-10-11 13:46:18 -04:00
stream Waves 4-6: audio depth, ffprobe facts, and direct-play video 2026-10-11 14:14:32 -04:00
subsonic Phase 2: split the fat packages along real boundaries 2026-10-11 16:03:10 -04:00