Contributor preflight (required)
Before investigating or changing code:
- Read WRITING.md in full.
- Read CONTRIBUTING.md in full.
- Run
npm run dev:doctor from a clean checkout before creating a branch.
- Follow both guides for code, tests, issue updates, commit messages, DCO, commit verification, documentation review, and the pull request.
Problem
A gateway-scoped uninstall of an alternate gateway removes the selected gateway successfully but destabilizes a healthy sandbox owned by the default gateway. This violates the multi-gateway isolation contract.
Confirmed evidence
- Failing run: E2E run 31337932239, exact head
1a8e6bd3198ec54c7682f98b23141bdaac716160.
- The
concurrent-gateway-ports job failed in both attempts: attempt 1 and attempt 2.
- The attempt 2 evidence artifact contains the command and phase records.
- The runner used Ubuntu 24.04 and OpenShell 0.0.99.
- Sandbox A onboarded on gateway
nemoclaw at port 8080 and reached Ready.
- Sandbox B onboarded on gateway
nemoclaw-18080 at port 18080 and reached Ready.
- Before uninstall, both gateway listeners, dashboard forwards, sandboxes, and port-scoped registries passed their isolation assertions.
NEMOCLAW_GATEWAY_PORT=18080 nemoclaw uninstall --yes --destroy-user-data exited 0 and reported removing gateway B and its scoped state.
- Immediately afterward,
openshell sandbox list -g nemoclaw showed sandbox A transition from Provisioning to terminal Error.
The test failed with:
e2e-cgp-a reached terminal phase 'Error' on nemoclaw
Reproduction
Run the existing live scenario with Docker and the supported OpenShell CLI available:
NEMOCLAW_RUN_LIVE_E2E=1 npx vitest run --project e2e-live test/e2e/live/concurrent-gateway-ports.test.ts
The scenario onboards a default-port sandbox and a port-18080 sandbox, verifies both are isolated and healthy, then uninstalls only port 18080 and probes the default sandbox.
Likely implementation surface
src/lib/actions/uninstall/run-plan.ts
src/lib/onboard/host-gateway-process.ts
src/lib/onboard/gateway-process-target-identity.ts
src/lib/onboard/gateway-process-identity.ts
src/lib/actions/uninstall/run-plan-gateway-segregation.test.ts
src/lib/actions/uninstall/run-plan-gateway-service.test.ts
src/lib/onboard/host-gateway-process-target.test.ts
src/lib/onboard/host-gateway-process.test.ts
test/e2e/live/concurrent-gateway-ports.test.ts
Likely cause — hypothesis, not confirmed
The scoped uninstall requests a stop using gateway B's state directory and expected gateway name and port. The resulting teardown may signal a process shared with or owned by the default gateway. A second possibility is an OpenShell 0.0.99 multi-gateway lifecycle coupling after gateway B stops.
Do not assume which branch is true. Capture both gateways' PID files, command lines, listener ownership, and gateway and sandbox state immediately before and after the selected PID stops. Base the fix on that ownership evidence.
Acceptance criteria
Targeted verification
npx vitest run --project cli \
src/lib/actions/uninstall/run-plan-gateway-segregation.test.ts \
src/lib/actions/uninstall/run-plan-gateway-service.test.ts \
src/lib/onboard/host-gateway-process-target.test.ts \
src/lib/onboard/host-gateway-process.test.ts
Then run the concurrent-gateway-ports live E2E target. If the user-visible teardown or recovery contract changes, update docs/manage-sandboxes/uninstall-nemoclaw.mdx and docs/reference/commands.mdx, then complete the required documentation-writer review.
Related work
None of these tracks the sibling-isolation failure reproduced here.
Contributor preflight (required)
Before investigating or changing code:
npm run dev:doctorfrom a clean checkout before creating a branch.Problem
A gateway-scoped uninstall of an alternate gateway removes the selected gateway successfully but destabilizes a healthy sandbox owned by the default gateway. This violates the multi-gateway isolation contract.
Confirmed evidence
1a8e6bd3198ec54c7682f98b23141bdaac716160.concurrent-gateway-portsjob failed in both attempts: attempt 1 and attempt 2.nemoclawat port 8080 and reachedReady.nemoclaw-18080at port 18080 and reachedReady.NEMOCLAW_GATEWAY_PORT=18080 nemoclaw uninstall --yes --destroy-user-dataexited 0 and reported removing gateway B and its scoped state.openshell sandbox list -g nemoclawshowed sandbox A transition fromProvisioningto terminalError.The test failed with:
Reproduction
Run the existing live scenario with Docker and the supported OpenShell CLI available:
The scenario onboards a default-port sandbox and a port-18080 sandbox, verifies both are isolated and healthy, then uninstalls only port 18080 and probes the default sandbox.
Likely implementation surface
src/lib/actions/uninstall/run-plan.tssrc/lib/onboard/host-gateway-process.tssrc/lib/onboard/gateway-process-target-identity.tssrc/lib/onboard/gateway-process-identity.tssrc/lib/actions/uninstall/run-plan-gateway-segregation.test.tssrc/lib/actions/uninstall/run-plan-gateway-service.test.tssrc/lib/onboard/host-gateway-process-target.test.tssrc/lib/onboard/host-gateway-process.test.tstest/e2e/live/concurrent-gateway-ports.test.tsLikely cause — hypothesis, not confirmed
The scoped uninstall requests a stop using gateway B's state directory and expected gateway name and port. The resulting teardown may signal a process shared with or owned by the default gateway. A second possibility is an OpenShell 0.0.99 multi-gateway lifecycle coupling after gateway B stops.
Do not assume which branch is true. Capture both gateways' PID files, command lines, listener ownership, and gateway and sandbox state immediately before and after the selected PID stops. Base the fix on that ownership evidence.
Acceptance criteria
ReadyorRunningacross multiple post-uninstall probes.NEMOCLAW_GATEWAY_PORT=8080 nemoclaw liststill succeeds and sandbox A's dashboard forward remains usable.concurrent-gateway-portslive E2E target passes in the authoritative CI environment.Targeted verification
Then run the
concurrent-gateway-portslive E2E target. If the user-visible teardown or recovery contract changes, updatedocs/manage-sandboxes/uninstall-nemoclaw.mdxanddocs/reference/commands.mdx, then complete the required documentation-writer review.Related work
None of these tracks the sibling-isolation failure reproduced here.