From 07ba12d3423fec973cc8adff4f1bbffb0d4718ca Mon Sep 17 00:00:00 2001 From: orendi84 Date: Sat, 18 Apr 2026 19:06:02 +0200 Subject: [PATCH] fix(migrations): bump v0.12.0 backfill timeout from 10min to 30min Phase C (backfill_links) and D (backfill_timeline) both shelled out with a 10-minute timeout. On a 13k-page brain, each extraction takes ~11 minutes, so both phases returned 'failed' via execSync timeout and the orchestrator marked the migration 'partial'. Schema + verify phases were unaffected. Bump both timeouts to 30 minutes (1_800_000 ms). At the observed rate of ~50 sec/1k pages this covers brains up to ~35k pages; larger brains will need a proportional extension. Verified by re-running on a 13002-page brain: both phases complete cleanly in ~11 min each, migration marks 'complete'. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/commands/migrations/v0_12_0.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/migrations/v0_12_0.ts b/src/commands/migrations/v0_12_0.ts index 363ba7e7..3e9659be 100644 --- a/src/commands/migrations/v0_12_0.ts +++ b/src/commands/migrations/v0_12_0.ts @@ -89,7 +89,7 @@ function phaseCBackfillLinks(opts: OrchestratorOpts): OrchestratorPhaseResult { // --source db is idempotent: the UNIQUE constraint on // (from_page_id, to_page_id, link_type) and ON CONFLICT DO NOTHING // make re-runs cheap. Empty brains return 0/0 quickly. - execSync('gbrain extract links --source db', { stdio: 'inherit', timeout: 600_000, env: process.env }); + execSync('gbrain extract links --source db', { stdio: 'inherit', timeout: 1_800_000, env: process.env }); return { name: 'backfill_links', status: 'complete' }; } catch (e) { const msg = e instanceof Error ? e.message : String(e); @@ -100,7 +100,7 @@ function phaseCBackfillLinks(opts: OrchestratorOpts): OrchestratorPhaseResult { function phaseDBackfillTimeline(opts: OrchestratorOpts): OrchestratorPhaseResult { if (opts.dryRun) return { name: 'backfill_timeline', status: 'skipped', detail: 'dry-run' }; try { - execSync('gbrain extract timeline --source db', { stdio: 'inherit', timeout: 600_000, env: process.env }); + execSync('gbrain extract timeline --source db', { stdio: 'inherit', timeout: 1_800_000, env: process.env }); return { name: 'backfill_timeline', status: 'complete' }; } catch (e) { const msg = e instanceof Error ? e.message : String(e);