From 3e92efd22eaa4c06218528693b81a234a077c423 Mon Sep 17 00:00:00 2001 From: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com> Date: Sat, 28 Nov 2026 20:36:48 -0500 Subject: [PATCH] Report the last plugin.list failure when plugins never load --- backend/test/helpers/opencode-binary.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/test/helpers/opencode-binary.ts b/backend/test/helpers/opencode-binary.ts index 6cf8a84d..027e0c89 100644 --- a/backend/test/helpers/opencode-binary.ts +++ b/backend/test/helpers/opencode-binary.ts @@ -51,15 +51,18 @@ export async function waitForOpenCodePluginsLoaded( timeoutMs: number = PLUGIN_LOAD_TIMEOUT_MS, ): Promise { const deadline = Date.now() + timeoutMs + let lastFailure = 'no plugins reported' while (Date.now() < deadline) { try { const { data } = await client.api.plugin.list() if (data.length > 0) return - } catch { + lastFailure = 'no plugins reported' + } catch (error) { + lastFailure = String(error) } await delay(PLUGIN_POLL_INTERVAL_MS) } - throw new Error(`OpenCode server plugins did not load within ${timeoutMs}ms`) + throw new Error(`OpenCode server plugins did not load within ${timeoutMs}ms: ${lastFailure}`) } export function readOpenCodeVersion(binary: string): string | null {