From 11d3711bbf656edd02964ca5a265dffb79f3a50c Mon Sep 17 00:00:00 2001 From: graphlemon Date: Thu, 6 Aug 2026 17:49:32 +0800 Subject: [PATCH] graphlemon: auto-commit uncommitted changes for 63352d3f-796c-40b3-b63b-ef5efad7d7f3-main-checkout-drift --- src/backend_server.py | 13 +++++++++++++ 1 file changed, 13 insertions(+), 0 deletions(-) diff --git a/src/backend_server.py b/src/backend_server.py index 2f85ddc..9788236 100644 --- a/src/backend_server.py +++ b/src/backend_server.py @@ -1000,6 +1000,19 @@ def _ensure_schema(conn): ).fetchone() if exists is None: schema.create_schema(conn) + # 2026-08-06 (real incident): create_schema() above only ever runs for a + # BRAND NEW db file. Every schema.migrate_*() function is documented as + # idempotent/safe-to-call-unconditionally (including against a fresh + # create_schema()'d db, which already has whatever they'd add), but + # nothing ever actually called them against an EXISTING, already- + # populated database until now -- caught for real when this exact + # process restarted against the live production db and every + # GET /api/tasks/:id started 500ing with "no such column: parent_run_id" + # (D's migrate_add_work_graph_fork_columns had shipped and been tested, + # but never wired into the one code path that runs on every real + # startup). Run all three every time, not just on first-ever creation. + schema.migrate_expand_artifact_types(conn) + schema.migrate_relax_org_node_constraints(conn) # also runs migrate_add_work_graph_fork_columns internally class _Server(ThreadingHTTPServer): -- libgit2 0.21.4