Skip to content

test(compression): make worker-specifier and RTK TOML assertions cross-platform - #15572

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.52from
Junior-HJ:fix/windows-compression-tests
Oct 6, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.52from
Junior-HJ:fix/windows-compression-tests

Conversation

@Junior-HJ

Copy link
Copy Markdown
Contributor

Summary

  • Two compression test files fail on Windows due to POSIX-only assertions. No production code changed — test-only portability fix.
  • compression-worker-pool-jam.test.ts: compared URL.pathname to a POSIX literal (/app/onnxWorker.js). On Windows pathToFileURL resolves to /D:/app/onnxWorker.js → always failed. Now compares via pathToFileURL(path.resolve(...)).pathname.
  • rtk-toml-compatibility.test.ts: asserted mode & 0o777 === 0o600 — Windows has no POSIX mode bits. Gated on process.platform !== "win32", same pattern as tests/unit/data-dir-private-perms.test.ts. Atomic install + overwrite refusal still runs everywhere.

⚠️ base-red inherited: #15306

Related Issues

Validation

  • Change type: other (test-only)
  • Focused tests: 34/34 pass on Windows
  • npm run lint (exit 0)
  • Reconciled with release/v3.8.52
  • No production code changed

Tests Added Or Updated

  • tests/unit/compression/compression-worker-pool-jam.test.ts
  • tests/unit/compression/rtk-toml-compatibility.test.ts

Coverage Notes

  • No production code changed. Coverage unaffected.

Reviewer Notes

  • Universal: pathname assertion is platform-agnostic; mode check skipped where mode bits don't exist. Precedent: tests/unit/data-dir-private-perms.test.ts uses { skip: !posix }.

…s-platform

The llmlingua worker-specifier test compared URL.pathname to a POSIX literal, which fails on Windows where pathToFileURL resolves to /D:/app/... . The RTK TOML install test asserted 0600 mode bits, which Windows does not implement. Both were test-only bugs; no production code changed. Compare the pathname through pathToFileURL(path.resolve(...)) and gate the mode check on POSIX like tests/unit/data-dir-private-perms.test.ts already does.
@diegosouzapw
diegosouzapw merged commit 803ab45 into diegosouzapw:release/v3.8.52 Oct 6, 2026
3 checks passed
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.

2 participants