init_db's own schema_meta write was ON CONFLICT DO NOTHING, and the daemon (Coordinator.setup) calls init_db, never migrate() — so on an existing ledger the column was ensured but schema_version was never advanced (observed live: kind column present, schema_meta stuck at 3). migrate() already upserts the version correctly but was effectively dead code (no production caller). init_db now ends by calling migrate(conn), which steps the version and runs any version-gated steps. Idempotent — re-running the create/ensure statements is harmless. Regression test: an existing v3-stamped DB run through init_db now reports schema_version == SCHEMA_VERSION (4) and has the kind column. 1491 passed. |
||
|---|---|---|
| .. | ||
| db | ||
| nodes | ||
| transport | ||
| __init__.py | ||
| api.py | ||
| billing.py | ||
| ci_fetcher.py | ||
| ci_gate.py | ||
| ci_watcher.py | ||
| coordinator.py | ||
| dashboard.py | ||
| deadline_timer.py | ||
| decisions.py | ||
| dispatcher.py | ||
| draft_pr_monitor.py | ||
| graph.py | ||
| invoker.py | ||
| invoker_multi.py | ||
| ledger.py | ||
| operator_cli.py | ||
| recovery.py | ||
| responder.py | ||
| resume_worker.py | ||
| state_store.py | ||
| status_page.py | ||
| task_model.py | ||
| topology.py | ||