Skip to content

fix(wsl): repair platform fixtures and bounded process cleanup - #12573

Merged
ericksoa merged 3 commits into
mainfrom
fix/wsl-platform-failures
Oct 2, 2026
Merged

ericksoa merged 3 commits into
mainfrom
fix/wsl-platform-failures

Conversation

@ericksoa

@ericksoa ericksoa commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Outcome

Repair the platform-sensitive fixtures that blocked WSL validation, and keep TERM-resistant processes inside the bounded Ollama execution proof's cleanup boundary. The direct proof selects the separately installed GNU timeout command on Ubuntu 26.04 and keeps its shell wrapper alive for KILL escalation.

Reason

WSL run 36920397162 reached all four non-live shards after the Docker-isolation repair, then reported 13 failures across seven test files. The next main run reproduced 11 of them. Live onboarding was skipped because the non-live suite failed. PR CI also exposed the same host-isolation problem in an unchanged vLLM provenance fixture: job 110684781397 reached real host-readiness discovery while checking the setup handoff.

The failures came from host Docker and WSL state leaking into fixtures, an incidental access-time comparison, startup deadlines that ignored the configured runner budget, and the direct execution proof's process supervision. Ubuntu 26.04 installs GNU's command as gnutimeout; the unprefixed tool does not provide the required cleanup behavior in the retained run. Separately, the old shell wrapper could exit on TERM before GNU timeout escalated against its surviving children.

Related issues

Refs #12285, #12281, and #12554. Target-device validation for the original onboarding report remains separate.

Changes

  • Give the force-fresh installer fixtures their own Docker-excluded command path and remove that owned path after the suite. The shared default command path stays unchanged, and explicit unavailable-Docker and ownership-rejection cases remain. Supply fixture-owned managed llama.cpp discovery data in the two vLLM provenance tests while preserving their real catalog/setup handoff. Pin the port-allocation test's WSL input and cover the WSL bind separately. Compare file contents and stable identity, ownership, mode, size, modification time, and change time without comparing access time.
  • Apply the existing configured execution/test budgets to PowerShell and nested Vitest startup. For the compiled worker's credential and descendant-cleanup cases, wait for the real fixture to be ready, then trigger its captured deadline callback; the real timeout remains a failsafe and process termination/reaping remains real.
  • Prefer /usr/bin/gnutimeout when installed and retain /usr/bin/timeout on older distributions. Catch TERM in the proof wrapper so its controller can escalate against the entire group. Consolidate overlapping process tests into one wrapped-command regression that rejects an outer harness timeout and verifies descendant termination, including native signal results.

Verification

  • Provider-provenance suite — all seven tests passed. Matching setup-flow test — passed. The existing five-second limits and provenance assertions are unchanged.

  • Focused source, installer, package-contract, and E2E-support suites: 172 passed; eight Windows/Linux-specific cases skipped on macOS. The selected cases ran with the WSL runner's 60-second execution/test budgets. Worker coverage was also checked with default budgets after the final fixture refinement.

  • Shared-path regression: the prior consumer removed a synthetic Docker command from the shared path; the corrected consumer preserved it. All seven focused fault-injection cases and all 34 installer tests passed.

  • Installer reproduction: injecting an unavailable Docker command into the isolated host-tool mirror reproduced all six installer failures on the base; all six passed with the fixture repair.

  • GNU command selection regression: failed on the base when the prefixed GNU command was available, then passed after the change.

  • Real GNU 9.5 process reproduction on macOS: the old wrapper left a TERM-resistant child alive and required the outer guard; the repaired wrapper completed without the outer guard and the child was gone. Linux/WSL execution remains required for the native regression.

  • npm run build:cli — passed.

  • Growth guardrails (all seven), signed-commit hooks, publication validation, and CLI type checking — passed. All three published commits are GitHub Verified; the latest is c5237ab231a9036b06c19374387f79cae11adbad.

  • Diff inspected for secrets, API keys, and credentials; none found.

  • Actual Windows/WSL validation is pending. The existing main-only platform workflow must run all four WSL shards and the live onboarding step before runner success can be claimed.

Review notes

Self-review covers the current eleven-file diff against ccf68daed3aa8dc1c6bf074b9ee3d32cad684295. The runtime change is limited to GNU command selection and the proof wrapper's TERM handling. It preserves the service-user selection, existing deadlines, exit-code remapping, and failure gates. All other changes are test fixtures and coverage. All nine exact-head Advisor reports are clear in run 36964284517. PR CI, portable-profile validation, and Docker/Podman activation passed on c5237ab231a9036b06c19374387f79cae11adbad. CodeRabbit review follows draft promotion.


Signed-off-by: Aaron Erickson aerickson@nvidia.com

Summary by CodeRabbit

  • Bug Fixes
    • Linux service setup now supports systems where the timeout utility is available under either of its common system paths. Bounded process checks also handle termination more reliably, helping prevent processes from lingering after a timeout.
  • Tests
    • Updated automated checks for dashboard network binding, onboarding, and installer behavior. Test deadlines and process cleanup are now handled more consistently across supported environments.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@ericksoa ericksoa self-assigned this Oct 2, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 2, 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 Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (1)
test/README.md — configured

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: NVIDIA/NemoClaw/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 75fa9957-8601-456d-879f-553ce035fc3a

📥 Commits

Reviewing files that changed from the base of the PR and between be730ad and c5237ab.

📒 Files selected for processing (11)
  • src/lib/actions/sandbox/snapshot/forward-port-allocation.test.ts
  • src/lib/inference/ollama/windows.test.ts
  • src/lib/onboard/experimental/hermes-portable-ollama-inference.test.ts
  • src/lib/onboard/machine/handlers/provider-inference-managed-llama-resume.test.ts
  • src/lib/onboard/ollama-systemd/executable-proof.test.ts
  • src/lib/onboard/ollama-systemd/executable-proof.ts
  • src/lib/onboard/setup-nim-flow.test.ts
  • test/e2e/support/e2e-progress-outcome.test.ts
  • test/helpers/installer-sourced-env.ts
  • test/installer-integration/install-force-fresh.test.ts
  • test/package-contract/rebuild-owning-registry-worker.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

The pull request updates systemd executable-proof timeout handling and adjusts tests across onboarding, installer, inference, and package-contract code. It adds configurable command exclusions to the isolated PATH helper and uses shared timeout helpers and controlled worker deadlines in tests.

Changes

Systemd executable proof

Layer / File(s) Summary
Bounded proof execution and cleanup
src/lib/onboard/ollama-systemd/executable-proof.ts, src/lib/onboard/ollama-systemd/executable-proof.test.ts
The direct-proof wrapper traps TERM, and the command selects /usr/bin/gnutimeout when available, otherwise /usr/bin/timeout. Tests cover both timeout paths, bounded proof execution, and descendant cleanup. The cgroup runtime-limit test uses dedicated command matchers.

Installer system PATH isolation

Layer / File(s) Summary
Configurable isolated PATH
test/helpers/installer-sourced-env.ts, test/installer-integration/install-force-fresh.test.ts
buildIsolatedSystemPath accepts additional command exclusions. The force-fresh tests build a PATH that excludes Docker and pass that PATH to the child process.

Test timeout helpers

Layer / File(s) Summary
Derived process and test timeouts
src/lib/inference/ollama/windows.test.ts, test/e2e/support/e2e-progress-outcome.test.ts
The Windows process test and E2E progress tests derive timeout values with execTimeout and testTimeout. The configured durations remain unchanged.

Registry worker deadline tests

Layer / File(s) Summary
Controlled worker expiry and cleanup
test/package-contract/rebuild-owning-registry-worker.test.ts
The credential-forwarding and descendant-cleanup tests use a captured worker deadline. They explicitly expire the worker, assert its rejection, and check descendant termination.

Dashboard bind test

Layer / File(s) Summary
Bind address cases
src/lib/actions/sandbox/snapshot/forward-port-allocation.test.ts
The test covers persisted remote bind and WSL inputs. It expects 127.0.0.1 only when both are false and 0.0.0.0 otherwise.

Portable Ollama file identity test

Layer / File(s) Summary
Structured file identity snapshots
src/lib/onboard/experimental/hermes-portable-ollama-inference.test.ts
The test represents file identity fields as an object, compares snapshots with toEqual, and returns the post-read identity object as metadata.

Managed llama.cpp fixture setup

Layer / File(s) Summary
Empty managed selection fixtures
src/lib/onboard/machine/handlers/provider-inference-managed-llama-resume.test.ts, src/lib/onboard/setup-nim-flow.test.ts
Both vLLM-related fixtures return no managed llama.cpp choices and reject resolution with a fixture-specific reason.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Possibly related PRs

  • NVIDIA/NemoClaw#11607: Updates the platform compatibility workflow; this PR changes test fixtures and executable handling for related WSL, Docker PATH, timeout, and process-cleanup cases.

Suggested reviewers: deepujain, cjagwani

Merge Risk: ⚪ Minimal · up to c5237

This change mainly makes test fixtures more portable and makes cleanup of stuck proof processes more reliable. No concrete defect was found. Windows/WSL runner validation is still pending, as the author notes, so confirm those CI shards pass before relying on them.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 11 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: repairing WSL-related platform fixtures and bounded process cleanup.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

@github-code-quality

github-code-quality Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit c5237ab in the fix/wsl-platform-fai... branch is 97%. The line coverage in commit 63002cd in the main branch is 96%.

Show a line coverage summary of the most impacted files.
File main 63002cd fix/wsl-platform-fai... c5237ab +/-
nemoclaw/src/onboard/config.ts 98% 96% -2%
nemoclaw/src/index.ts 94% 93% -1%
nemoclaw/src/bl...t-management.ts 100% 100% 0%
nemoclaw/src/co.../config-show.ts 100% 100% 0%
nemoclaw/src/commands/slash.ts 100% 100% 0%
nemoclaw/src/on...native-route.ts 0% 100% +100%

TypeScript / code-coverage/cli

The overall line coverage in commit c5237ab in the fix/wsl-platform-fai... branch is 85%. The line coverage in commit 63002cd in the main branch is 84%.

Show a line coverage summary of the most impacted files.
File main 63002cd fix/wsl-platform-fai... c5237ab +/-
src/lib/actions.../status-text.ts 84% 46% -38%
src/lib/onboard...al-inference.ts 84% 90% +6%
src/lib/inferen...file/cleanup.ts 73% 80% +7%
src/lib/state/p...l-retirement.ts 79% 89% +10%
src/lib/onboard.../application.ts 55% 72% +17%
src/lib/onboard...mage/catalog.ts 69% 90% +21%
src/lib/securit...zer-boundary.ts 0% 85% +85%
src/lib/adapter...gnostics-cli.ts 0% 87% +87%
src/lib/onboard...ternal-image.ts 0% 94% +94%
src/lib/securit...ig-structure.ts 0% 94% +94%

Updated October 02, 2026 04:22 UTC

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit c5237ab. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

Request review only when Require no Advisor blockers is green.

All previous runs

@ericksoa
ericksoa marked this pull request as ready for review October 2, 2026 04:38
@ericksoa
ericksoa merged commit 5b3bd58 into main Oct 2, 2026
136 of 137 checks passed
@ericksoa
ericksoa deleted the fix/wsl-platform-failures branch October 2, 2026 05:27
ericksoa added a commit that referenced this pull request Oct 2, 2026
Align the remaining WSL subprocess fixtures with the runtime contracts they simulate. Recognize both supported GNU timeout paths, make the recovery test detect an unmatched command instead of accepting a default no-op, and honor the Podman collector caller's command timeout in the real-child fixture.

No production behavior or validation assertions change. Local targeted suites passed 27 tests, fault-injection reproductions demonstrated both repairs, and all seven growth checks passed. All 57 current checks, all nine Advisor reports, and CodeRabbit review passed on 326fa28.

Refs #12285, #12281, and #12573. Actual WSL validation follows in the main-only platform workflow.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant