Skip to content

Qualify installer coexistence with pre-existing OpenShell installations #9705

Closed as not planned

Description

@apurvvkumaria

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

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

Related Work

Category

Testing

Checklist

  • I searched existing issues and this focused qualification slice is not a duplicate.
  • I described the problem and desired behavior.

Activity

  1. added
    needs: triage
    on Aug 20, 2026
  2. added
    area: install
    area: onboarding
    integration: openclaw
    needs: design
    platform: dgx-spark
    platform: dgx-station
    on Aug 24, 2026
  3. changed the issue type fromtoon Aug 24, 2026
  4. removed
    needs: triage
    on Aug 24, 2026
  5. apurvvkumaria commented on Aug 25, 2026

    @apurvvkumaria
    CollaboratorAuthor

    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:

    • Ownership: NemoClaw owns the public gateway-management contract and authority checks. The declared external supervisor owns the gateway process.
    • Lifecycle: External supervision has no standalone fallback. NemoClaw must remain inert across onboarding, rebuild, recovery, stop, final-sandbox cleanup, and uninstall.
    • Compatibility: Contract v1 supports nemoclaw-managed and externally-supervised with systemd-system or systemd-user identity proof.
    • Security: NemoClaw binds the exact gateway identity before effects and emits only redacted, secret-free authority metadata.
    • Validation: Failure-injection and zero-effect tests are required at each destructive boundary.

    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_MANAGEMENT declaration 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: design label is stale. Removing that label would record scope acceptance only; it would not approve PR #9726 or waive its CI, security, or E2E gates.

  6. removed
    needs: design
    on Aug 25, 2026
  7. apurvvkumaria commented on Aug 25, 2026

    @apurvvkumaria
    CollaboratorAuthor

    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.

  8. jyaunches commented on Sep 2, 2026

    @jyaunches
    Contributor

    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:

    • Reuse only an OpenShell installation that has valid NemoClaw-owned state from a prior run.
    • Treat every other installation as external: preserve it, require an explicit declaration to attach, or stop with remediation.
    • Do not implicitly adopt external sandboxes or remove independently managed OpenShell resources.

    The follow-up should identify the exact QA reproduction, expected result, affected release, and the smallest missing behavior on current main before implementation starts.

  9. added
    area: security
    on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: installarea: onboardingarea: securityintegration: openclawplatform: dgx-sparkplatform: dgx-station

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions