Skip to content

test(vitest): unify and type-check plugin tests - #6697

Merged
cv merged 5 commits into
mainfrom
codex/vitest-plugin-test-unification
Jul 12, 2026
Merged

test(vitest): unify and type-check plugin tests#6697
cv merged 5 commits into
mainfrom
codex/vitest-plugin-test-unification

Conversation

@cv

@cv cv commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

The root and standalone plugin test commands now share one canonical project definition and the same installed Vitest/Vite toolchain. Plugin tests and config files are type-checked by the named local and CI gate, while production builds continue to exclude tests.

Related Issue

Part of #6692

Changes

  • Added Vitest-agnostic canonical plugin project options consumed through each package's local defineProject, so the root and standalone entry points share behavior without crossing nominal Vitest type identities. The existing duplicated configuration could drift; test/plugin-vitest-project.test.ts protects both consumers and the standalone-only global setup.
  • Aligned the plugin Vitest declaration and lockfile with the root Vitest/Vite installation, including the previously failing standalone minimal reporter path.
  • Added a no-emit plugin test TypeScript project and a named typecheck command, then wired that command into the normal plugin check, pre-push hook, and CI typecheck action.
  • Corrected the five latent plugin-test diagnostics exposed by the new gate while leaving production behavior unchanged, and ratcheted the affected test-file size budget.
  • Updated contributor guidance for the plugin production-and-test typecheck workflow.

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)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification: no end-user behavior changed; the contributor-only command is documented in AGENTS.md and CONTRIBUTING.md.
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: sensitive-path edits are test-only type corrections; plugin coverage and the complete non-live suite pass with no runtime source change.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Verification

  • PR description includes the DCO sign-off declaration and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run check:diff passed when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — npx vitest run --project integration test/plugin-vitest-project.test.ts test/pr-workflow-contract.test.ts (25/25); root and standalone plugin entry points (23 files, 553/553 each); plugin typecheck, project-membership, static budgets, production-build exclusion, and plugin coverage gates pass.
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — env -u SSH_CONNECTION -u SSH_CLIENT -u SSH_TTY CI=1 npm test passed 1,436 files and 16,429 tests (3 files/40 tests skipped).
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run 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 added 5 commits July 11, 2026 17:28
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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: b5341410-d9b1-4455-a75d-7a7b63e21c98

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 codex/vitest-plugin-test-unification

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

@github-code-quality

github-code-quality Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage remains at 96%, unchanged from the codex/vitest-fast-so... branch.

TypeScript / code-coverage/cli

The overall coverage in the codex/vitest-plugin-... branch remains at 79%, unchanged from the codex/vitest-fast-so... branch.

Show a code coverage summary of the most impacted files.
File codex/vitest-fast-so... 5278927 codex/vitest-plugin-... 3b78e05 +/-
src/lib/cli/public-dispatch.ts 85% 69% -16%
src/lib/shields/index.ts 72% 58% -14%
src/lib/policy/index.ts 66% 62% -4%
src/lib/onboard.ts 30% 29% -1%
src/lib/onboard...er-gpu-patch.ts 76% 78% +2%
src/lib/messagi...agent-config.ts 64% 71% +7%
src/lib/state/sandbox.ts 76% 85% +9%
src/lib/agent/onboard.ts 70% 80% +10%
src/lib/onboard...tup-nim-flow.ts 80% 94% +14%
src/lib/cli/com...and-registry.ts 60% 90% +30%

Updated July 12, 2026 01:25 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-actions

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: None
Optional E2E: None

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/codex/vitest-fast-source-boundary-main
Head: HEAD
Confidence: high

Required E2E

  • None. No live runtime, installer, onboarding state-machine, sandbox, credential, network-policy, inference-routing, deployment, or assistant user-flow behavior changes. This is CI/test-tooling and tests-only work; the updated typecheck and workflow-contract/unit gates are the appropriate validation boundaries.

Optional E2E

  • None.

New E2E recommendations

  • None.

@github-actions

github-actions Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings

Merge posture: No blocking advisor findings
Primary next action: No advisor follow-up required beyond maintainer review.
Findings: 0 required · 0 warnings · 0 optional suggestions

Workflow run details

This is an automated review. Required findings need action before merge. Warnings and optional suggestions do not require a response or follow-up. A human maintainer makes the final merge decision.

Base automatically changed from codex/vitest-fast-source-boundary-main to main July 12, 2026 01:33
@cv
cv merged commit 451f6ab into main Jul 12, 2026
52 checks passed
@cv
cv deleted the codex/vitest-plugin-test-unification branch July 12, 2026 01:34
@cv cv mentioned this pull request Jul 12, 2026
21 tasks
cv added a commit that referenced this pull request Jul 12, 2026
## Summary

Add per-test ownership for temporary HOME/bin directories, loopback
servers, and child processes so cleanup is awaited even when setup or
assertions fail. Migrate the current high-use CLI helpers and high-risk
Hermes broker and Ollama proxy consumers, including cleanup of each
implicit CLI HOME. This is PR4 in the #6692 stack; PRs #6696 and #6697
are already merged.

## Related Issue

Related to #6692

## Changes

- Add `OwnedTestResources` and focused `test.extend` fixtures for LIFO
cleanup of temporary directories, HOME/bin environments, servers, and
child processes.
- Add a shared child-process owner that waits for `close`, attempts
graceful termination, escalates to `SIGKILL` when required, and confirms
piped stdio is closed. The owned-resource fixture and Ollama proxy
harness share this lifecycle because suite teardown did not consistently
cover setup failures or await process closure.
- Track server lifetime from ownership registration so fixture cleanup
waits for both fixture-initiated shutdown and shutdown already started
by code under test.
- Remove the unowned per-invocation CLI HOME by deleting it when
`runWithEnvInternal` completes, while preserving explicit caller-owned
HOME directories.
- Migrate the current repeated CLI HOME/bin setup helpers and the
high-risk logs, doctor, Hermes broker, and Ollama proxy process/server
consumers.
- Add focused regressions for idempotent cleanup, server shutdown
already in progress, graceful and forced child termination, proxy
readiness failure cleanup, and CLI HOME cleanup after success, failure,
and timeout.

## 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: This changes test-only
resource ownership and cleanup. The required documentation-writer review
confirmed there is no user-facing behavior, test command, lane, or
contributor contract to document.
- [ ] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [ ] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification:
- [ ] 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] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — command/result or justification:
- `npx vitest run --project integration
test/owned-test-resources.test.ts test/cli/helpers.test.ts
test/cli/logs.test.ts test/cli/debug-command.test.ts
test/cli/doctor-gateway-token.test.ts test/cli/sandbox-mutations.test.ts
test/cli/snapshot-shields.test.ts
test/hermes-tool-gateway-broker.test.ts
test/ollama-auth-proxy-handler.test.ts` — 9 files, 71/71 tests passed on
the rebased branch.
- `NEMOCLAW_TEST_TIMEOUT=60000 npx vitest run --project integration
test/cli/helpers.test.ts` — 12/12 tests passed; the synchronous timeout
regression remained fixed at 2 seconds.
- `npx vitest run --project integration test/cli/logs.test.ts
--detectAsyncLeaks` — 10/10 tests passed with no async leaks.
- `npm run typecheck:cli`, Biome on all changed files, `npm run
source-shape:check`, `npm run test-size:check`, `npm run
test:projects:check`, `npm run test:imports:check`, and `npm run
test:titles:check` passed.
- [x] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result: `npm test` passed on the
rebased branch (1,438 files and 16,457 tests passed; 3 files and 40
opt-in platform tests skipped).
- [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)

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


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

* **Tests**
* Improved CLI test hermeticity by standardizing on
`owned-test-resources` with resource-scoped setup/teardown across logs,
doctor, debug, sandbox mutations, snapshot shields, and
sandbox/server-related suites.
* Expanded HOME-related coverage, verifying no implicit HOME is left
behind for successful, failed, and timed-out runs (while honoring
explicit HOME).
* Added dedicated child-process lifecycle ownership utilities and new
verification tests for graceful shutdown, SIGTERM→SIGKILL escalation,
and reliable stream closure/cleanup.
* Strengthened ollama auth proxy startup/cleanup tests, including
readiness timeout failures, listener removal, and retryable cleanup
behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
cv added a commit that referenced this pull request Jul 12, 2026
## Summary
Vitest project validation now compares every filesystem test candidate
with Vitest's complete eight-project roster, rejecting omissions,
overlaps, wrong routing, unexpected files, and unexpected project names.
The shared credential-free E2E workflow now applies Vitest's native
e2e/credential-free tag filter in addition to the existing safe matrix
scanner. The dashboard-port regression fixture also uses a coherent fake
OpenShell 0.0.72 component set and an OS-assigned gateway port so the
repo-wide gate stays hermetic.

This is the final entry in the ordered #6692 stack after #6693, #6696,
#6697, #6699, #6700, #6701, #6702, and #6705 landed.

## Related Issue
Closes #6692

## Changes
- Discover broad test/spec JavaScript and TypeScript candidates under
src, test, and nemoclaw/src, including nested dist, coverage, and .venv
paths that Vitest would see.
- Compare candidate routing with Vitest file listings and the complete
roster from list-tags JSON, including empty and opt-in projects.
- Produce sorted diagnostics for zero membership, overlap, wrong
project, unsupported candidates, unexpected listed files, and missing or
extra projects.
- Invoke Vitest portably through process.execPath and
node_modules/vitest/vitest.mjs.
- Require the exact native credential-free tag filter in the shared E2E
workflow contract while retaining the TypeScript scanner's path,
project, ID, and declaration checks.
- Keep the dashboard-port exhaustion regression independent of port
8080, developer OpenShell overrides, channel selection, and network
installation.

## 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: these are
contributor/test-harness safeguards; AGENTS.md now states the exhaustive
project-membership contract, the E2E README already documents the native
module tag, and the required documentation-writer review found no
user-facing 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: independent review
covered the shared credential-free workflow and onboarding regression
fixture; it confirmed the filter preserves the existing scanner and the
fixture's child-only environment cannot reach a real OpenShell install.
- [ ] 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] Normal pre-commit, commit-msg, and pre-push hooks passed, or npm
run check:diff passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — 46 integration tests passed across the
boundary and dashboard-port files; 4 E2E-support workflow tests passed;
project membership is exact for 1,537 candidates across 8 projects; CLI
type-check, title style, Biome, and diff checks passed. The fixture also
passed with hostile inherited OpenShell paths and dev-channel selection.
- [x] Applicable broad gate passed — npm test passed 1,456 files /
16,515 tests before the final focused hardening; npm run check passed
the repo-wide structural, CLI coverage, and plugin coverage gates,
followed by focused reruns and normal hooks after the final
child-environment pin.
- [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 (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

- **Tests**
- Credential-free end-to-end test runs now execute only tests matching
the credential-free tag.
- Vitest project validation now checks for missing, overlapping,
unsupported, wrong, zero-membership, and unexpected test-to-project
assignments, plus roster mismatches.
- Expanded boundary tests cover test candidate discovery, expected
project mapping, Vitest invocation resolution, and listing/roster
parsing.
- Improved onboarding “dashboard port exhaustion” assertions for more
hermetic, reliable verification.
- **Documentation**
- Updated testing guidance to require Vitest project globs be disjoint
and exhaustive, enforced by the projects check.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
<!-- markdownlint-disable MD041 -->
## Summary
The root and standalone plugin test commands now share one canonical
project definition and the same installed Vitest/Vite toolchain. Plugin
tests and config files are type-checked by the named local and CI gate,
while production builds continue to exclude tests.

## Related Issue
Part of NVIDIA#6692

## Changes
- Added Vitest-agnostic canonical plugin project options consumed
through each package's local `defineProject`, so the root and standalone
entry points share behavior without crossing nominal Vitest type
identities. The existing duplicated configuration could drift;
`test/plugin-vitest-project.test.ts` protects both consumers and the
standalone-only global setup.
- Aligned the plugin Vitest declaration and lockfile with the root
Vitest/Vite installation, including the previously failing standalone
minimal reporter path.
- Added a no-emit plugin test TypeScript project and a named typecheck
command, then wired that command into the normal plugin check, pre-push
hook, and CI typecheck action.
- Corrected the five latent plugin-test diagnostics exposed by the new
gate while leaving production behavior unchanged, and ratcheted the
affected test-file size budget.
- Updated contributor guidance for the plugin production-and-test
typecheck workflow.

## Type of Change

- [ ] Code change (feature, bug fix, or refactor)
- [x] 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: no end-user behavior changed;
the contributor-only command is documented in `AGENTS.md` and
`CONTRIBUTING.md`.
- [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: sensitive-path edits
are test-only type corrections; plugin coverage and the complete
non-live suite pass with no runtime source change.
- [ ] 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] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — `npx vitest run --project integration
test/plugin-vitest-project.test.ts test/pr-workflow-contract.test.ts`
(25/25); root and standalone plugin entry points (23 files, 553/553
each); plugin typecheck, project-membership, static budgets,
production-build exclusion, and plugin coverage gates pass.
- [x] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — `env -u SSH_CONNECTION -u SSH_CLIENT -u
SSH_TTY CI=1 npm test` passed 1,436 files and 16,429 tests (3 files/40
tests skipped).
- [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)

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

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
## Summary

Add per-test ownership for temporary HOME/bin directories, loopback
servers, and child processes so cleanup is awaited even when setup or
assertions fail. Migrate the current high-use CLI helpers and high-risk
Hermes broker and Ollama proxy consumers, including cleanup of each
implicit CLI HOME. This is PR4 in the NVIDIA#6692 stack; PRs NVIDIA#6696 and NVIDIA#6697
are already merged.

## Related Issue

Related to NVIDIA#6692

## Changes

- Add `OwnedTestResources` and focused `test.extend` fixtures for LIFO
cleanup of temporary directories, HOME/bin environments, servers, and
child processes.
- Add a shared child-process owner that waits for `close`, attempts
graceful termination, escalates to `SIGKILL` when required, and confirms
piped stdio is closed. The owned-resource fixture and Ollama proxy
harness share this lifecycle because suite teardown did not consistently
cover setup failures or await process closure.
- Track server lifetime from ownership registration so fixture cleanup
waits for both fixture-initiated shutdown and shutdown already started
by code under test.
- Remove the unowned per-invocation CLI HOME by deleting it when
`runWithEnvInternal` completes, while preserving explicit caller-owned
HOME directories.
- Migrate the current repeated CLI HOME/bin setup helpers and the
high-risk logs, doctor, Hermes broker, and Ollama proxy process/server
consumers.
- Add focused regressions for idempotent cleanup, server shutdown
already in progress, graceful and forced child termination, proxy
readiness failure cleanup, and CLI HOME cleanup after success, failure,
and timeout.

## 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: This changes test-only
resource ownership and cleanup. The required documentation-writer review
confirmed there is no user-facing behavior, test command, lane, or
contributor contract to document.
- [ ] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [ ] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification:
- [ ] 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] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — command/result or justification:
- `npx vitest run --project integration
test/owned-test-resources.test.ts test/cli/helpers.test.ts
test/cli/logs.test.ts test/cli/debug-command.test.ts
test/cli/doctor-gateway-token.test.ts test/cli/sandbox-mutations.test.ts
test/cli/snapshot-shields.test.ts
test/hermes-tool-gateway-broker.test.ts
test/ollama-auth-proxy-handler.test.ts` — 9 files, 71/71 tests passed on
the rebased branch.
- `NEMOCLAW_TEST_TIMEOUT=60000 npx vitest run --project integration
test/cli/helpers.test.ts` — 12/12 tests passed; the synchronous timeout
regression remained fixed at 2 seconds.
- `npx vitest run --project integration test/cli/logs.test.ts
--detectAsyncLeaks` — 10/10 tests passed with no async leaks.
- `npm run typecheck:cli`, Biome on all changed files, `npm run
source-shape:check`, `npm run test-size:check`, `npm run
test:projects:check`, `npm run test:imports:check`, and `npm run
test:titles:check` passed.
- [x] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result: `npm test` passed on the
rebased branch (1,438 files and 16,457 tests passed; 3 files and 40
opt-in platform tests skipped).
- [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)

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


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

* **Tests**
* Improved CLI test hermeticity by standardizing on
`owned-test-resources` with resource-scoped setup/teardown across logs,
doctor, debug, sandbox mutations, snapshot shields, and
sandbox/server-related suites.
* Expanded HOME-related coverage, verifying no implicit HOME is left
behind for successful, failed, and timed-out runs (while honoring
explicit HOME).
* Added dedicated child-process lifecycle ownership utilities and new
verification tests for graceful shutdown, SIGTERM→SIGKILL escalation,
and reliable stream closure/cleanup.
* Strengthened ollama auth proxy startup/cleanup tests, including
readiness timeout failures, listener removal, and retryable cleanup
behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
…A#6707)

## Summary
Vitest project validation now compares every filesystem test candidate
with Vitest's complete eight-project roster, rejecting omissions,
overlaps, wrong routing, unexpected files, and unexpected project names.
The shared credential-free E2E workflow now applies Vitest's native
e2e/credential-free tag filter in addition to the existing safe matrix
scanner. The dashboard-port regression fixture also uses a coherent fake
OpenShell 0.0.72 component set and an OS-assigned gateway port so the
repo-wide gate stays hermetic.

This is the final entry in the ordered NVIDIA#6692 stack after NVIDIA#6693, NVIDIA#6696,
NVIDIA#6697, NVIDIA#6699, NVIDIA#6700, NVIDIA#6701, NVIDIA#6702, and NVIDIA#6705 landed.

## Related Issue
Closes NVIDIA#6692

## Changes
- Discover broad test/spec JavaScript and TypeScript candidates under
src, test, and nemoclaw/src, including nested dist, coverage, and .venv
paths that Vitest would see.
- Compare candidate routing with Vitest file listings and the complete
roster from list-tags JSON, including empty and opt-in projects.
- Produce sorted diagnostics for zero membership, overlap, wrong
project, unsupported candidates, unexpected listed files, and missing or
extra projects.
- Invoke Vitest portably through process.execPath and
node_modules/vitest/vitest.mjs.
- Require the exact native credential-free tag filter in the shared E2E
workflow contract while retaining the TypeScript scanner's path,
project, ID, and declaration checks.
- Keep the dashboard-port exhaustion regression independent of port
8080, developer OpenShell overrides, channel selection, and network
installation.

## 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: these are
contributor/test-harness safeguards; AGENTS.md now states the exhaustive
project-membership contract, the E2E README already documents the native
module tag, and the required documentation-writer review found no
user-facing 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: independent review
covered the shared credential-free workflow and onboarding regression
fixture; it confirmed the filter preserves the existing scanner and the
fixture's child-only environment cannot reach a real OpenShell install.
- [ ] 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] Normal pre-commit, commit-msg, and pre-push hooks passed, or npm
run check:diff passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — 46 integration tests passed across the
boundary and dashboard-port files; 4 E2E-support workflow tests passed;
project membership is exact for 1,537 candidates across 8 projects; CLI
type-check, title style, Biome, and diff checks passed. The fixture also
passed with hostile inherited OpenShell paths and dev-channel selection.
- [x] Applicable broad gate passed — npm test passed 1,456 files /
16,515 tests before the final focused hardening; npm run check passed
the repo-wide structural, CLI coverage, and plugin coverage gates,
followed by focused reruns and normal hooks after the final
child-environment pin.
- [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 (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

- **Tests**
- Credential-free end-to-end test runs now execute only tests matching
the credential-free tag.
- Vitest project validation now checks for missing, overlapping,
unsupported, wrong, zero-membership, and unexpected test-to-project
assignments, plus roster mismatches.
- Expanded boundary tests cover test candidate discovery, expected
project mapping, Vitest invocation resolution, and listing/roster
parsing.
- Improved onboarding “dashboard port exhaustion” assertions for more
hermetic, reliable verification.
- **Documentation**
- Updated testing guidance to require Vitest project globs be disjoint
and exhaustive, enforced by the projects check.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@wscurran wscurran added the area: ci CI workflows, checks, release automation, or GitHub Actions label Jul 30, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants