Skip to content

fix(test): mount a real temp dir in the JS runtime-compat suite - #2346

Merged
chaliy merged 1 commit into
mainfrom
claude/release-new-version-73o48m
Aug 22, 2026
Merged

fix(test): mount a real temp dir in the JS runtime-compat suite#2346
chaliy merged 1 commit into
mainfrom
claude/release-new-version-73o48m

Conversation

@chaliy

@chaliychaliy commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

What changed

The runtime-compat mount and unmount test mounts a mkdtemp directory (and removes it afterwards) instead of a hardcoded host /tmp, the way the ava vfs.spec.ts suite already does.

Why

With the glob fixed (#2345), the Windows Node 20 leg of Publish JS ran the suite for the first time and 162 of 163 tests passed. The one failure is a real portability bug in the test:

not ok 15 - mount and unmount
error: "Invalid host_path '/tmp': The system cannot find the file specified. (os error 2)"
location: '...\__test__\runtime-compat\vfs.test.mjs:125:3'

/tmp is a host path here, not a VFS path — every other /tmp in this suite is inside the VFS and is fine anywhere. CI runs runtime-compat only on ubuntu-latest, so nothing had ever mounted it from Windows. Release to NPM needs every test job, so this single red job is what still holds @everruns/bashkit at 0.16.0.

Also documents, in scripts/check_workflow_parity.py and knowledge/operations/release-process.md, that platforms are deliberately outside the parity check added in #2344: release workflows testing macOS and Windows where CI does not is extra coverage worth keeping, and it is exactly what surfaced this.

Before / After

Before, on Windows Node 20:

# tests 163
# pass 162
# fail 1

After, locally on the same suite:

$ node --test __test__/runtime-compat/*.test.mjs
# pass 163
# fail 0

Risk

  • Low
  • Test-only change; the assertions are unchanged, only the host directory being mounted.

Checklist

  • Tests added or updated
  • Backward compatibility considered

The `mount and unmount` test mounted a hardcoded host `/tmp`, which does
not exist on a Windows runner: `Invalid host_path '/tmp': The system
cannot find the file specified`. The suite had only ever run on Linux, so
publish-js running it on Windows Node 20 is what surfaced it, and the one
red job kept the npm publish skipped.
Mount a `mkdtemp` directory and clean it up, the way the ava vfs suite
already does. Also records in the parity checker and the release-process
knowledge that platform breadth is deliberately outside that check: the
release workflows testing macOS and Windows is what caught this.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with Cloudflare Workers Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

StatusNameLatest CommitPreview URLUpdated (UTC)
✅ Deployment successful!
View logs
bashkit483b190Commit Preview URL

Branch Preview URL
Aug 22 2026, 06:42 PM

@chaliy
chaliy merged commit a14d059 into mainAug 22, 2026
32 checks passed
@chaliy
chaliy deleted the claude/release-new-version-73o48m branch August 22, 2026 18:56
@chaliychaliy mentioned this pull request Aug 22, 2026
2 tasks
Sign up for freeto 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

@chaliy