Restore version-locked sandbox create flow

This commit is contained in:
mmckeen-nv
2026-04-30 06:55:53 -07:00
parent 15d59846f1
commit 3ff1a664d7
7 changed files with 357 additions and 175 deletions
+12
View File
@@ -6,6 +6,7 @@ const root = process.cwd()
const [
installSource,
versionedInstallSource,
hostCommandsSource,
createRouteSource,
deleteRouteSource,
@@ -19,6 +20,7 @@ const [
mcpBrokerClientSource,
] = await Promise.all([
readFile(path.join(root, 'install.sh'), 'utf8'),
readFile(path.join(root, 'install_versioned_nemoclaw_openshell.sh'), 'utf8'),
readFile(path.join(root, 'app/lib/hostCommands.ts'), 'utf8'),
readFile(path.join(root, 'app/api/sandbox/create/route.ts'), 'utf8'),
readFile(path.join(root, 'app/api/sandbox/delete/route.ts'), 'utf8'),
@@ -32,6 +34,7 @@ const [
readFile(path.join(root, 'app/lib/mcpBrokerClient.ts'), 'utf8'),
])
assert.match(installSource, /install_versioned_nemoclaw_openshell\.sh/, 'dashboard installer must point operators to the pinned OpenShell/NemoClaw installer')
assert.match(installSource, /find_nemoclaw_bin\(\)/, 'installer must discover NemoClaw CLI')
assert.match(installSource, /find_nemoclaw_setup\(\)/, 'installer may discover the legacy NemoClaw setup workflow')
assert.match(installSource, /\$HOME\/nemoclaw\/scripts\/setup\.sh/, 'installer must check common lowercase ~/nemoclaw setup path')
@@ -50,6 +53,15 @@ assert.match(installSource, /python3 -m venv "\$PROJECT_VENV"/, 'installer must
assert.match(installSource, /\$venv_python" -m pip install --upgrade uv/, 'installer must install uvx into the virtual environment')
assert.match(installSource, /set_env "OPENSHELL_CONTROL_VENV"/, 'installer must persist the virtual environment path for runtime MCP launches')
assert.match(versionedInstallSource, /OPENSHELL_VERSION="\$\{OPENSHELL_VERSION:-v0\.0\.26\}"/, 'versioned installer must pin OpenShell v0.0.26 by default')
assert.match(versionedInstallSource, /NEMOCLAW_INSTALL_TAG="\$\{NEMOCLAW_INSTALL_TAG:-v0\.0\.15\}"/, 'versioned installer must pin NemoClaw v0.0.15 by default')
assert.match(versionedInstallSource, /https:\/\/raw\.githubusercontent\.com\/NVIDIA\/OpenShell\/main\/install\.sh/, 'versioned installer must use the OpenShell installer URL')
assert.match(versionedInstallSource, /https:\/\/github\.com\/NVIDIA\/NemoClaw\/archive\/refs\/tags\/\$\{NEMOCLAW_INSTALL_TAG\}\.zip/, 'versioned installer must download NemoClaw from the pinned tag archive')
assert.match(versionedInstallSource, /OPENSHELL_VERSION="\$OPENSHELL_VERSION" sh/, 'versioned installer must pass the pinned OpenShell version to upstream install.sh')
assert.match(versionedInstallSource, /NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE="\$NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE"/, 'versioned installer must support non-interactive third-party acceptance')
assert.match(versionedInstallSource, /NEMOCLAW_NON_INTERACTIVE="\$NEMOCLAW_NON_INTERACTIVE"/, 'versioned installer must run NemoClaw non-interactively by default')
assert.match(versionedInstallSource, /NVIDIA_API_KEY="\$\{NVIDIA_API_KEY:-\}"/, 'versioned installer must pass NVIDIA_API_KEY through to NemoClaw install')
assert.match(hostCommandsSource, /export const HOST_PATH/, 'host command resolution must centralize PATH construction')
assert.match(hostCommandsSource, /OPENSHELL_CONTROL_VENV/, 'host command resolution must include the installer-managed virtual environment')
assert.match(hostCommandsSource, /\.venv\/bin/, 'host command resolution must include the default project virtual environment')
+10 -10
View File
@@ -55,15 +55,13 @@ assert.match(
/readiness:\s*\{\s*attempts: readiness\.attempts,\s*elapsedMs: readiness\.elapsedMs,/,
'blueprint create response must expose readiness polling metadata',
)
assert.match(createRouteSource, /resolveConfiguredPrimaryInferenceRoute/, 'blueprint create must resolve the configured primary OpenShell inference route')
assert.match(createRouteSource, /applyConfiguredInferenceToOnboardEnv/, 'blueprint create must pass the configured inference route into NemoClaw onboarding')
assert.match(createRouteSource, /NEMOCLAW_PROVIDER/, 'blueprint create must set NemoClaw provider from inference configuration')
assert.match(createRouteSource, /NEMOCLAW_MODEL/, 'blueprint create must set NemoClaw model from inference configuration')
assert.match(createRouteSource, /!enableTailscale && !onboardInference/, 'blueprint create must not inject the optional NVIDIA placeholder when a primary inference route is configured')
assert.match(createRouteSource, /resolvePreferredNemoClawDockerfile/, 'blueprint create must pass an explicit NemoClaw Dockerfile to onboard')
assert.match(createRouteSource, /"--from", dockerfilePath/, 'blueprint create must make onboard use the selected Dockerfile instead of implicit refresh paths')
assert.match(createRouteSource, /relaxKnownNemoClawDockerfileOpenClawPatch/, 'blueprint create must self-heal the known brittle OpenClaw Dockerfile patch')
assert.match(createRouteSource, /writeConfigFile\(params\.nextConfig\) pattern not found/, 'Dockerfile compatibility guard must target the observed OpenClaw patch assertion')
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.match(hookSource, /type RefreshOptions = \{\s*force\?: boolean\s*\}/, 'inventory refresh must accept a force option')
assert.match(hookSource, /!refreshOptions\?\.force && inFlightRef\.current/, 'forced inventory refresh must bypass existing in-flight reads')
@@ -94,7 +92,6 @@ assert.match(inferenceRouteSource, /isVllmEndpoint\(name, baseUrl\)/, 'inference
assert.match(inferenceRouteSource, /normalizeProviderType\(requestedType, name, baseUrl\)/, 'inference route must force vLLM endpoints through the OpenAI-compatible provider type')
assert.match(inferenceRouteSource, /normalizeInferenceBaseUrlForGateway\(\s*baseUrl,/, 'inference route must normalize endpoint URLs for the OpenShell gateway pod')
assert.match(inferenceRouteSource, /OPENAI_BASE_URL=\$\{normalizedBaseUrl\}/, 'inference route must pass the normalized endpoint URL as provider config')
assert.match(createRouteSource, /normalizeInferenceBaseUrlForGateway\(endpointUrl, "openai"\)/, 'sandbox create must normalize env-derived OpenAI-compatible endpoints before NemoClaw onboarding')
assert.match(inferenceEndpointUrlSource, /host\.docker\.internal/, 'endpoint normalization must rewrite host-local URLs to a gateway-reachable host alias')
assert.match(inferenceEndpointUrlSource, /\/chat\/completions/, 'endpoint normalization must strip concrete OpenAI endpoint suffixes to the base URL')
assert.match(inferencePanelSource, /INFERENCE ENDPOINTS/, 'settings UI must expose inference endpoint configuration')
@@ -156,5 +153,8 @@ 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')
console.log('sandbox-lifecycle-check: PASS create/destroy lifecycle assertions')