Repository navigation
Description
Part of #1693.
Scope
Every push and pull request runs pnpm test:unit on a Windows runner, and the required Quality check fails when it fails. The files that still fail on Windows are left out there through one list that later tasks shrink; the in-memory fake filesystem reads Windows and POSIX paths as one; and text files check out with LF. After this PR, every later PR of #1693's stack is checked on Windows; main gets the job when the stack merges.
If it goes wrong, a contributor sees Quality red on a PR that broke nothing (a flaky or slow Windows file left off the list), or a file that fails on Windows is quietly not run.
Technical spec
Commit 2df19f8.
Rows
- Behaviours: B1, B2, B3
- Interfaces: I1, I2, I3
- Existing code: X1, X2, X3, X4, X5, X6, X7, X13, X14, X16, X17
Facts
| # | Fact | Source |
|---|---|---|
| F1 | The unit job installs with --ignore-scripts and runs pnpm run test:unit; its steps are the ones I2 copies. |
.github/workflows/ci.yml:49-69 |
| F2 | The unit project's excludes are written inline in its block; src/test-lanes.repo.test.ts checks that block's text for *.timing.test.ts. |
vitest.config.ts:23-28, src/test-lanes.repo.test.ts:141-146 |
| F3 | The fake keeps entries in one Map keyed by path text, with / as its root. |
src/ports/filesystem.ts:501, src/ports/filesystem.ts:509 |
| F4 | On Windows 11 at this commit, a Proxy wrapper that read paths per I3 fixed 449 failing tests in src/drivers, src/core, src/daemon, src/ports and src/cli and newly failed 5: four subclasses with private fields and one test that stubs readFile and compares the raw path. Done in the class itself (I3), neither applies. |
pnpm exec vitest run --project unit src/drivers src/core src/daemon src/ports src/cli --reporter=json before and after memfs-normalize.mjs on DesktopWindows, 2026-11-18 |
| F5 | At this commit, 138 of 2,184 files fail on Windows 11 (1,664 of 9,544 tests); the run took 4 min 50 s on 16 cores. | pnpm exec vitest run --project unit --project ui-dom --reporter=json on DesktopWindows, 2026-11-18 |
| F6 | tsconfig.json has rootDir: "src", so the list lives under src/ to be imported by src/test-lanes.repo.test.ts. |
tsconfig.json |
Modules touched
Searches: rg -n "quality|runs-on|test:unit" .github/workflows/ci.yml src/test-lanes.repo.test.ts, rg -n "class MemoryFilesystem|parentPath|joinMemoryPath|realpath|readlink|defineSymlink|replaceSymlink" src/ports/filesystem.ts. #1698 (feature #1691) changes MemoryFilesystem.writeFileAtomic in the same class; whichever merges second resolves the overlap.
.github/workflows/ci.yml,.gitattributes,vitest.config.tssrc/test-support/windows-skipped.ts(new),src/test-support/AGENTS.mdsrc/ports/filesystem.ts,src/ports/filesystem.test.tsor a newsrc/ports/memory-filesystem-paths.test.tssrc/test-lanes.repo.test.tsdocs/internal/agent-rules/testing.md,docs/internal/agent-rules/toolchain.md
Rules in play
- ADR 0087 §1–§4: the job, the fake, POSIX-only skips, the list.
docs/internal/agent-rules/testing.mdrule 5: the two sentences X13 names.docs/internal/agent-rules/toolchain.md: X14's three lines; the tool guard's list is unchanged.- Ports manual: the fake stays in
filesystem.tsbeside its interface and adapter.
Tests
The seams are src/test-lanes.repo.test.ts (B1, B2; model on its quality and console-lane cases) and MemoryFilesystem from src/ports/index.ts (B3; model on src/ports/filesystem.test.ts).
- B1: the
windows-unitjob exists, namedUnit tests (Windows), onwindows-2025,shell: bash,timeout-minutes: 30, runningpnpm run test:unit;qualityneeds it;.gitattributesholds* text=auto eol=lf - B2:
windowsSkipped("win32")is the list,"linux"and"darwin"give[]; every listed path is a tracked test file; sorted, no duplicate;vitest.config.tspasseswindowsSkipped(process.platform)to theunitproject only - B3:
D:\a\b,\a\b,D:/a/band/a/bname one entry forwriteFileAtomic→readFile,mkdirp→lstat,readdir,renameacross styles,rm;C:\aandD:\aone entry;realpath("D:\\a")returns/a; a link toD:\aresolves to/a; a relative path as today; an error names the caller's path or the/form
Done when
pnpm test:changedpasses on the branch.- The list holds every file that failed in any of three runs of the
Unit tests (Windows)job made before the list was filled (the PR lists the three run links); then the job passes on the PR's head, and Quality needs it. toolchain.mdnames the Windows job, the Git Bash and Python 3 requirement, and how to rerun the Windows job on a base commit;testing.mdrule 5 holds X13's two sentences.
Out of scope
- Fixing any listed file (T2–T6).
- The e2e lane on Windows.
Depends on
Written by an agent.
Activity
test: CI runs the unit tests on Windows and Quality needs that job (#…
ci: the unit tests run on Windows and Quality needs that job (#1705)
test: windowsSkipped is the Windows job's list of left-out files (#1705)
feat(test): the unit project leaves out windowsSkipped on a Windows h…
docs: toolchain, testing rule 5 and the test-support manual name the …
fix(ports): the in-memory filesystem reads backslashes only in absolu…
test: the Windows job leaves out the files that failed in three runs (#…
test: the printed-text path check leaves out src/test-support, which …
test: the Windows job also leaves out rig-ports.e2e.test.ts, which fa…
2 remaining items
fix(ports): the real directorySize keeps its path; the fake's injecte…
fix(ports): the relative-path case of the fake fails when a relative …
V3RON commentedon Nov 18, 2026
Handoff
Done: audit (fixed a
memoryPathline that had leaked intoNodeFilesystem.directorySize, added two test cases), review round 1 (R1, R2), one fix run, fix-check. PR #1722 head 7fee05c, still draft. R2 (the#failIfDefineddoc) is fixed and verified.Not done:
gh pr ready, joining the stack as reviewed, tasks #1706–#1710 and #1712 (all wait on #1705). The Windows job on 7fee05c was still queued on GitHub's runners.Findings: R1 is still blocking after the review cap (rule 14).
src/ports/memory-filesystem-paths.test.ts:50: the relative-path case stays green whenmemoryPathturnsrel\fileintorel/file. Fix: assertrel/filestays ENOENT whilerel\filecarries the injected failure.Blocked on: the maintainer. Either allow one more fix run plus a check of that hunk, or fix the assertion yourself. Then re-run
deliver #1693.Written by an agent.
test(ports): a relative `rel/file` is not the injected `rel\\file` (#…
test(agents): the protocol-bump no-wire-shape test waits 90 s for slo…
github-actions commentedon Nov 22, 2026
Claim released: no activity for 3 days. The label is unchanged; the next agent starts from the branch and the last handoff.
ci: the unit tests run on Windows, with a list of files still failing…