SQLite
-
Writing the same file at once without breaking it
The CLI and GUI are separate processes, and both write the same store.sqlite at the same time. It holds together because each write is wrapped whole in a single transaction that SQLite serializes, and rolls back whole on failure. Every change leaves one row in change_feed, and the GUI watcher re-reads only what changed by cursor and shows it.
-
Why catching up is fast
Part 1 measured search running about twice as light, and Part 2 showed that the store is a graph. This part is how that graph is read: catching up on a task follows only the few connected records by index (O(result)). State like whether a task is startable or whether a decision is still current is never stored — it is derived on the spot from the edges, so the list, the card, and the start guard never disagree.