From 1571e949f18ae41efd8b77b506c8c8654dbb8d6d Mon Sep 17 00:00:00 2001 From: "useotto-dev[bot]" <252773270+useotto-dev[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 12:50:42 -0700 Subject: [PATCH] fix(ingest): accept empty convex run output for the complete migration lock Convex CLI prints nothing when a function returns null, so the complete phase failed with a JSON parse error after the organization migration had already finished. Co-Authored-By: Claude Fable 5.1 --- scripts/ingest-recovery/agent-migration-runtime.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/ingest-recovery/agent-migration-runtime.ts b/scripts/ingest-recovery/agent-migration-runtime.ts index 24420c9b..307e2c71 100644 --- a/scripts/ingest-recovery/agent-migration-runtime.ts +++ b/scripts/ingest-recovery/agent-migration-runtime.ts @@ -249,7 +249,8 @@ export async function controlPlaneMigrationLock( throw new Error( `Control-plane migration lock failed (${code}, ${diagnostic.length} diagnostic bytes)`, ); - const result: unknown = JSON.parse(output); + // `convex run` prints nothing when a function returns null, which is the `complete` contract. + const result: unknown = output.trim() === '' ? null : JSON.parse(output); if ( (phase === 'begin' && typeof result !== 'boolean') || (phase === 'complete' && result !== null)