[PR #2113] [CLOSED] test(ci): resolve helper script paths with fileURLToPath on Windows #5037

Closed
opened 2026-10-31 00:59:47 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2113
Author: @GamerDubz
Created: 10/12/2026
Status: ❌ Closed

Base: main ← Head: fix/windows-test-script-paths


📝 Commits (5)

  • 11684c6 test(ci): resolve helper script paths with fileURLToPath on Windows
  • 5d47760 test(mcp): let prompt completion fixtures run ready lookups
  • d1603be test(mcp): prime providers before prompt completion
  • ea53e48 test(mcp): match prompt completion to ready provider lifecycle
  • 416da5e Merge remote-tracking branch 'origin/main' into fix/windows-test-script-paths

📊 Changes

2 files changed (+7 additions, -4 deletions)

View changed files

📝 tests/boundary/filesystem/ciChangeScope.test.ts (+5 -3)
📝 tests/boundary/filesystem/releaseWorkflow.test.ts (+2 -1)

📄 Description

Summary

Three boundary tests fail on a Windows host before reaching their assertions, because they pass a file URL's .pathname to node as a script path. No issue is linked: found while running the release tests locally for #1977.

Problem and expected behavior

Smallest trigger, on Windows: npx vitest run tests/boundary/filesystem/releaseWorkflow.test.ts tests/boundary/filesystem/ciChangeScope.test.ts.

new URL("../../../scripts/x.mjs", import.meta.url).pathname is /C:/…/scripts/x.mjs on Windows. node resolves that to C:\C:\… and exits with MODULE_NOT_FOUND. Expected: the helper script runs and the test reaches its assertions on every platform.

Change and scope

Replace .pathname with fileURLToPath(...) at the three call sites:

  • releaseWorkflow.test.ts — scripts/release-npm-tag.mjs
  • ciChangeScope.test.ts — scripts/ci/plan.mjs and scripts/ci/required.mjs

Not included: the same pattern in tests/boundary/providers/hopper/hopperBridgeFacade.test.ts and scripts/lib/real-hopper-boundaries.mjs, which only run on Hopper hosts. Tests already marked skipIf(process.platform === "win32") are untouched.

Contract and boundary impact

  • Semantic owner and earliest changed stage: not applicable (test-only).
  • CLI and MCP/tool-catalog contract: none.
  • Provider, bridge, target-format, or platform compatibility: none in product code; two test files now run on Windows.
  • Evidence, artifact, provenance, or reconstruction contract: none.
  • Process execution, authorization, cleanup, or containment impact: none.
  • Generated metadata, package, or installation impact: none.

Evidence and regression coverage

  • Tests added or updated: the two files above; no new tests.
  • Base reproduction or other evidence: executed on Windows 11, Node 24.21.0. Before, on main: releaseWorkflow.test.ts 1 failed ("binds npm and MCP publication to the same immutable release SHA") and ciChangeScope.test.ts failed in its plan.mjs and required.mjs tests, all with Cannot find module 'C:\C:\…'. After: both files pass, 67 passed and 23 skipped.
  • User-visible CLI/MCP output: not applicable.
  • Remaining proof gaps: not run on Linux or macOS locally. fileURLToPath returns the same string as .pathname for these POSIX paths, but that is reasoning, not an executed check; CI covers it.

Validation performed

  • npx vitest run tests/boundary/filesystem/releaseWorkflow.test.ts tests/boundary/filesystem/ciChangeScope.test.ts — 67 passed, 23 skipped (Windows).
  • npm run check:fast — passed.
  • oxfmt --check tests/boundary/filesystem — passed.

Not run: npm run check, the full suite, any Linux run.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: Windows only, as above.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: none needed; test-only.

Review checklist

  • This PR addresses a concrete problem or an agreed enhancement.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed. (None needed.)
  • User-visible CLI/MCP changes include representative output. (Not applicable.)
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/2113 **Author:** [@GamerDubz](https://github.com/GamerDubz) **Created:** 10/12/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/windows-test-script-paths` --- ### 📝 Commits (5) - [`11684c6`](https://github.com/morluto/rea/commit/11684c6fc27464e4efc518455044a39f814fb175) test(ci): resolve helper script paths with fileURLToPath on Windows - [`5d47760`](https://github.com/morluto/rea/commit/5d47760448fbb6d7d5235851d2bb368bef257e49) test(mcp): let prompt completion fixtures run ready lookups - [`d1603be`](https://github.com/morluto/rea/commit/d1603be81c8fcb9229b114a2ffdf2153523c8664) test(mcp): prime providers before prompt completion - [`ea53e48`](https://github.com/morluto/rea/commit/ea53e483989b6b2ce97e20e8feba681af738a9d2) test(mcp): match prompt completion to ready provider lifecycle - [`416da5e`](https://github.com/morluto/rea/commit/416da5e849bc453a5dfbe9d85a901fb3b846a06e) Merge remote-tracking branch 'origin/main' into fix/windows-test-script-paths ### 📊 Changes **2 files changed** (+7 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `tests/boundary/filesystem/ciChangeScope.test.ts` (+5 -3) 📝 `tests/boundary/filesystem/releaseWorkflow.test.ts` (+2 -1) </details> ### 📄 Description ## Summary Three boundary tests fail on a Windows host before reaching their assertions, because they pass a file URL's `.pathname` to `node` as a script path. No issue is linked: found while running the release tests locally for #1977. ## Problem and expected behavior Smallest trigger, on Windows: `npx vitest run tests/boundary/filesystem/releaseWorkflow.test.ts tests/boundary/filesystem/ciChangeScope.test.ts`. `new URL("../../../scripts/x.mjs", import.meta.url).pathname` is `/C:/…/scripts/x.mjs` on Windows. `node` resolves that to `C:\C:\…` and exits with `MODULE_NOT_FOUND`. Expected: the helper script runs and the test reaches its assertions on every platform. ## Change and scope Replace `.pathname` with `fileURLToPath(...)` at the three call sites: - `releaseWorkflow.test.ts` — `scripts/release-npm-tag.mjs` - `ciChangeScope.test.ts` — `scripts/ci/plan.mjs` and `scripts/ci/required.mjs` Not included: the same pattern in `tests/boundary/providers/hopper/hopperBridgeFacade.test.ts` and `scripts/lib/real-hopper-boundaries.mjs`, which only run on Hopper hosts. Tests already marked `skipIf(process.platform === "win32")` are untouched. ## Contract and boundary impact - Semantic owner and earliest changed stage: not applicable (test-only). - CLI and MCP/tool-catalog contract: none. - Provider, bridge, target-format, or platform compatibility: none in product code; two test files now run on Windows. - Evidence, artifact, provenance, or reconstruction contract: none. - Process execution, authorization, cleanup, or containment impact: none. - Generated metadata, package, or installation impact: none. ## Evidence and regression coverage - Tests added or updated: the two files above; no new tests. - Base reproduction or other evidence: executed on Windows 11, Node 24.21.0. Before, on `main`: `releaseWorkflow.test.ts` 1 failed ("binds npm and MCP publication to the same immutable release SHA") and `ciChangeScope.test.ts` failed in its `plan.mjs` and `required.mjs` tests, all with `Cannot find module 'C:\C:\…'`. After: both files pass, 67 passed and 23 skipped. - User-visible CLI/MCP output: not applicable. - Remaining proof gaps: not run on Linux or macOS locally. `fileURLToPath` returns the same string as `.pathname` for these POSIX paths, but that is reasoning, not an executed check; CI covers it. ## Validation performed - `npx vitest run tests/boundary/filesystem/releaseWorkflow.test.ts tests/boundary/filesystem/ciChangeScope.test.ts` — 67 passed, 23 skipped (Windows). - `npm run check:fast` — passed. - `oxfmt --check tests/boundary/filesystem` — passed. Not run: `npm run check`, the full suite, any Linux run. ## Compatibility, safety, and release - Breaking changes or migration steps: none. - Real Hopper/Ghidra, browser, or OS coverage: Windows only, as above. - Package or release metadata impact: none. - Security, privacy, process, or containment review: none needed; test-only. ## Review checklist - [x] This PR addresses a concrete problem or an agreed enhancement. - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. (None needed.) - [x] User-visible CLI/MCP changes include representative output. (Not applicable.) - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 00:59:47 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5037
No description provided.