fix: reuse quick deploy readiness verification

Reuse the authoritative readiness result from the ready-aware create command to avoid duplicate quick-deploy readiness polling.
This commit is contained in:
mmckeen-nv
2026-06-08 07:08:04 -06:00
committed by GitHub
parent f3c61df430
commit 32423c8d0a
2 changed files with 14 additions and 1 deletions
+11 -1
View File
@@ -528,6 +528,7 @@ async function runCreateCommandUntilReady(file: string, args: string[], env: Nod
completed: boolean completed: boolean
timedOut: boolean timedOut: boolean
forcedReady: boolean forcedReady: boolean
readyVerification?: SandboxVerification
exitCode: number | null exitCode: number | null
signal: NodeJS.Signals | null signal: NodeJS.Signals | null
stdout: string stdout: string
@@ -548,6 +549,7 @@ async function runCreateCommandUntilReady(file: string, args: string[], env: Nod
completed: boolean completed: boolean
timedOut: boolean timedOut: boolean
forcedReady: boolean forcedReady: boolean
readyVerification?: SandboxVerification
exitCode: number | null exitCode: number | null
signal: NodeJS.Signals | null signal: NodeJS.Signals | null
stdout: string stdout: string
@@ -610,6 +612,7 @@ async function runCreateCommandUntilReady(file: string, args: string[], env: Nod
completed: false, completed: false,
timedOut: false, timedOut: false,
forcedReady: true, forcedReady: true,
readyVerification: verification,
exitCode: null, exitCode: null,
signal: "SIGTERM", signal: "SIGTERM",
stdout: stdout.trim(), stdout: stdout.trim(),
@@ -1012,7 +1015,14 @@ export async function POST(request: Request) {
"nemoclaw-start", "nemoclaw-start",
], env, sandboxName, 120000, 2000) ], env, sandboxName, 120000, 2000)
const readiness = await waitForSandboxReady(sandboxName, 90000, 2000) const readiness = createAttempt.readyVerification?.verified
? {
verified: true as const,
verification: createAttempt.readyVerification,
attempts: 0,
elapsedMs: 0,
}
: await waitForSandboxReady(sandboxName, 90000, 2000)
const verification = readiness.verification ?? { const verification = readiness.verification ?? {
verified: false, verified: false,
summary: "Sandbox readiness polling produced no verification result.", summary: "Sandbox readiness polling produced no verification result.",
+3
View File
@@ -105,6 +105,9 @@ assert.match(createRouteSource, /resolveSourcePodImage\(sourceSandboxName, sandb
assert.match(createRouteSource, /"--from",\s*sourceImage/, 'image redeploy must pass the resolved image to openshell sandbox create') assert.match(createRouteSource, /"--from",\s*sourceImage/, 'image redeploy must pass the resolved image to openshell sandbox create')
assert.match(createRouteSource, /"--auto-providers"/, 'image redeploy must use OpenShell auto providers for provider-backed images') assert.match(createRouteSource, /"--auto-providers"/, 'image redeploy must use OpenShell auto providers for provider-backed images')
assert.match(createRouteSource, /registerNemoClawImageRedeploy/, 'image redeploy must register the new sandbox without a full NemoClaw rebuild') assert.match(createRouteSource, /registerNemoClawImageRedeploy/, 'image redeploy must register the new sandbox without a full NemoClaw rebuild')
assert.match(createRouteSource, /readyVerification\?: SandboxVerification/, 'ready-aware create command must carry the authoritative verification result')
assert.match(createRouteSource, /readyVerification: verification/, 'ready-aware create command must return the verification that proved readiness')
assert.match(createRouteSource, /createAttempt\.readyVerification\?\.verified[\s\S]*await waitForSandboxReady\(sandboxName, 90000, 2000\)/, 'image redeploy must reuse the ready-command verification instead of always polling readiness twice')
assert.match(createRouteSource, /const requestedMode = typeof raw\.mode === "string" \? raw\.mode : "vllm"/, 'blueprint create must default to vLLM experimental onboarding when the UI payload is absent') assert.match(createRouteSource, /const requestedMode = typeof raw\.mode === "string" \? raw\.mode : "vllm"/, 'blueprint create must default to vLLM experimental onboarding when the UI payload is absent')
assert.match(createRouteSource, /NEMOCLAW_EXPERIMENTAL = "1"/, 'blueprint create must support NemoClaw experimental provider onboarding') assert.match(createRouteSource, /NEMOCLAW_EXPERIMENTAL = "1"/, 'blueprint create must support NemoClaw experimental provider onboarding')
assert.match(createRouteSource, /NEMOCLAW_PROVIDER = "vllm"/, 'blueprint create must support the vLLM onboarding provider') assert.match(createRouteSource, /NEMOCLAW_PROVIDER = "vllm"/, 'blueprint create must support the vLLM onboarding provider')