v1.1.1 — startup crash fix
sys-buddy v1.1.1 — 2026-07-24
Patch release. One fix: the broker could not start against a database created before
1.1.0. Upgrade if you ran any earlier version and have existing tasks.
Fixed
Broker crashed on startup against a pre-1.1.0 database
Symptom — the broker aborts on boot with:
sqlite3.OperationalError: no such column: todo_id
... in init_db → conn.executescript(SCHEMA)
Cause — the index on contracts(todo_id) was declared in the schema block. That block
runs via executescript before the migration that adds the todo_id column. On a
fresh database the CREATE TABLE supplies the column, so indexing it succeeds. On
an existing database (one that predates todos) the CREATE TABLE IF NOT EXISTS is a
no-op — the column is not there yet — so creating the index raised no such column: todo_id and aborted startup before the migration could run.
Fix — the index is now created in init_db after the migrations, once the column is
guaranteed to exist whether it came from the fresh CREATE TABLE or the ALTER. A
regression test builds a pre-todos contracts table and runs init_db, so this class
of "existing-database only" failure is now covered.
Why it slipped through 1.1.0 — every test in the suite starts from a fresh database,
where the schema always creates the column before indexing it. The failure only
manifests on a real database that predates todos, which no test exercised. That gap is
now closed.
Migration
- None. Upgrading and restarting is sufficient; the broker migrates the database on
startup as before. A database that failed to open under 1.1.0 opens cleanly under
1.1.1 with all data intact — the crash happened before any write.