Jack Levy 5e52cf5903 fix: backfill_brief_labels bulk SQL runs before ORM load to prevent session flush race
Quoteless unlabeled points (old-format briefs with no citation system) were
being auto-labeled via raw SQL after db.get() loaded them into the session
identity map. SQLAlchemy's commit-time flush could re-emit the ORM object's
cached state, silently overwriting the raw UPDATE.

Fix: run a single bulk SQL UPDATE for all matching rows before any ORM objects
are loaded into the session. The commit is then a clean single-statement
transaction with nothing to interfere. LLM classification of quoted points
continues in a separate pass with normal flag_modified + commit.

Authored by: Jack Levy
2026-03-14 19:28:33 -04:00
2026-02-28 21:08:19 -05:00
2026-03-02 00:07:20 -05:00
2026-02-28 21:08:19 -05:00
2026-02-28 21:08:19 -05:00
2026-02-28 21:08:19 -05:00
Description
Self-hosted US Congress monitoring with AI bill analysis, personalized tracking, and multi-channel notifications.
GPL-3.0 809 KiB
Languages
Python 53.6%
TypeScript 45.8%
CSS 0.2%
Dockerfile 0.2%