Skip to content

test(cli): cover remaining global and credentials adapters - #2942

Merged
cv merged 50 commits into
mainfrom
refactor/coverage-simple-global-adapters
May 5, 2026
Merged

test(cli): cover remaining global and credentials adapters#2942
cv merged 50 commits into
mainfrom
refactor/coverage-simple-global-adapters

Conversation

@cv

@cv cv commented May 3, 2026

Copy link
Copy Markdown
Collaborator

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

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

  • 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

Summary by CodeRabbit

  • Tests

    • Added comprehensive unit tests for credentials CLI command source adapter.
    • Added test suite for simple global oclif adapters covering parser output, defaults, and command mappings.
  • Chores

    • Improved code coverage annotations across CLI command modules.
    • Refactored token retrieval mechanism for enhanced testability.

cv added 30 commits May 2, 2026 13:36
@cv cv changed the title test(cli): cover remaining global oclif adapters test(cli): cover remaining global and credentials adapters May 3, 2026
@cv cv added the v0.0.34 label May 4, 2026
@wscurran wscurran added CI/CD and removed v0.0.34 labels May 4, 2026

@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.

Approved as part of stack from #2886 (auto-approve: CI green, no scope/behavior flags).

@cv cv added v0.0.35 and removed v0.0.34 labels May 5, 2026
@prekshivyas prekshivyas self-assigned this May 5, 2026
cv added a commit that referenced this pull request May 5, 2026
## Summary
Replace the file-level coverage ignore on sandbox log actions with
tested pure helpers and narrow ignores around subprocess-only paths.

## Stack Navigation
- Position: 42 of 60
- Previous PR: [#2939 — refactor(cli): split share oclif
commands](#2939)
- Next PR: [#2942 — test(cli): cover remaining global and credentials
adapters](#2942)

## Changes
- Removed the broad V8 ignore from `sandbox-logs-action.ts`.
- Exported and tested pure log option normalization and argv-building
helpers.
- Added narrow V8 ignores only around process-exit, OpenShell
subprocess, and follow-streaming boundaries still covered by CLI
subprocess tests.
- Added helper coverage for log probe result descriptions and probe
timeout environment handling.

## 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>
Co-authored-by: Prekshi Vyas <34834085+prekshivyas@users.noreply.github.com>
@cv
cv marked this pull request as ready for review May 5, 2026 22:07
@cv
cv changed the base branch from refactor/narrow-sandbox-logs-coverage-ignore to main May 5, 2026 22:07
@cv
cv enabled auto-merge (squash) May 5, 2026 22:07
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv
cv merged commit 15ffc33 into main May 5, 2026
11 checks passed
@cv
cv deleted the refactor/coverage-simple-global-adapters branch May 27, 2026 21:17
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: cli Command line interface, flags, terminal UX, or output area: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance feature PR adds or expands user-visible functionality and removed CI/CD feature PR adds or expands user-visible functionality labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions area: cli Command line interface, flags, terminal UX, or output area: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants