test(cli): restore source-shape guard#3636
Merged
cjagwani merged 3 commits intoMay 16, 2026
Merged
Conversation
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Contributor
E2E Advisor RecommendationRequired E2E: None Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
|
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
15 tasks
12 tasks
cv
added a commit
that referenced
this pull request
May 16, 2026
## Summary Splits helper-oriented coverage out of the oversized `test/onboard.test.ts` file into focused unit test files. The PR keeps source-shape coverage at zero, preserves equivalent behavior coverage, and makes the remaining onboard orchestration tests easier to navigate. ## Related Issue <!-- Fixes #NNN or Closes #NNN. Remove this section if none. --> Stacked on #3632 / #3636. ## Changes <!-- Bullet list of key changes. --> - Moved GPU helper coverage into focused module tests: - `src/lib/onboard/gateway-gpu-passthrough.test.ts` - `src/lib/onboard/sandbox-gpu-create.test.ts` - `src/lib/onboard/sandbox-gpu-mode.test.ts` - `src/lib/onboard/initial-policy.test.ts` - Moved policy suggestion helper coverage into `test/onboard-policy-suggestions.test.ts`. - Moved dashboard helper coverage into `test/onboard-dashboard.test.ts` and dashboard port helper coverage into `src/lib/onboard/dashboard-port.test.ts`. - Moved sandbox naming helper coverage into `test/onboard-sandbox-name.test.ts`. - Moved OpenShell version/pinning helper coverage into `test/onboard-openshell-version.test.ts`. - Moved Dockerfile patch helper coverage into `src/lib/onboard/dockerfile-patch.test.ts`. - Moved gateway runtime / Docker-driver / CDI helper coverage into `test/onboard-gateway-runtime.test.ts`. - Moved Model Router orchestration coverage into `test/onboard-model-router.test.ts`. - Moved messaging setup/provider coverage into `test/onboard-messaging.test.ts`. - Moved custom Dockerfile orchestration coverage into `test/onboard-custom-dockerfile.test.ts`. - Moved provider routing/probe/provider-CRUD helper coverage into owning module tests: - `src/lib/inference/config.test.ts` - `src/lib/inference/onboard-probes.test.ts` - `src/lib/onboard/providers.test.ts` - `src/lib/validation.test.ts` - `src/lib/core/url-utils.test.ts` - `src/lib/adapters/http/probe.test.ts` - Moved web-search support coverage into `src/lib/onboard/web-search-support.test.ts` / `test/onboard-brave-validation.test.ts`. - Moved build-context and sandbox-create recovery hint coverage into `src/lib/build-context.test.ts`. - Extracted focused production helpers with direct module coverage: - `src/lib/onboard/credential-env.ts` - `src/lib/onboard/summary.ts` - additional exports in `src/lib/onboard/sandbox-gpu-mode.ts` and `src/lib/onboard/dashboard-port.ts` - Removed the corresponding helper-only cases from `test/onboard.test.ts`; it is now much smaller while keeping the remaining orchestration/integration-style coverage. ## 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 <!-- Check each item you ran and confirmed. Leave unchecked items you skipped. Doc-only changes do not require npm test unless you ran it. --> - [x] `npm run source-shape:check` passes - [x] `npm run build:cli` passes - [x] `npx tsc -p tsconfig.cli.json --noUnusedLocals --noUnusedParameters --pretty false` passes - [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) --- <!-- DCO sign-off required by CI. Run: git config user.name && git config user.email --> Signed-off-by: Carlos Villela <cvillela@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **Tests** * Added comprehensive test coverage for GPU configuration, sandbox naming, credential management, dashboard port handling, custom Dockerfile support, messaging channels, Model Router setup, and OpenShell version management. * Added tests for probe error handling, policy validation, and sandbox state detection. * **Refactor** * Reorganized onboarding helpers into dedicated modules for improved maintainability. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/NVIDIA/NemoClaw/pull/3640?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Carlos Villela <cvillela@nvidia.com>
This was referenced May 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reintroduces the source-shape guard as a stacked follow-up to #3632, but fixes the detector so it catches Node
assert.*source-text assertions instead of reporting a false zero. It then completes the source-shape purge by removing the detected source-text assertions fromtest/onboard.test.tsand ratcheting the budget back to zero.Related Issue
Stacked on #3632.
Changes
scripts/find-source-shape-tests.ts,source-shape:*npm scripts, and the prek source-shape budget hook.assert.match,assert.doesNotMatch,assert.ok, and related Node assert-style source-text assertions.test/onboard.test.tswhere behavior is covered by existing helper/integration tests.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesmake docsbuilds without warnings (doc changes only)Signed-off-by: Carlos Villela cvillela@nvidia.com
Summary by CodeRabbit
Tests
Chores