Skip to content

test(cli): cover global action facade - #2943

Merged
cv merged 2 commits into
refactor/coverage-simple-global-adaptersfrom
refactor/coverage-credentials-oclif-adapter
May 3, 2026
Merged

test(cli): cover global action facade#2943
cv merged 2 commits into
refactor/coverage-simple-global-adaptersfrom
refactor/coverage-credentials-oclif-adapter

Conversation

@cv

@cv cv commented May 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Remove another broad coverage ignore by covering the global CLI action facade directly with mocked action/runtime dependencies.

Stack Navigation

Changes

  • Removed the file-level V8 ignore from global-cli-actions.ts.
  • Added source-level tests for onboarding, deploy, maintenance, help/version, runtime recovery, OpenShell provider commands, and upgrade hook forwarding.
  • Added an upgrade runtime hook so tests and future callers can avoid loading the subprocess-heavy upgrade action path.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Verification

  • npx prek run --all-files passes
  • npm test passes
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • make docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Carlos Villela cvillela@nvidia.com

@cv cv self-assigned this May 3, 2026
@copy-pr-bot

copy-pr-bot Bot commented May 3, 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 May 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 6b481c90-042f-4f51-a37a-800f9effa122

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/coverage-credentials-oclif-adapter

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

@cv
cv merged commit 034454f into refactor/coverage-simple-global-adapters May 3, 2026
9 checks passed
@cv cv changed the title test(cli): cover credentials oclif adapter test(cli): cover global action facade May 3, 2026
cv added a commit that referenced this pull request May 5, 2026
## Summary
Remove broad coverage ignores from the remaining simple global oclif
adapters and the credentials adapter, then cover their parser-to-action
mappings directly.

## Stack Navigation
- Position: 43 of 60
- Previous PR: [#2940 — test(cli): narrow sandbox logs coverage
ignores](#2940)
- Next PR: [#2943 — test(cli): cover global action
facade](#2943)

## Changes
- Removed file-level V8 ignores from debug, deploy, gateway-token, root
help/version, tunnel, uninstall, and credentials adapters.
- Added direct source-level adapter tests with mocked action/runtime
dependencies.
- Added source-level credentials tests for top-level usage, provider
listing, and `credentials reset --yes`.
- Added a test hook for the gateway-token adapter so source tests avoid
loading the heavy onboard module.

## Type of Change
- [x] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Verification
- [x] `npx prek run --all-files` passes
- [x] `npm test` passes
- [x] Tests added or updated for new or changed behavior
- [x] No secrets, API keys, or credentials committed
- [ ] Docs updated for user-facing behavior changes
- [ ] `make docs` builds without warnings (doc changes only)
- [ ] 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: Carlos Villela <cvillela@nvidia.com>

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
cv added a commit that referenced this pull request May 5, 2026
## Summary
Remove broad coverage ignores from small runtime utility modules that
already have or can have direct tests.

## Stack Navigation
- Position: 45 of 60
- Previous PR: [#2943 — test(cli): cover global action
facade](#2943)
- Next PR: [#2961 — test(cli): stabilize coverage dist
sourcemaps](#2961)

## Changes
- Removed the file-level V8 ignore from the oclif runner, which is
already directly tested.
- Removed the file-level V8 ignore from terminal style constants.
- Added a small terminal style export test to keep the presentation
constants covered.

## Type of Change
- [x] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Verification
- [x] `npx prek run --all-files` passes
- [x] `npm test` passes
- [x] Tests added or updated for new or changed behavior
- [x] No secrets, API keys, or credentials committed
- [ ] Docs updated for user-facing behavior changes
- [ ] `make docs` builds without warnings (doc changes only)
- [ ] 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: Carlos Villela <cvillela@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Extended CLI actions with optional runtime hook configuration for
sandbox upgrades, enabling customizable upgrade handling.

* **Chores**
  * Cleaned up obsolete code annotations.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Co-authored-by: Prekshi Vyas <34834085+prekshivyas@users.noreply.github.com>
@wscurran wscurran added the chore Build, CI, dependency, or tooling maintenance label Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Build, CI, dependency, or tooling maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants