#1642·OpenMAIC

[Bug]: Unit test suite is unreliable on Windows and on newer Node runtimes

Author: BeAIcoderCreated Sep 22, 2026Updated Sep 29, 2026

Bug Description

The unit test suite is not reliable on Windows, and parts of it are tied to the CI's Node version. CI runs ubuntu-latest with Node 22 only, so none of this is visible upstream. Observed on Windows with Node 24:

  1. tests/ci/publish-openmaic-skill.test.ts — 16/16 cases fail. The test spawns /bin/bash, which does not exist on Windows, and prepends to PATH with a hard-coded : separator.
  2. tests/media/server-backed-media-orchestrator.test.ts — 2 deterministic failures. The tests wait a fixed number of microtask hops (50, and 2 in the abort case) before asserting. That depth is a property of the runtime's async primitives rather than of this code: on Node 24 the provider path runs deeper than on Node 22, so the waits expire before the first pass reaches its commit, and the pass overlap the tests manufacture never happens.
  3. A rotating set of 5s-timeout failures under parallel load. With 16 vitest workers, the I/O-heavy cases (loopback HTTP servers, SSRF/DNS guards, cold dynamic imports, repo-wide eslint scans) exceed the 5s default testTimeout or hit loopback connection churn. Run sequentially (vitest run --no-file-parallelism), the same tree is green.

Steps to Reproduce

  1. On Windows, clone the repo at main, pnpm install.
  2. pnpm test.
  3. Observe the failures above.

Expected Behavior

pnpm test is green on Windows and on newer Node runtimes.

Actual Behavior

The failures above — a mix of a hard portability bug, runtime-dependent hop counting, and load-sensitive timeouts.

Environment

  • OS: Windows
  • Node: 24.x (CI uses 22.x)
  • Component: test suite (tests/, vitest.config.ts)

Additional Context

A related Windows-only product bug in skill export (path.relative separators leaking into zip entry names) is tracked separately in #1640.