Skip to content

The unit tests run on Windows in CI, with a shrinking list of the files still failing there #1705

Done

Description

@V3RON

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.ts
  • src/test-support/windows-skipped.ts (new), src/test-support/AGENTS.md
  • src/ports/filesystem.ts, src/ports/filesystem.test.ts or a new src/ports/memory-filesystem-paths.test.ts
  • src/test-lanes.repo.test.ts
  • docs/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.md rule 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.ts beside 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-unit job exists, named Unit tests (Windows), on windows-2025, shell: bash, timeout-minutes: 30, running pnpm run test:unit; quality needs it; .gitattributes holds * 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.ts passes windowsSkipped(process.platform) to the unit project only
  • B3: D:\a\b, \a\b, D:/a/b and /a/b name one entry for writeFileAtomic→readFile, mkdirp→lstat, readdir, rename across styles, rm; C:\a and D:\a one entry; realpath("D:\\a") returns /a; a link to D:\a resolves to /a; a relative path as today; an error names the caller's path or the / form

Done when

  • pnpm test:changed passes 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.md names the Windows job, the Git Bash and Python 3 requirement, and how to rerun the Windows job on a base commit; testing.md rule 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

  1. added
    task:draft
    os:windows
    on Nov 18, 2026
  2. added
    task:ready
    and removed
    task:draft
    on Nov 18, 2026
  3. self-assigned this
    on Nov 18, 2026
  4. 2 remaining items

  5. V3RON commented on Nov 18, 2026

    @V3RON
    ContributorAuthor

    Handoff

    Done: audit (fixed a memoryPath line that had leaked into NodeFilesystem.directorySize, added two test cases), review round 1 (R1, R2), one fix run, fix-check. PR #1722 head 7fee05c, still draft. R2 (the #failIfDefined doc) 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 when memoryPath turns rel\file into rel/file. Fix: assert rel/file stays ENOENT while rel\file carries 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.

  6. added
    task:blocked
    and removed
    task:ready
    on Nov 18, 2026
  7. removed their assignment
    on Nov 18, 2026
  8. added
    task:ready
    and removed
    task:blocked
    on Nov 18, 2026
  9. self-assigned this
    on Nov 18, 2026
  10. github-actions commented on Nov 22, 2026

    @github-actions
    Contributor

    Claim released: no activity for 3 days. The label is unchanged; the next agent starts from the branch and the last handoff.

  11. added a commit that references this issue on Nov 24, 2026
    3136ffe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    os:windowstask:ready

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions