fix(installer): recover upgrades with user-local OpenShell - #7028
Conversation
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe installer now restores user-local OpenShell binaries before gateway recovery checks. Upgrade tests cover interactive and non-interactive flows, hidden local binaries, and missing binaries. E2E coverage adds an arm64 legacy fixture and workflow boundary validation. ChangesGateway upgrade recovery and validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant UpgradeTest
participant runInstallerPayload
participant install.sh
participant OpenShell
UpgradeTest->>runInstallerPayload: select interactive or non-interactive arguments
runInstallerPayload->>install.sh: run installer with optional confirmation input
install.sh->>OpenShell: discover or restore local binary
OpenShell-->>install.sh: provide executable for recovery
install.sh-->>runInstallerPayload: complete upgrade preparation
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage remains at 96%, unchanged from the TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most impacted files.
Updated |
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/e2e.yaml:
- Around line 3531-3539: Update the v0.0.55 fixture in
openshell-gateway-upgrade-workflow-boundary.test.ts to use the workflow’s
sandbox image digest
10433a8cd2f2b809dd0fdf983514679e04c0f8aa1ff5bbff675029046033b108, including the
expected sandboxBaseDigest value, while preserving the existing boundary-test
structure.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: ce044bb0-793d-4f06-a82f-b76ca98706dc
📒 Files selected for processing (6)
.github/workflows/e2e.yamlscripts/install.shtest/e2e/live/openshell-gateway-upgrade-helpers.tstest/e2e/live/openshell-gateway-upgrade.test.tstest/e2e/support/openshell-gateway-upgrade-workflow-boundary.test.tstest/install-openshell-upgrade-prompt.test.ts
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
PR Review Advisor — InformationalAdvisor assessment: Informational / high confidence Model lanes
Nemotron output stays in workflow artifacts and does not change the assessment above. E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Co-authored-by: Charan Jagwani <cjagwani@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary Add the canonical dated changelog entry required before the v0.0.85 release plan can be generated. The entry summarizes the user-visible OpenShell, DGX Station, inference, MCP, onboarding, and recovery changes merged since v0.0.84 and links to their owning guides. ## Changes - Add `docs/changelog/2026-07-16.mdx` with the exact `## v0.0.85` heading, parser-safe SPDX comment, release summary, and detailed bullets. - Link every documented theme to its most specific published OpenClaw guide routes. - Reconcile the release entry with these merged source PRs: - #6726 -> `docs/changelog/2026-07-16.mdx`: Document the supported OpenShell v0.0.85 upgrade, immutable consumed artifacts, multiline exec, credential rewrite diagnostics, and child-process TLS boundary. - #6986 -> `docs/changelog/2026-07-16.mdx`: Document managed MCP behavior shared across supported agents. - #6991 and #7045 -> `docs/changelog/2026-07-16.mdx`: Document qualified DGX Station host preparation and the interactive-terminal boundary for `--station-deepseek`. - #6992, #7001, #7006, and #7044 -> `docs/changelog/2026-07-16.mdx`: Document managed-model reasoning behavior, safe inference route mutation, and verified vLLM served aliases. - #6865, #7010, and #7028 -> `docs/changelog/2026-07-16.mdx`: Document onboarding DNS recovery, explicit notice acceptance, and upgrades with user-local OpenShell. - #7005, #7021, #7029, and #7049 -> `docs/changelog/2026-07-16.mdx`: Document rebuild backup safety, no-dashboard state, managed gateway discovery, and Hermes shields topology checks. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [x] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [ ] Tests added or updated for changed behavior - [x] Existing tests cover changed behavior — justification: `test/changelog-docs.test.ts` validates the canonical heading, parser-safe SPDX comment, and detailed entry structure; the docs build validates published routes. - [ ] Tests not applicable — justification: - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [ ] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification - [x] PR description includes a `Signed-off-by:` line and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run check:diff` passed when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — `npx vitest run test/changelog-docs.test.ts` passed 6/6. - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — not applicable to this doc-only entry. - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) — passed with 0 errors and 2 pre-existing Fern warnings. - [x] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [x] New doc pages include SPDX header and frontmatter (new pages only) — native changelog entries use the required parser-safe MDX SPDX comment instead of frontmatter. --- Signed-off-by: Charan Jagwani <cjagwani@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added release notes for NemoClaw v0.0.85. * Documented improvements to compatibility, credential handling, setup validation, recovery workflows, endpoint configuration, gateway discovery, and runtime validation. * Added links to relevant user-guide sections. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary Follow up #7077 and #7028 by completing direct historical gateway upgrades. After a strict backup, the installer now retires a running gateway whenever its installed OpenShell is outside the prepared current release's supported range, preventing the new CLI from encountering the old gateway schema during recovery. ## Changes - Replace the setup-only conditional with an equivalent boolean invariant assertion. - Preserve the requirement that the `v0.0.55` fixture records the original OpenShell directory before hiding it from `PATH`. - Pin the `v0.0.74` registry contract to both `nemoclawVersion: "0.0.74"` and `fromDockerfile: null`, as proven by selective live E2E artifacts. - Keep earlier historical fixtures pinned to absent registry metadata. - Resolve the current OpenShell min/max range from the prepared current source after backup. - Retire the selected gateway only when the installed OpenShell falls below or above that range; keep a supported gateway running. - Fail closed after backup and before gateway retirement when the supported range is missing, malformed, or inverted. - Document the expanded gateway-retirement boundary in the quickstart, command reference, and sandbox-update guide. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [x] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [x] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [ ] Tests not applicable — justification: - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [x] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [x] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: #7028's maintainer approval established the strict-backup and managed-image recovery boundary for #6114. This follow-up retains those guards, scopes retirement to the selected gateway only after backup, preserves supported gateways, and fails closed on invalid range data. - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification - [x] PR description includes a `Signed-off-by:` line and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run check:diff` passed when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — installer recovery integration tests (38 passed), gateway support tests (5 passed), and final focused installer test after hook formatting (26 passed) - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — command/result: - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) — passed with 0 errors; Fern reported the existing unauthenticated-redirect and accent-contrast warnings - [x] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) --- Signed-off-by: Charan Jagwani <cjagwani@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Improved end-to-end coverage for OpenShell gateway upgrades by verifying structured legacy registry metadata (instead of only version values). * Expanded upgrade prompt/preinstall guard scenarios to confirm “keep vs retire” based on the blueprint-supported OpenShell version window, including invalid/unknown ranges and safer legacy gateway stop behavior. * **Documentation** * Updated the quickstart, sandbox update guide, and command reference to reflect conditional gateway retirement/retention and fail-closed behavior. * **Chores** * Refined the installer’s gateway retirement logic to rely on the blueprint-defined compatibility range, with a Linux-only PID-validated fallback to stop the legacy gateway process. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Summary
Upgrades from v0.0.55 could miss an existing OpenShell binary installed in
~/.local/bin, skip the pre-upgrade backup, and strand the registered sandbox after the gateway changed. This restores the standard user-local OpenShell path before the backup decision so prepared recovery can preserve and restore the sandbox.Related Issue
Fixes #6114
Changes
PATH.PATHv0.0.55 installer shape and verify strictbackup-allplus restore preparation.~/.local/bindeliberately absent fromPATH.Type of Change
Quality Gates
Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run check:diffpassed when hooks were skipped or unavailablenpx vitest run --project integration test/install-openshell-upgrade-prompt.test.ts test/install-preexisting-sandbox-recovery.test.ts test/install-orphaned-sandbox-recovery.test.ts— 35 passednpx vitest run --project cli src/lib/actions/upgrade-sandboxes-recovery.test.ts src/lib/actions/maintenance.test.ts src/lib/actions/sandbox/stopped-sandbox-backup.test.ts— 75 passednpx vitest run --project e2e-support test/e2e/support/openshell-gateway-upgrade-workflow-boundary.test.ts test/e2e/support/e2e-workflow.test.ts— 39 passedNEMOCLAW_RUN_LIVE_E2E=1 npx vitest run --project e2e-live test/e2e/live/openshell-gateway-upgrade.test.ts— 3 passed; Linux live case skipped locally and covered by the x86_64/arm64 CI matrixnpm run source-shape:check— passednpm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result:npm run docsbuilds without warnings (doc changes only)Signed-off-by: Charan Jagwani cjagwani@nvidia.com
Summary by CodeRabbit
New Features
openshell-gateway-upgradee2e coverage to run across multiple legacy fixtures, including x86_64 and ARM64, with added workflow-boundary validation for the expected matrix and live-test step.Bug Fixes
Tests