test: skip POSIX mode-bit assertions on a Windows host#9571

merged1
windows-tests/git-fixtures
windows-tests/mode-bits
openedSep 4, 2026byJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 4d ago

Several tests force a failure with chmod (0o555 directory, 0o000 file) or assert exact 0o600/0o755 mode bits. NTFS has no POSIX modes: chmod on a directory is a no-op, a file cannot be made unreadable, and stat reports 0o666. The write these tests expect to fail succeeds, so the assertion inverts. Skip them where the host is Windows; the win32 code paths under test already bypass the mode check.

Also skip the RotatingFileSink over-long-name test there, where the OS reports ENOENT rather than ENAMETOOLONG and the sink's missing-file handling is what runs.

Part of the Windows test-suite stack rooted at #9564; the manual Windows lane comes from #9538.

Model: Claude Fable 5 in Claude Code.

πŸ€– Generated with Claude Code


Note

Low Risk Test-only changes with no runtime behavior; reduces false failures on Windows CI without altering application logic.

Overview Makes the test suite reliable on Windows by gating or skipping cases that depend on POSIX chmod semantics and mode bits, which NTFS does not honor the same way.

t3-sqlite-state: The backup file 0o600 mode check runs only when HostProcessPlatform is not win32.

Theme CLI, keybindings, relay client: Tests that simulate write/read failures via chmod on directories or settings files are wrapped in it.effect.skipIf(windowsHost) (or equivalent), with comments explaining that Windows ignores directory chmod and cannot make files unreadable. The symlink rollback test also skips on Windows when chmod is involved.

RotatingFileSink: The over-long path test expecting ENAMETOOLONG is skipped on Windows, where the OS reports ENOENT and the sink treats the path as a missing file.

Relay client: Linux-path tests that set 0o755 and assert POSIX exec resolution are skipped on a win32 host, while checksum rejection and other non-mode tests remain.

No production code changesβ€”only test harness adjustments using HostProcessPlatform.defaultValue() or Effect’s HostProcessPlatform service.

Reviewed by Cursor Bugbot for commit af43ec9288c60f8309c7a38bd31d57117ac3a95d. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Skip POSIX mode-bit assertions on Windows host in t3-sqlite-state test

Guards the backup-file POSIX mode assertion so it runs only when the host platform is not win32. NTFS does not report POSIX mode bits, which caused the test to fail on Windows. The test still asserts mode 0o600 on non-win32 hosts.

Macroscope summarized af43ec9.

Synced from GitHub

Thread transfer impact

βœ… Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wireβ€”13.8 KiBβ€”15.1 KiBβœ…
CodexThread snapshot wireβ€”7.0 KiBβ€”7.3 KiBβœ…
CodexLive turn WebSocket wireβ€”6.7 KiBβ€”7.8 KiBβœ…
CodexLive turn WebSocket decodedβ€”58.5 KiBβ€”66.4 KiBβœ…
CodexLive turn messagesβ€”10β€”21βœ…
ClaudeTotal thread wireβ€”13.8 KiBβ€”15.1 KiBβœ…
ClaudeThread snapshot wireβ€”7.0 KiBβ€”7.3 KiBβœ…
ClaudeLive turn WebSocket wireβ€”6.7 KiBβ€”7.8 KiBβœ…
ClaudeLive turn WebSocket decodedβ€”59.3 KiBβ€”66.4 KiBβœ…
ClaudeLive turn messagesβ€”10β€”21βœ…

Baseline: unavailable Β· PR result: af43ec9 Β· Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 113.8 KiB
  • Claude decoded thread snapshot: 114.5 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Synced from GitHub

Approvability

Verdict: Approved at 6b58b7b

Macroscope's review found this PR approvable β€” This is a narrowly scoped test portability update that skips POSIX-only filesystem assertions on Windows without modifying production code, product defaults, or runtime request paths. The remaining behavior and platform-independent tests are unchanged.

Notes:

  • No code objects were reviewed. Approvability was decided on eligibility alone.

No code changes detected at af43ec9. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

Added 1 commit

  • test: skip POSIX mode-bit assertions on a Windows hostaf43ec9