fix: align sandbox name validation with NemoClaw (#51)
Co-authored-by: mmckeen-nv <mmckeen-nv@users.noreply.github.com>
This commit is contained in:
@@ -24,6 +24,7 @@ const versionedInstallerPath = path.join(root, 'install_versioned_nemoclaw_opens
|
||||
const hookPath = path.join(root, 'app/hooks/useSandboxInventory.ts')
|
||||
const pagePath = path.join(root, 'app/page.tsx')
|
||||
const configPanelPath = path.join(root, 'app/components/ConfigurationPanel.tsx')
|
||||
const wizardPanelPath = path.join(root, 'app/components/WizardPanel.tsx')
|
||||
const activityPanelPath = path.join(root, 'app/components/ActivityPanel.tsx')
|
||||
const inferencePanelPath = path.join(root, 'app/components/InferenceEndpointPanel.tsx')
|
||||
const sandboxInferencePanelPath = path.join(root, 'app/components/SandboxInferencePanel.tsx')
|
||||
@@ -53,6 +54,7 @@ const versionedInstallerSource = await readFile(versionedInstallerPath, 'utf8')
|
||||
const hookSource = await readFile(hookPath, 'utf8')
|
||||
const pageSource = await readFile(pagePath, 'utf8')
|
||||
const configPanelSource = await readFile(configPanelPath, 'utf8')
|
||||
const wizardPanelSource = await readFile(wizardPanelPath, 'utf8')
|
||||
const activityPanelSource = await readFile(activityPanelPath, 'utf8')
|
||||
const inferencePanelSource = await readFile(inferencePanelPath, 'utf8')
|
||||
const sandboxInferencePanelSource = await readFile(sandboxInferencePanelPath, 'utf8')
|
||||
@@ -94,6 +96,8 @@ assert.match(createRouteSource, /mode === "none"[\s\S]*return \["--no-gpu"\]/, '
|
||||
assert.match(createRouteSource, /openShellGpuArgs\(mode: CreateGpuMode\)/, 'OpenShell create paths must share GPU request handling')
|
||||
assert.doesNotMatch(createRouteSource, /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, /name\.length > 19/, 'create API must enforce NemoClaw\'s 19-character routed sandbox-name limit')
|
||||
assert.match(createRouteSource, /\^\(\?!\.\*--\)\[a-z\]/, 'create API must require a leading lowercase letter and reject consecutive hyphens')
|
||||
assert.match(createRouteSource, /id: "redeploy-image"/, 'create API must expose image redeploy as a sandbox creation path')
|
||||
assert.match(createRouteSource, /label: "Quick Deploy New NemoClaw Sandbox"/, 'image redeploy must be labeled as the quick deploy default path')
|
||||
assert.match(createRouteSource, /label: "Fresh NemoClaw Image"/, 'full rebuild path must be labeled as fresh image creation')
|
||||
@@ -328,6 +332,11 @@ assert.match(configPanelSource, /createInference/, 'create panel must send creat
|
||||
assert.match(configPanelSource, /selectedBlueprint === 'nemoclaw-blueprint' \|\| selectedBlueprint === 'nemoclaw-hermes' \|\| selectedBlueprint === 'nemoclaw-deepagents-code'/, 'create panel must treat NemoClaw managed agents as onboard blueprints')
|
||||
assert.match(configPanelSource, /selectedBlueprint === 'nemoclaw-hermes' \? 'my-hermes'/, 'create panel must provide a Hermes-specific sandbox name placeholder')
|
||||
assert.match(configPanelSource, /selectedBlueprint === 'nemoclaw-deepagents-code' \? 'my-deepagents-code'/, 'create panel must provide a Deep Agents Code-specific sandbox name placeholder')
|
||||
assert.match(configPanelSource, /maxLength=\{19\}/, 'create panel must expose NemoClaw\'s 19-character sandbox-name limit')
|
||||
assert.match(configPanelSource, /single internal hyphens only/, 'create panel must explain the canonical sandbox-name grammar')
|
||||
assert.match(wizardPanelSource, /targetName\.length <= 19/, 'clone wizard must enforce NemoClaw\'s 19-character sandbox-name limit')
|
||||
assert.match(wizardPanelSource, /\^\(\?!\.\*--\)\[a-z\]/, 'clone wizard must reject leading digits and consecutive hyphens')
|
||||
assert.match(wizardPanelSource, /\.slice\(0, 13\)[\s\S]*-clone/, 'clone wizard must keep generated clone names within the 19-character limit')
|
||||
assert.match(configPanelSource, /useState<string>\('redeploy-image'\)/, 'create panel must default to quick deploy')
|
||||
assert.doesNotMatch(configPanelSource, /Source Sandbox|sourceSandboxName/, 'basic create panel must not require choosing a source image')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user