vfox icon indicating copy to clipboard operation
vfox copied to clipboard

[BUG]: version-vault CI: Test (windows-latest) fails on main and on every open PR

Open linghengqian opened this issue 2 weeks ago • 3 comments

Version N/A. This concerns the repository version-fox/version-vault, not a vfox release.

OS Windows (the Test (windows-latest) job)

Describe the bug In version-fox/version-vault, the Test (windows-latest) job of the CI workflow (.github/workflows/ci.yml) fails. In the runs checked, the Ubuntu and macOS jobs pass.

  • main: the Windows job failed in each of the four CI runs after the push run for PR 19 (Add cross-platform CI coverage for uv-build parsing). That earlier run, https://github.com/version-fox/version-vault/actions/runs/25216861513, passed on all three operating systems. The first failing run is the push run for PR 20 (Add landing page for vault.vfox.dev root): https://github.com/version-fox/version-vault/actions/runs/25217125959.
  • Open pull requests: the Windows job fails on all seven open PRs: PR 25, PR 44, PR 51, PR 55, PR 56, PR 59 and PR 60. On PRs 44, 51, 56, 59 and 60, Install dependencies succeeds and the failing step is Run tests. For PRs 25 and 55 the step list is empty, so the failing step is unknown.
  • The failure already exists on main before any of these PRs were opened, so the dependency bumps in them are not the cause.
  • The logs of the runs checked for this issue return HTTP 410 (expired), so a fresh Windows run is needed to see the failing test output.

Please fix the Windows failure so that Test (windows-latest) passes on main and on the open pull requests.

linghengqian avatar Nov 15 '26 16:11 linghengqian

CC @bytemain .

linghengqian avatar Nov 16 '26 00:11 linghengqian

I think this comes from the test script that PR 20 changed, which matches the first failing run:

-    "test": "tsx --test tests/uv-build.test.ts",
+    "test": "tsx --test tests/*.test.ts",

On Linux and macOS, pnpm runs the script through sh, which expands tests/*.test.ts to tests/root.test.ts tests/uv-build.test.ts. On Windows it runs through cmd.exe, which does not expand globs, so Node gets the literal string tests/*.test.ts. I checked the difference on Windows: under cmd /c, process.argv shows [ 'tests/*.test.ts' ], and under sh it shows the two files. The test runner only expands glob patterns itself from Node 21, and CI uses Node 20 from .node-version, so on Windows it looks for a file actually named *.test.ts.

Two ways to fix it:

  • List the files: "test": "tsx --test tests/root.test.ts tests/uv-build.test.ts". This works with Node 20 on all three systems, but each new test file has to be added.
  • Move .node-version to 22 (Node 20 reached end of life in April 2026) and quote the glob: "test": "tsx --test \"tests/*.test.ts\"", so Node expands it the same way everywhere.

I couldn't run Node 20 here, so this is from the CI timeline and the behaviour above rather than a fresh Windows log. I can open a PR for whichever option you prefer.

(Prepared with AI assistance.)

miscos330 avatar Nov 23 '26 15:11 miscos330

I think this comes from the test script that PR 20 changed, which matches the first failing run

Well, although I am a maintainer for vfox, I don’t have administrative access to every repository in the organization. For instance, I clearly do not have access to https://github.com/version-fox/version-vault . Therefore, we’ll have to wait for @bytemain to respond to this issue.

See https://github.com/version-fox/version-vault/pull/61 .

linghengqian avatar Nov 24 '26 01:11 linghengqian