Skip to content

refactor(cli): remove deprecated deploy command - #10576

Open
ericksoa wants to merge 2 commits into
mainfrom
codex/remove-deprecated-deploy-10572
Open

refactor(cli): remove deprecated deploy command#10576
ericksoa wants to merge 2 commits into
mainfrom
codex/remove-deprecated-deploy-10572

Conversation

@ericksoa

@ericksoa ericksoa commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Outcome

Remove the deprecated nemoclaw deploy Brev compatibility command and its dedicated implementation.
The CLI no longer registers or displays that command; deploy is available only as a sandbox name in the sandbox-first grammar.

Reason

The maintained remote-host workflow provisions the host separately, runs the hosted installer, and uses nemoclaw onboard on that host.
Retaining the deprecated wrapper preserved an unsupported Brev provisioning, SSH, and credential-transfer path with no current consumer.

Related issues

Fixes #10572

Changes

  • Delete the oclif command, global action adapter, Brev implementation, and their focused tests.
  • Remove deploy display metadata and release deploy from the reserved sandbox-name list.
  • Remove the deprecated command, environment-variable sections, and stale troubleshooting entry from public documentation.
  • Retire ALLOWED_CHAT_IDS from legacy credential migration because its only consumer was the removed deploy path.
  • Add compiled-discovery, real-CLI routing, and retired-credential migration regression evidence.
  • Lower architecture ratchets to the measured fan-in and action-root counts after the deletion.

Verification

  • vitest run --project cli src/commands/simple-global-oclif-adapters.test.ts src/lib/actions/global.test.ts src/lib/onboard/entry-options.test.ts — 3 files passed, 56 tests passed.
  • vitest run --project integration test/cli/onboard-compatibility.test.ts — 1 file passed, 18 tests passed.
  • vitest run --project package-contract test/package-contract/cli/command-registry.test.ts — 1 file passed, 824 tests passed.
  • vitest run --project cli src/commands/credentials.test.ts — 1 file passed, 11 tests passed.
  • vitest run --project integration test/credentials/credentials.test.ts — 1 file passed, 48 tests passed.
  • npm run typecheck:cli — passed after the initial change and after advisor remediation.
  • npm run docs — passed after the initial change and after advisor remediation, with 0 errors and 2 existing warnings.
  • npm run checks:repository — passed, including the lowered source-architecture budget.
  • Manual PR E2E run 33221307422, targets=full-e2e — passed on commit 0a873aa; install, onboard, CLI operations, hosted and sandbox inference, launch turns, logs, performance budgets, and cleanup passed with 0 unhandled errors.
  • Commit hooks — passed formatting, lint, repository checks, environment-variable documentation, secret scanning, Markdown validation, source-shape limits, and growth guardrails.
  • Pre-push hooks — passed the path-scoped CLI TypeScript check for both commits.
  • npm run check — not successful locally: 83 unrelated CLI/integration failures and 1 unrelated plugin failure occurred during concurrent worktree tests, dominated by fixed-budget timeouts, cascading temporary-state failures, and host-state leakage. This result is not used as validation; current-base CI is the broad-gate authority.
  • Diff review — no secrets, API keys, or credentials added.

Review notes

The PR Review Advisor identified two valid completion gaps on commit 742ca2a: the obsolete ALLOWED_CHAT_IDS migration key and the stale troubleshooting reserved-name entry.
Commit 0a873aa addresses both findings and adds the credential migration regression.
The second advisor pass on 0a873aa found no remaining issue across behavior, reduction, dependency use, architecture, documentation, migration, operations, test design, or trust.
The change removes a sensitive remote-execution and credential-transfer path; it adds no credential flow, network authority, external write, migration, or compatibility fallback.


Signed-off-by: Aaron Erickson aerickson@nvidia.com

Summary by CodeRabbit

  • Breaking Changes

    • Removed the deprecated deploy command and its deployment workflows.
    • The deploy name can now be used as a sandbox name and is normalized like other names.
  • Documentation

    • Removed legacy deployment command and environment-variable guidance.
    • Updated sandbox-name troubleshooting and credential usage guidance.
  • Security & Maintenance

    • Retired ALLOWED_CHAT_IDS from credential staging and storage.
    • Updated validation and compatibility checks to reflect the current command set.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@ericksoa ericksoa self-assigned this Aug 28, 2026
@copy-pr-bot

copy-pr-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 284af6bb-40db-4a16-b1cf-10375f554af9

📥 Commits

Reviewing files that changed from the base of the PR and between 83fb5d9 and 0a873aa.

📒 Files selected for processing (20)
  • ci/source-architecture-budget.json
  • docs/reference/commands.mdx
  • docs/reference/troubleshooting.mdx
  • src/commands/deploy.ts
  • src/commands/simple-global-oclif-adapters.test.ts
  • src/lib/README.md
  • src/lib/actions/deploy.ts
  • src/lib/actions/global.test.ts
  • src/lib/actions/global.ts
  • src/lib/cli/public-display-defaults.ts
  • src/lib/credentials/command-support.ts
  • src/lib/credentials/store.ts
  • src/lib/deploy/README.md
  • src/lib/deploy/index.test.ts
  • src/lib/deploy/index.ts
  • src/lib/onboard/entry-options.test.ts
  • src/lib/onboard/sandbox-agent.ts
  • test/cli/onboard-compatibility.test.ts
  • test/credentials/credentials.test.ts
  • test/package-contract/cli/command-registry.test.ts
💤 Files with no reviewable changes (11)
  • src/lib/deploy/README.md
  • docs/reference/commands.mdx
  • src/commands/deploy.ts
  • src/lib/actions/global.ts
  • src/lib/credentials/store.ts
  • src/lib/cli/public-display-defaults.ts
  • src/lib/README.md
  • src/lib/actions/deploy.ts
  • src/lib/onboard/sandbox-agent.ts
  • src/lib/deploy/index.test.ts
  • src/lib/deploy/index.ts

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

The deprecated deploy CLI command and Brev-specific deployment implementation were removed. Command discovery, sandbox-name validation, documentation, credential handling, tests, and architecture budgets were updated to reflect the removal.

Changes

Deploy command removal

Layer / File(s) Summary
Remove deploy execution path
src/commands/deploy.ts, src/lib/actions/deploy.ts, src/lib/actions/global.ts, src/lib/deploy/index.ts, src/commands/simple-global-oclif-adapters.test.ts
Removed the deploy command, deployment action wrappers, Brev deployment implementation, and related adapter test coverage.
Update command contracts and tests
test/package-contract/cli/command-registry.test.ts, test/cli/onboard-compatibility.test.ts, src/lib/onboard/sandbox-agent.ts, src/lib/onboard/entry-options.test.ts, src/lib/actions/global.test.ts
Updated command discovery and dispatch expectations. The name deploy is now accepted as a sandbox name.
Clean up documentation and credential contracts
docs/reference/commands.mdx, docs/reference/troubleshooting.mdx, src/lib/README.md, src/lib/deploy/README.md, src/lib/credentials/command-support.ts, src/lib/credentials/store.ts, test/credentials/credentials.test.ts, ci/source-architecture-budget.json
Removed deprecated deployment documentation and layout references. Removed ALLOWED_CHAT_IDS from credential handling and added migration coverage. Updated architecture budgets.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Merge Risk: ⚪ Minimal · up to 0a873

The PR removes the deprecated deploy workflow, updates command discovery, documentation, and credential migration coverage, and reports successful targeted validation and end-to-end checks. No actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: brandonpelfrey

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 7 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: removal of the deprecated CLI deploy command.
Linked Issues check ✅ Passed The changes satisfy issue #10572. They remove the deploy command, action adapters, Brev implementation, metadata, focused tests, reserved-name restriction, and documentation. They update registry and …
Out of Scope Changes check ✅ Passed The changes remain within the linked issue scope. The ALLOWED_CHAT_IDS cleanup is related legacy credential-migration cleanup for the removed deployment path. No unrelated changes to the installer, on…
Full details: Linked Issues check

Explanation

The changes satisfy issue #10572. They remove the deploy command, action adapters, Brev implementation, metadata, focused tests, reserved-name restriction, and documentation. They update registry and compatibility tests and preserve sandbox-name usage for deploy.

Full details: Out of Scope Changes check

Explanation

The changes remain within the linked issue scope. The ALLOWED_CHAT_IDS cleanup is related legacy credential-migration cleanup for the removed deployment path. No unrelated changes to the installer, onboarding, Brev Launchable workflows, or E2E infrastructure are shown.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 7 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/remove-deprecated-deploy-10572

Comment @coderabbitai help to get the list of available commands.

@github-code-quality

github-code-quality Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit 0a873aa in the codex/remove-depreca... branch remains at 96%, unchanged from commit 7ba0122 in the main branch.

TypeScript / code-coverage/cli

The overall line coverage in commit 0a873aa in the codex/remove-depreca... branch remains at 84%, unchanged from commit 83fb5d9 in the main branch.

Show a line coverage summary of the most impacted files.
File main 83fb5d9 codex/remove-depreca... 0a873aa +/-
src/lib/onboard...y-checkpoint.ts 96% 83% -13%
src/lib/onboard...esume-intent.ts 94% 85% -9%
src/lib/inferen...anaged-state.ts 93% 91% -2%
src/lib/onboard...al-inference.ts 91% 91% 0%
src/lib/onboard...uild-context.ts 74% 74% 0%
src/lib/onboard...on-bootstrap.ts 77% 78% +1%
src/lib/actions...eway-restart.ts 91% 93% +2%
src/lib/actions...ary-recovery.ts 92% 97% +5%
src/lib/onboard...-mount/index.ts 75% 88% +13%
src/lib/actions...sor-relaunch.ts 75% 94% +19%

Updated August 28, 2026 23:19 UTC

@github-actions

Copy link
Copy Markdown
Contributor

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit 0a873aa. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

All previous runs

@ericksoa
ericksoa marked this pull request as ready for review August 28, 2026 23:54
@ericksoa ericksoa added the v0.0.116 Release target label Aug 29, 2026

@prekshivyas prekshivyas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict

Request changes. The clean-build diff is internally consistent, but the supported source-checkout upgrade path retains the deleted command. The PR therefore does not yet satisfy the accepted outcome that the CLI no longer registers or displays deploy.

Blocking finding

[P1] Make normal CLI builds remove retired command artifacts

Location: test/package-contract/cli/command-registry.test.ts:125

The new assertion passes only after clean:cli. TypeScript does not remove emitted files for deleted sources, while build:cli does not clean dist. The source-checkout installer and contributor setup both invoke build:cli without cleaning first.

Reproduction against commit 0a873aa:

  1. Clean and build the merge-base commit c166756.
  2. Switch to the latest PR commit.
  3. Run npm run build:cli without clean:cli.
  4. Observe that dist/commands/deploy.js, dist/lib/actions/deploy.js, dist/lib/deploy/index.js, and deploy metadata remain.

In this state, nemoclaw deploy --help still displays the deprecated Brev command. The package-contract test fails three assertions, and deploy remains a global token, so a sandbox named deploy cannot use the sandbox-first grammar. Invoking the stale command exits with runDeployAction is not a function; it stops before credential transfer or remote execution.

Make the normal build prune retired outputs, or explicitly retire these artifacts before metadata generation. Add an upgrade regression that seeds the previous compiled deploy artifacts before running the normal build.

Root-cause sibling paths checked:

  • package.json build:cli retains existing dist output.
  • scripts/install.sh source-checkout installation calls build:cli without cleaning.
  • scripts/dev-setup.sh contributor setup calls build:cli without cleaning.
  • Fresh managed-install clones start without dist and are not affected.

Security rubric

Category Verdict Reason
Secrets and Credentials PASS The stale public command fails before the removed credential-transfer action executes.
Input Validation and Data Sanitization PASS The clean build correctly accepts deploy as a normalized sandbox name.
Authentication and Authorization PASS No authentication or authorization boundary changes.
Dependencies and Third-Party Libraries PASS No dependency changes.
Error Handling and Logging WARNING The stale command exposes an internal missing-function error.
Cryptography and Data Protection PASS No cryptographic or protected-data changes.
Configuration and Security Headers WARNING The normal build configuration retains deleted executable artifacts.
Security Testing WARNING Clean-build tests do not cover the supported upgrade state.
System Security WARNING Clean and upgraded installations expose different command and routing surfaces.

Validation

  • Clean PR build: 957 focused tests passed.
  • Upgrade reproduction: 3 of 825 package-contract assertions failed.
  • Merge with current main b80e47c: repository checks, 957 focused tests, and npm run docs passed after a clean build.
  • GitHub required checks pass on the latest PR commit.

All 20 changed files and the adjacent build, installer, command-discovery, routing, credential-migration, and documentation-generation paths were reviewed.

@cjagwani cjagwani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes on exact head 0a873aab5dee5b91dba067c8dfc8e24d6b1abf34. I independently reproduced the supported source-checkout upgrade failure: compiling the previous version, switching to this head, and running the normal non-clean build leaves the deleted dist/commands/deploy.js, dist/lib/actions/deploy.js, and dist/lib/deploy/ artifacts. deploy is still discovered as the old Brev command, but the newly compiled global action no longer exports runDeployAction, so upgraded checkouts expose a broken command and do not route a sandbox named deploy like fresh installs do. build:cli, scripts/install.sh, and scripts/dev-setup.sh all permit this path. Make the normal build prune retired outputs and add an upgrade regression that seeds the previous compiled artifacts before the normal build. Clean-head verification otherwise passed: 957 focused tests, repository architecture checks, docs build, required CI, CodeRabbit, and all nine Advisor specialists.

expect(discoveredIds.has(command.commandId), command.usage).toBe(true);
});

it("does not discover the removed deploy command (#10572)", () => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] This proves only a clean build. A normal source-checkout upgrade keeps deleted TypeScript outputs because build:cli does not clean dist; I reproduced this head retaining the old deploy command and then failing at runDeployAction is not a function. Add a regression that seeds the previous deploy artifacts, runs the normal build path, and proves command discovery, global routing, and deploy --help are clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v0.0.116 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the deprecated nemoclaw deploy command

3 participants