Roll back sandbox create destroy workflow to Monday

This commit is contained in:
mmckeen-nv
2026-04-30 10:08:44 -07:00
parent ae7a7c3a26
commit fda3cbb056
7 changed files with 181 additions and 536 deletions
+10 -23
View File
@@ -62,17 +62,11 @@ assert.match(
assert.match(createRouteSource, /"onboard", "--non-interactive", "--recreate-sandbox"/, 'blueprint create must use the Monday-era normal NemoClaw onboard flow')
assert.doesNotMatch(createRouteSource, /"--from"|resolvePreferredNemoClawDockerfile|prepareDashboardOwnedNemoClawDockerfile/, 'blueprint create must not force the explicit Dockerfile path')
assert.match(createRouteSource, /NEMOCLAW_SANDBOX_NAME: sandboxName/, 'blueprint create must pass the requested sandbox name to NemoClaw 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 = "nim-local"/, 'blueprint create must support the NVIDIA NIM onboarding provider')
assert.match(createRouteSource, /NEMOCLAW_PROVIDER_KEY = apiKey/, 'blueprint create must pass NVIDIA API keys through provider env without changing NemoClaw')
assert.doesNotMatch(createRouteSource, /NEMOCLAW_EXPERIMENTAL|NEMOCLAW_PROVIDER|NEMOCLAW_PROVIDER_KEY/, 'blueprint create must stay on the Monday-era stock NemoClaw onboarding path')
assert.match(versionedInstallerSource, /OPENCLAW_VERSION="\$\{OPENCLAW_VERSION:-2026\.4\.24\}"/, 'versioned installer must pin the dashboard-compatible NemoClaw OpenClaw version')
assert.match(versionedInstallerSource, /docker build[\s\S]*Dockerfile\.base[\s\S]*--build-arg "OPENCLAW_VERSION=\$OPENCLAW_VERSION"[\s\S]*"\$source_dir"/, 'versioned installer must rebuild the stock NemoClaw base image with the pinned OpenClaw version')
assert.doesNotMatch(createRouteSource, /repairOpenClawRuntimePolicy|runtimePolicyRepair/, 'sandbox create must not mutate OpenShell filesystem policy for OpenClaw')
assert.match(createRouteSource, /stabilizeOpenClawGatewayConfig/, 'sandbox create must stabilize OpenClaw gateway config after readiness')
assert.match(createRouteSource, /gatewayConfigRepair/, 'sandbox create response must report OpenClaw gateway config stabilization status')
assert.match(createRouteSource, /repairOpenClawWorkspacePermissions/, 'sandbox create must repair OpenClaw workspace permissions after readiness')
assert.match(createRouteSource, /workspaceRepair/, 'sandbox create response must report OpenClaw workspace permission repair status')
assert.doesNotMatch(createRouteSource, /stabilizeOpenClawGatewayConfig|gatewayConfigRepair|repairOpenClawWorkspacePermissions|workspaceRepair/, 'sandbox create must not patch OpenClaw internals after the Monday rollback')
assert.doesNotMatch(sandboxPrivilegedFilesSource, /openshell-openclaw-policy-|"policy", "set"|withoutReadOnlyOpenClaw/, 'OpenClaw repair must not mutate OpenShell filesystem policy')
assert.match(sandboxPrivilegedFilesSource, /plugins\.entries\.bonjour/, 'gateway config stabilization must disable the crashing Bonjour plugin')
assert.match(sandboxPrivilegedFilesSource, /sha256sum openclaw\.json > \.config-hash/, 'gateway config stabilization must refresh OpenClaw config hash')
@@ -102,16 +96,15 @@ assert.match(hostCommandsSource, /export const OPENSHELL_BIN[\s\S]*"openshell"/,
assert.match(deleteRouteSource, /\["sandbox", "delete", sandboxName\]/, 'delete route must call openshell sandbox delete with the sandbox name')
assert.match(deleteRouteSource, /validateSandboxName/, 'delete route must validate sandbox names before execution')
assert.match(deleteRouteSource, /resolveSandboxRef/, 'delete route must resolve sandbox ids to names before deleting')
assert.match(deleteRouteSource, /hostCommandEnv\(\{[\s\S]*OPENSHELL_GATEWAY: process\.env\.OPENSHELL_GATEWAY \|\| "nemoclaw"/, 'delete route must use the NemoClaw gateway context with the shared host command environment')
assert.match(deleteRouteSource, /OPENSHELL_GATEWAY: process\.env\.OPENSHELL_GATEWAY \|\| "nemoclaw"/, 'delete route must use the NemoClaw gateway context')
assert.match(hostCommandsSource, /export function hostCommandEnv/, 'host commands must provide a shared environment for OpenShell child processes')
assert.match(hostCommandsSource, /XDG_CONFIG_HOME/, 'shared host command environment must preserve the OpenShell config home')
assert.match(deleteRouteSource, /waitForSandboxDeleted/, 'delete route must poll authoritative inventory until the sandbox is gone')
assert.match(deleteRouteSource, /cleanupNemoClawSandbox/, 'delete route must clean up NemoClaw registry state after deleting from OpenShell')
assert.doesNotMatch(deleteRouteSource, /\[sandboxName, "destroy", "--yes"\]|gateway", "destroy"|cleanupGatewayAfterLastSandbox/, 'delete route must not run NemoClaw destroy or destroy the shared gateway when deleting the last sandbox')
assert.match(deleteRouteSource, /Pruned NemoClaw registry entry without destroying the shared OpenShell gateway/, 'delete route must prune registry state without tearing down the shared gateway')
assert.match(deleteRouteSource, /\[sandboxName, "destroy", "--yes"\]/, 'delete route must match the Monday-era NemoClaw destroy cleanup path')
assert.doesNotMatch(deleteRouteSource, /Pruned NemoClaw registry entry without destroying the shared OpenShell gateway|cleanupGatewayAfterLastSandbox/, 'delete route must not include the later registry-prune rewrite')
assert.match(deleteRouteSource, /openShellAlreadyGone/, 'delete route must tolerate sandboxes that OpenShell already deleted while NemoClaw still has registry state')
assert.match(deleteRouteSource, /isGatewayRecoverable/, 'delete route must detect recoverable OpenShell gateway failures')
assert.match(deleteRouteSource, /recoverableGateway/, 'delete failures must tell the UI when gateway repair can recover the operation')
assert.doesNotMatch(deleteRouteSource, /isGatewayRecoverable|recoverableGateway/, 'delete route must not include the later gateway-repair branching')
assert.match(telemetryRouteSource, /const names = parseOpenShellSandboxNames\(sandboxListStdout\)/, 'telemetry must derive inventory from OpenShell before consulting NemoClaw')
assert.match(telemetryRouteSource, /names\.length > 0[\s\S]*execNemoclaw\(\["list"\]\)[\s\S]*execNemoclaw\(\["status"\]\)/, 'telemetry must skip NemoClaw list/status when OpenShell reports zero live sandboxes')
assert.match(inferenceRouteSource, /\["provider", "create", "--name", name, "--type", type\]/, 'inference route must create OpenShell providers')
@@ -157,17 +150,13 @@ assert.match(sandboxInferenceApplyLibSource, /providerKey: "nvidia"[\s\S]*modelR
assert.doesNotMatch(sandboxRestartRouteSource, /delete", "pod"|kubectl delete/, 'restart route must not delete the backing sandbox pod')
assert.match(sandboxRestartRouteSource, /restartMode: "openclaw-runtime"/, 'restart route must restart only the in-sandbox OpenClaw runtime')
assert.match(sandboxRestartRouteSource, /waitForSandboxReady\(sandboxName, 15000, 1000\)/, 'restart route must verify OpenShell reports the sandbox ready before runtime restart')
assert.match(sandboxListSource, /Restart OpenClaw Runtime/, 'sandbox details must expose a scoped runtime restart button')
assert.match(sandboxListSource, /Restart Sandbox/, 'sandbox details must expose the Monday-era sandbox restart button')
assert.match(sandboxListSource, /\/api\/sandbox\/\$\{encodeURIComponent\(selectedSandbox\.id\)\}\/restart/, 'restart button must call the sandbox restart endpoint')
assert.match(gatewayRepairRouteSource, /gateway", "start", "--name", gateway/, 'gateway repair route must restart the selected OpenShell gateway')
assert.match(gatewayRepairRouteSource, /backupOpenShellConfig/, 'gateway repair route must back up OpenShell config before repair')
assert.match(gatewayRepairRouteSource, /\["sandbox", "list"\]/, 'gateway repair route must verify sandbox inventory after repair')
assert.match(pageSource, /BadSignature\|invalid peer certificate\|transport error\|certificate signature\|Unknown gateway\|Deploy it first\|Connection refused\|tcp connect error/, 'dashboard must detect gateway certificate and availability failures')
assert.match(pageSource, /Repair Gateway Trust/, 'inventory error UI must expose a guarded gateway trust repair button')
assert.match(pageSource, /api\/openshell\/gateway\/repair/, 'gateway trust repair button must call the repair endpoint')
assert.match(pageSource, /It does not destroy sandboxes/, 'gateway trust repair warning must clarify sandboxes are not destroyed')
assert.doesNotMatch(sandboxListSource, /setInterval\(loadPermissionFeeds/, 'sandbox list must not poll every sandbox permission feed')
assert.match(sandboxListSource, /loadPermissionFeed\(selectedSandbox\)/, 'policy drawer must load the selected sandbox permission feed on demand')
assert.doesNotMatch(pageSource, /Repair Gateway Trust|api\/openshell\/gateway\/repair|It does not destroy sandboxes/, 'dashboard page must not include the later gateway trust repair UI after rollback')
assert.match(sandboxListSource, /setInterval\(loadPermissionFeeds/, 'sandbox list must match the Monday-era permission feed polling behavior')
assert.match(sandboxListSource, /<SandboxInferencePanel sandbox=\{selectedSandbox\}/, 'sandbox list must render the per-sandbox inference profile panel for the selected sandbox')
assert.match(sidebarSource, />Inference</, 'sidebar settings item must expose inference settings')
assert.match(pageSource, /<InferenceEndpointPanel \/>/, 'settings view must render inference endpoint panel')
@@ -183,8 +172,6 @@ assert.match(
)
assert.doesNotMatch(pageSource, /console\.log\('Destroying sandbox:'/, 'destroy workflow must not be a UI-only placeholder')
assert.doesNotMatch(configPanelSource, /onInventoryRefresh/, 'create panel must leave post-create inventory orchestration to the parent')
assert.match(configPanelSource, /Use vLLM in experimental mode/, 'create panel must expose vLLM experimental onboarding')
assert.match(configPanelSource, /Use NVIDIA NIM/, 'create panel must expose NVIDIA NIM onboarding')
assert.match(configPanelSource, /createInference/, 'create panel must send create-time inference settings')
assert.doesNotMatch(configPanelSource, /Use vLLM in experimental mode|Use NVIDIA NIM|createInference/, 'create panel must not include later create-time inference controls after rollback')
console.log('sandbox-lifecycle-check: PASS create/destroy lifecycle assertions')