Repository navigation
Description
Problem Statement
A NemoClaw installation can start on a host where OpenShell already exists. The selected CLI, gateway binary, service unit, port, and lifecycle authority can disagree.
Epic #8379 requires NemoClaw to:
- Reuse a supported OpenShell installation or stop before provider and sandbox mutation.
- Preserve independently managed OpenShell gateways and their sandboxes.
- Qualify version alignment, reuse, coexistence, and fail-before-effects behavior.
Issues #6903, #8051, #8926, and #8048 established individual lifecycle, version, systemd, and coexistence behaviors. No focused cross-platform issue owns the current-release qualification matrix and any residual detection gaps.
Without that matrix, an installer change can select a CLI that does not match the effective gateway. It can also miss a service that can later claim the configured gateway port.
Desired Behavior
Before provider, policy, or sandbox mutation, the standard installer must determine the relevant OpenShell state:
- Selected CLI and component paths and versions.
- Effective gateway service and executable, when a service exists.
- Gateway lifecycle authority.
- Listener or activation path that can claim the configured gateway port.
The installer must then produce one deterministic outcome:
- Reuse one coherent, supported OpenShell component set and its verified service.
- Upgrade a NemoClaw-managed component set through the existing backup and retirement flow.
- Validate and attach to an explicitly declared externally supervised gateway without managing its process.
- Preserve an independently managed gateway and use supported coexistence.
- Stop with a nonzero result when ownership, compatibility, or version evidence is ambiguous.
- Permit standalone operation only when no service activation path can later claim the gateway port.
A rerun with unchanged host state and inputs must produce the same lifecycle decision.
Constraints and Non-goals
- Finding an
openshellexecutable or gateway listener does not grant lifecycle authority. - NemoClaw must not uninstall, disable, overwrite, stop, or signal independently managed OpenShell resources.
- NemoClaw must not infer lifecycle authority from a process name or port alone.
- Detection covers resources that can affect the selected CLI, effective gateway, or configured port.
- Unrelated inactive binaries and other users' installations do not block installation.
- Interactive and non-interactive installation use the same lifecycle decision.
- This issue does not reopen the fixed defects in DGX Spark Express mixes pinned OpenShell CLI with apt gateway service #8051 or Installer mistakes a static OpenShell user unit for a reachable systemd user service #8926.
- Platform activation evidence remains in [DGX Station] Add protected Express qualification and activation evidence #8382 and [DGX Spark] Add protected single/dual Express qualification and activation evidence #8386. This issue owns the shared installer contract.
- Day-two behavior after an operator changes
PATHis outside this issue.
Acceptance Criteria
- A host without OpenShell uses the existing install path and selects one gateway lifecycle authority.
- A coherent supported CLI and gateway service are reused without creating a competing service.
- An incompatible CLI and effective gateway version stop before provider, policy, route, or sandbox mutation.
- Version-mismatch diagnostics name both versions, both executable paths, and an owner-directed remediation.
- A declared externally supervised gateway is attached without start, stop, restart, or cleanup effects.
- An independently managed listener, service, registration, configuration, state directory, and sandboxes remain unchanged.
- An active or enabled nonstandard same-user OpenShell service cannot be missed when it can claim the configured port.
- An unavailable systemd user manager permits standalone operation only when no activation path can later claim the port.
- An unreadable activation root, malformed service metadata, untrusted executable, or unknown service-query error fails closed.
- A custom gateway port does not inspect or change the default port 8080 service.
- Denied and ambiguous paths do not read or print provider credentials.
- A rerun does not add duplicate services, gateway processes, registrations, providers, routes, or sandboxes.
- Any failed upgrade retains completed sandbox snapshots and reports the recovery action.
Implementation Idea
Extend the current installer service and lifecycle checks. Do not create a second OpenShell registry or package-management path.
Build a table-driven matrix from the existing selected-CLI, effective-unit, version, activation, listener, and external-supervisor checks. If current main already satisfies a row, retain that row as regression evidence. Change behavior only for a reproduced residual gap.
Test Plan
- Add installer-integration coverage for CLI paths, gateway paths, versions, service ownership, activation paths, listener ownership, custom ports, and user-manager results.
- Assert each lifecycle decision and the forbidden effects on foreign files, services, processes, registrations, credentials, and sandboxes.
- Add a Linux runtime test only when deterministic tests cannot establish the effective systemd or listener boundary.
- Reuse the shared qualification cases in [DGX Station] Add protected Express qualification and activation evidence #8382 and [DGX Spark] Add protected single/dual Express qualification and activation evidence #8386 without duplicating their physical-platform evidence.
Related Work
- Parent scope: [Epic] Deliver the Express Installer for DGX Spark and DGX Station #8379.
- Existing managed-service ownership: Install and uninstall a managed OpenShell gateway service for reboot persistence #6903.
- Existing CLI and gateway version-skew refusal: DGX Spark Express mixes pinned OpenShell CLI with apt gateway service #8051.
- Existing unavailable-user-manager classification: Installer mistakes a static OpenShell user unit for a reachable systemd user service #8926.
- Verified independent-gateway coexistence: [DGX Spark][Express] onboarding takes over an active foreign OpenShell gateway #8048.
- Closed platform reproduction: DGX Spark Playbook: [NemoClaw] express onboarding fails when a different OpenShell is already installed (aborts at inference setup; should detect/align/coexist) #8094.
- Platform-specific Express qualification: [DGX Station] Add protected Express qualification and activation evidence #8382 and [DGX Spark] Add protected single/dual Express qualification and activation evidence #8386.
- Externally supervised gateway test seams: [DGX Station GB300][Sandbox] Add test seams to deterministically exercise recovery managed-health tri-state and externally-supervised gateway handshake #7994.
Category
Testing
Checklist
- I searched existing issues and this focused qualification slice is not a duplicate.
- I described the problem and desired behavior.
Activity
apurvvkumaria commentedon Aug 25, 2026
Existing product-scope authority
This issue qualifies the standard installer against the existing gateway-authority contract. It does not introduce a new gateway-management mode.
Maintainer acceptance already exists in issue #6576. That decision defines these requirements:
nemoclaw-managedandexternally-supervisedwithsystemd-systemorsystemd-useridentity proof.PR #7246 implemented that accepted contract and was released in v0.0.95. Its merged description states that platform profiles and automation use the versioned declaration, and that external gateways remain unchanged during uninstall and legacy cleanup.
Issue #9705 owns the residual qualification gap: the standard installer must classify pre-existing services, activation paths, listeners, component versions, and the existing
NEMOCLAW_GATEWAY_MANAGEMENTdeclaration before mutation. PR #9726 does not add a management mode or supervisor kind. It makes the installer honor the accepted contract and fail closed when service identity is ambiguous.If this mapping matches the accepted scope, the remaining
needs: designlabel is stale. Removing that label would record scope acceptance only; it would not approve PR #9726 or waive its CI, security, or E2E gates.apurvvkumaria commentedon Aug 25, 2026
Maintainer decision: approved. Issue #9705 applies the accepted external-supervision contract from #6576 to the standard installer; PR #9726 must still pass its CI, E2E, security, and human-review requirements.
jyaunches commentedon Sep 2, 2026
Closing this issue pending QA confirmation that this behavior is a required product contract.
QA: please review whether NemoClaw must reuse a pre-existing OpenShell installation in this scenario. The previous implementation grew into a general cross-platform service qualification system without a current QA blocker or a narrowly reproduced defect that justified that scope.
If QA confirms the requirement, open a focused issue using this direction:
The follow-up should identify the exact QA reproduction, expected result, affected release, and the smallest missing behavior on current
mainbefore implementation starts.