fix(canvas/e2e): tolerate transient 'failed' status during boot (#2032) #2417

Merged
agent-dev-a merged 2 commits from fix/2032-canvas-e2e-transient-failed-tolerance into main 2026-06-08 05:19:19 +00:00
+6 -2
View File
@@ -341,11 +341,15 @@ export default async function globalSetup(_config: FullConfig): Promise<void> {
);
return true;
}
// Real boot regression — hard-throw immediately with full detail.
// #2032: tolerate transient 'failed' during boot — some runtimes
// briefly report failed before recovering to online (e.g. agent
// restart during init). Retry instead of hard-throwing; genuine
// terminal failures will still surface via waitFor timeout.
const detail = sampleErr
? sampleErr
: `(no last_sample_error) full body: ${JSON.stringify(r.body)}`;
throw new Error(`Workspace failed: ${detail}`);
console.warn(`[staging-setup] transient failed (retrying): ${detail}`);
return null;
}
return null;
},