From c9fbf4899018c8ebf5026ab5bff163786231de00 Mon Sep 17 00:00:00 2001 From: Codex Date: Sat, 4 Jul 2026 20:50:19 +0000 Subject: [PATCH] fix: gate ssh pool readiness on provider status --- scripts/src/debug.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/src/debug.ts b/scripts/src/debug.ts index 4e12cb2d..e193d172 100644 --- a/scripts/src/debug.ts +++ b/scripts/src/debug.ts @@ -238,6 +238,7 @@ export async function debugSshPool(_config: UniDeskConfig, providerId: string): }; } const labels = recordValue(node.labels); + const nodeStatus = stringValue(node.status); const pool = { transport: stringValue(labels.providerGatewaySshDataTransport), host: stringValue(labels.providerGatewaySshDataHost), @@ -252,20 +253,27 @@ export async function debugSshPool(_config: UniDeskConfig, providerId: string): const ready = Number(pool.ready ?? 0); const claimed = Number(pool.claimed ?? 0); const desired = Number(pool.desired ?? 0); - const ok = pool.transport === "tcp-pool" && Number.isFinite(ready) && ready > 0; + const providerOnline = nodeStatus === "online"; + const poolLabelReady = pool.transport === "tcp-pool" && Number.isFinite(ready) && ready > 0; + const executionPathReady = providerOnline && poolLabelReady; return { - ok, + ok: executionPathReady, providerId, + providerOnline, + poolLabelReady, + executionPathReady, node: { providerId: node.providerId, name: node.name, - status: node.status, + status: nodeStatus, lastHeartbeat: node.lastHeartbeat ?? null, updatedAt: node.updatedAt ?? null, }, pool, hostPressure: providerHostPressureSummary(providerId), - classification: ok + classification: !providerOnline + ? (nodeStatus === "offline" ? "provider-offline" : "provider-not-online") + : poolLabelReady ? "ssh-tcp-pool-ready" : pool.transport !== "tcp-pool" ? "provider-gateway-upgrade-required"