Repository navigation
test(onboard): keep validation test on source boundary - #5927
Conversation
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
📝 WalkthroughWalkthrough
ChangesDependency injection and test rewrite
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in the Show a code coverage summary of the most covered files.
TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most covered files.
Updated |
PR Review Advisor (Nemotron Ultra) — No blocking findingsMerge posture: No blocking advisor findings This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision. |
PR Review Advisor — No blocking findingsMerge posture: No blocking advisor findings Action checklist
Test follow-ups to resolve or justifyIf these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.
This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision. |
E2E Advisor RecommendationRequired E2E: Dispatch hint: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
Vitest E2E Scenario RecommendationRequired Vitest E2E scenarios: Dispatch required Vitest E2E scenarios:
Full Vitest E2E advisor summaryVitest E2E Scenario AdvisorBase: Required Vitest E2E scenarios
Optional Vitest E2E scenarios
Relevant changed files
|
Cherry-pick of 23a9b6e from origin/codex/fix-onboard-test-src-import (PR #5927) so this branch can rebuild dist without tripping the no-test-dist-imports guard. Refactors the validation test to drive createInferenceSelectionValidationHelpers from src instead of spawning a child node process against dist artifacts. Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
…t-src-import # Conflicts: # test/package-contract/inference-selection-validation.test.ts
|
Refreshed this bootstrap onto the v0.0.69 release commit in signed merge commit a1a550b. The only conflict was the tactical #5928 move of the compiled-output test into test/package-contract. I resolved it toward this PR's intended steady state:
Post-resolution evidence:
The diff against current main remains limited to the three intended source/package-boundary files. |
|
Fresh-head GPT advisor test-follow-up disposition:
No additional test is warranted here. The focused source test, clean build, typecheck, import-boundary check, project-overlap check, repository checks, and fresh CI static-checks all pass. |
## Summary Restores `main`'s source/package test boundary after NVIDIA#5738 added a colocated test that constructed paths into `dist/lib`. The test now imports source directly and injects its credential/probe collaborators, removing the child-process and `require.cache` fixture while preserving the non-zero exit regression coverage. ## Related Issue Refs NVIDIA#5919 ## Changes - expose credential and endpoint probes through the validation helper's existing dependency boundary - replace the compiled-output child-process fixture with a direct Vitest source test - preserve assertions for `process.exit(1)`, `process.exitCode`, fallback throwing, redacted diagnostics, and bypassed recovery prompting ## 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) ## Quality Gates - [x] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [ ] Tests not applicable — justification: - [ ] Docs updated for user-facing behavior changes - [x] Docs not applicable — justification: testability refactor with no user-facing behavior change - [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: CodeQL, CodeRabbit, and both PR Review Advisor checks passed with no blocking findings or inline comments - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Git hooks passed during commit and push, or `npx prek run --from-ref main --to-ref HEAD` passes - [x] Targeted tests pass for changed behavior - [ ] Full `npm test` passes (broad runtime changes only) - [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) - [ ] 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) Targeted evidence: focused Vitest test; `npm run build:cli`; `npm run typecheck:cli`; `npm run checks`; normal commit and push hooks (including the full CLI test hook). The source-level test is sufficient for this testability-only refactor; existing onboarding integration tests and the strict-tool-call probe driver retain caller/runtime coverage. --- Signed-off-by: Carlos Villela <cvillela@nvidia.com> Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Summary
Restores
main's source/package test boundary after #5738 added a colocated test that constructed paths intodist/lib. The test now imports source directly and injects its credential/probe collaborators, removing the child-process andrequire.cachefixture while preserving the non-zero exit regression coverage.Related Issue
Refs #5919
Changes
process.exit(1),process.exitCode, fallback throwing, redacted diagnostics, and bypassed recovery promptingType of Change
Quality Gates
Verification
Verifiedin GitHubnpx prek run --from-ref main --to-ref HEADpassesnpm testpasses (broad runtime changes only)npm run docsbuilds without warnings (doc changes only)Targeted evidence: focused Vitest test;
npm run build:cli;npm run typecheck:cli;npm run checks; normal commit and push hooks (including the full CLI test hook). The source-level test is sufficient for this testability-only refactor; existing onboarding integration tests and the strict-tool-call probe driver retain caller/runtime coverage.Signed-off-by: Carlos Villela cvillela@nvidia.com