Fix sandbox lifecycle workflows

This commit is contained in:
Codex
2026-04-24 15:49:58 +00:00
parent b0e4d8fc4c
commit 5c357af7ce
7 changed files with 249 additions and 31 deletions
+14 -3
View File
@@ -299,9 +299,16 @@ export async function POST(request: Request) {
}, { status: 500 })
}
const verification = await verifySandboxCreation(sandboxName)
const created = verification.verified
console.log(`[sandbox/create] request:complete sandbox=${sandboxName} created=${created} elapsedMs=${elapsedMs(requestStartedAt)}`)
const readiness = await waitForSandboxReady(sandboxName, 90000, 2000)
const verification = readiness.verification ?? {
verified: false,
summary: "Sandbox readiness polling produced no verification result.",
error: "Sandbox readiness polling produced no verification result.",
}
const created = readiness.verified
console.log(
`[sandbox/create] request:complete sandbox=${sandboxName} created=${created} readinessAttempts=${readiness.attempts} elapsedMs=${elapsedMs(requestStartedAt)}`,
)
return NextResponse.json({
ok: created,
@@ -314,6 +321,10 @@ export async function POST(request: Request) {
enableTailscale,
setupPath: NEMOCLAW_SETUP,
hostPath: HOST_PATH,
readiness: {
attempts: readiness.attempts,
elapsedMs: readiness.elapsedMs,
},
stdout: result.stdout,
stderr: result.stderr,
note: created