lazyflat/web
EiSiMo eb73b5e415 correctness batch: atomic writes, task refs, hmac, import-star, pickle
Per review §2:

- web/db.py: new _tx() context manager wraps multi-statement writers in
  BEGIN IMMEDIATE … COMMIT/ROLLBACK (our connections run in autocommit
  mode, so plain `with _lock:` doesn't give atomicity). partnership_accept
  (UPDATE + DELETE) and cleanup_retention (3 deletes/updates) now use it.
- Fire-and-forget tasks: add module-level _bg_tasks sets in web/app.py and
  web/enrichment.py. A _spawn() helper holds a strong ref until the task
  finishes so the GC can't drop it mid-flight (CPython's event loop only
  weakly references pending tasks).
- apply/main.py: require_api_key uses hmac.compare_digest, matching web's
  check. Also imports now use explicit names instead of `from settings *`.
- apply/language.py: replace `from settings import *` + `from paths import *`
  with explicit imports — this is the pattern that caused the LANGUAGE
  NameError earlier.
- alert/utils.py: pickle-based hash_any_object → deterministic JSON+sha256.
  Cheaper, portable across Python versions, no pickle attack surface.
- web/notifications.py: /fehler links repointed to /bewerbungen (the
  former page doesn't exist).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 19:14:26 +02:00
..
static rename to wohnungsdidi + didi logo + footer for all + seconds-only counter 2026-04-21 17:29:24 +02:00
templates wohnungen actions: keep label text, disable both buttons while running 2026-04-21 18:43:17 +02:00
app.py correctness batch: atomic writes, task refs, hmac, import-star, pickle 2026-04-21 19:14:26 +02:00
apply_client.py multi-user: users, per-user profiles/filters/notifications, tab UI, apply forensics 2026-04-21 10:52:41 +02:00
auth.py multi-user: users, per-user profiles/filters/notifications, tab UI, apply forensics 2026-04-21 10:52:41 +02:00
db.py correctness batch: atomic writes, task refs, hmac, import-star, pickle 2026-04-21 19:14:26 +02:00
Dockerfile lazyflat: combined alert + apply behind authenticated web UI 2026-04-21 09:51:35 +02:00
enrichment.py correctness batch: atomic writes, task refs, hmac, import-star, pickle 2026-04-21 19:14:26 +02:00
llm.py secrets tab, drop commute filter, favicon, robust error reports 2026-04-21 17:56:57 +02:00
matching.py chore: sweep dead code across all three services 2026-04-21 19:06:05 +02:00
notifications.py correctness batch: atomic writes, task refs, hmac, import-star, pickle 2026-04-21 19:14:26 +02:00
requirements.txt enrichment: drop LLM for structured info, dedup images by sha + phash 2026-04-21 15:29:55 +02:00
retention.py multi-user: users, per-user profiles/filters/notifications, tab UI, apply forensics 2026-04-21 10:52:41 +02:00
settings.py chore: sweep dead code across all three services 2026-04-21 19:06:05 +02:00