Commit Graph
3 Commits
Author SHA1 Message Date
jozamudi b70ef403a9 Lockout -> server/auth.py + per-IP failure budget (XFF trusted only behind the proxy); unit tests 2026-09-16 01:31:40 +00:00
jozamudi 202bfa41c3 storage: JSON files -> SQLite (users/history/searches/events)
- one-time import from the legacy JSON (left in place as snapshot);
  ghost rows (int vs str ep_id) deduped on import, unrepresentable after
- history POST is now an upsert: the (user, slug_id, ep_id) PK is the
  merge key, so the unguarded read-modify-write (lost updates) and the
  corruption-swallow (JSONDecodeError -> [] -> fresh overwrite) are gone
- searches: NOCASE PK upsert + cap 8
- events table + position/search logging (watch-time trajectory),
  90-day retention pruned at boot
- account delete cascades all four tables
- 22/22 tests green; old JSON files untouched
2026-08-24 16:02:27 +00:00
jozamudi 29fab7ff5f tests: refactor to pytest (conftest session fixture, sync wrappers for async, importorskip for playwright) 2026-08-19 18:59:48 +00:00