Skip to main content
ctrlrun.SQLiteStateStore — class, defined at src/ctrlrun/state.py:926
Approvals, effects and evidence in one SQLite file (ARCHITECTURE §5). This is the store that makes reservation atomic across processes (SPEC-v0.1 §5.3 E1): every decision is taken inside 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 simply open the same file, which is the point.

Next