From 5d41677c921c3a1d21ccd04d0425ac62dd4c0b02 Mon Sep 17 00:00:00 2001 From: Jason Shultz Date: Thu, 14 May 2026 14:47:13 -0700 Subject: [PATCH] =?UTF-8?q?fix(gbrain-sources):=20bump=20gbrain=20sources?= =?UTF-8?q?=20list=20--json=20timeout=2010s=20=E2=86=92=2030s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Supabase free-tier cold-starts can push `gbrain sources list --json` past 10s (observed 14.5s in the wild), causing probeSource() to throw ETIMEDOUT during /sync-gbrain code stage even though the underlying CLI was healthy. Matches the 30s ceiling already used by `sources add` / `sources remove` in the same file. Co-Authored-By: Claude Opus 4.7 (1M context) --- lib/gbrain-sources.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gbrain-sources.ts b/lib/gbrain-sources.ts index 6cf2195547..c8ffbad5a8 100644 --- a/lib/gbrain-sources.ts +++ b/lib/gbrain-sources.ts @@ -53,7 +53,7 @@ export function probeSource(id: string, env?: NodeJS.ProcessEnv): SourceState { try { stdout = execFileSync("gbrain", ["sources", "list", "--json"], { encoding: "utf-8", - timeout: 10_000, + timeout: 30_000, stdio: ["ignore", "pipe", "pipe"], env, }); @@ -164,7 +164,7 @@ export function sourcePageCount(id: string, env?: NodeJS.ProcessEnv): number | n try { stdout = execFileSync("gbrain", ["sources", "list", "--json"], { encoding: "utf-8", - timeout: 10_000, + timeout: 30_000, stdio: ["ignore", "pipe", "pipe"], env, });