ctrlrun.SQLiteStateStore — class, defined at src/ctrlrun/state.py:926
BEGIN IMMEDIATE, which holds the database’s write lock,
and effects.effect_key is a primary key — the UNIQUE(effect_key) constraint — so an
insert that races past the lock still fails rather than overwriting a reservation.
A connection is opened per thread; sqlite3 connections are not shareable. Separate
processes open the same file, which is the point.