fix: follow active OpenShell gateway (#46)

Co-authored-by: mmckeen-nv <mmckeen-nv@users.noreply.github.com>
This commit is contained in:
mmckeen-nv
2026-09-08 23:11:14 -07:00
committed by GitHub
co-authored by mmckeen-nv
parent cbbdd1b4d2
commit 270eb109f1
17 changed files with 33 additions and 23 deletions
+3 -3
View File
@@ -168,7 +168,7 @@ assert.match(deleteRouteSource, /workspace-\*/, 'persistent state wipe must incl
assert.match(pageSource, /JSON\.stringify\(\{ sandboxName, agent: sandbox\?\.agent \|\| 'openclaw' \}\)/, 'destroy workflow must pass the selected NemoClaw agent to delete state cleanup')
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, /OPENSHELL_GATEWAY: process\.env\.OPENSHELL_GATEWAY \|\| "nemoclaw"/, 'delete route must use the NemoClaw gateway context')
assert.match(deleteRouteSource, /OPENSHELL_GATEWAY: process\.env\.OPENSHELL_GATEWAY\?\.trim\(\) \|\| undefined/, 'delete route must preserve an explicit gateway without forcing the legacy NemoClaw name')
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(hostCommandsSource, /export function openshellGatewayAddressEnv/, 'shared host command environment must expose gateway address override variables')
@@ -179,9 +179,9 @@ assert.match(hostCommandsSource, /gateway\.json/, 'shared host command environme
assert.match(hostCommandsSource, /config\.json/, 'shared host command environment must also support the general OpenShell config file')
assert.match(hostCommandsSource, /gatewayHost/, 'OpenShell gateway address config must support a top-level gatewayHost key')
assert.match(hostCommandsSource, /gateway\.host/, 'OpenShell gateway address config must support a nested gateway host key')
assert.match(createRouteSource, /const env: NodeJS\.ProcessEnv = hostCommandEnv\(\{[\s\S]*NEMOCLAW_SANDBOX_NAME: sandboxName[\s\S]*OPENSHELL_GATEWAY: process\.env\.OPENSHELL_GATEWAY \|\| "nemoclaw"/, 'NemoClaw onboard must receive the shared host command environment')
assert.match(createRouteSource, /const env: NodeJS\.ProcessEnv = hostCommandEnv\(\{[\s\S]*NEMOCLAW_SANDBOX_NAME: sandboxName[\s\S]*OPENSHELL_GATEWAY: process\.env\.OPENSHELL_GATEWAY\?\.trim\(\) \|\| undefined/, 'NemoClaw onboard must preserve an explicit gateway while allowing NemoClaw to select its port-qualified gateway')
assert.match(createRouteSource, /NEMOCLAW_AGENT: agent/, 'NemoClaw onboard must receive the selected dashboard agent')
assert.match(deleteRouteSource, /env: hostCommandEnv\(\{[\s\S]*OPENSHELL_GATEWAY: process\.env\.OPENSHELL_GATEWAY \|\| "nemoclaw"/, 'delete route must pass the shared host command environment to OpenShell')
assert.match(deleteRouteSource, /env: hostCommandEnv\(\{[\s\S]*OPENSHELL_GATEWAY: process\.env\.OPENSHELL_GATEWAY\?\.trim\(\) \|\| undefined/, 'delete route must pass the shared host command environment without forcing a gateway')
assert.match(deleteRouteSource, /waitForSandboxDeleted/, 'delete route must poll authoritative inventory until the sandbox is gone')
assert.doesNotMatch(deleteRouteSource, /cleanupNemoClawSandbox/, 'delete route must not run NemoClaw destroy cleanup after OpenShell deletion')
assert.doesNotMatch(deleteRouteSource, /isNemoClawSandboxNotRegistered/, 'delete route must not keep NemoClaw registry cleanup helpers')