Skip to content

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

Merged
juliusmarminge merged 1 commit into
windows-tests/git-fixturesfrom
windows-tests/mode-bits
Sep 4, 2026
Merged

test: skip POSIX mode-bit assertions on a Windows host#9571
juliusmarminge merged 1 commit into
windows-tests/git-fixturesfrom
windows-tests/mode-bits

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 4, 2026

Copy link
Copy Markdown
Member

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 af43ec9. 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.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

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

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.8 KiB 15.1 KiB
Codex Thread snapshot wire 7.0 KiB 7.3 KiB
Codex Live turn WebSocket wire 6.7 KiB 7.8 KiB
Codex Live turn WebSocket decoded 58.5 KiB 66.4 KiB
Codex Live turn messages 10 21
Claude Total thread wire 13.8 KiB 15.1 KiB
Claude Thread snapshot wire 7.0 KiB 7.3 KiB
Claude Live turn WebSocket wire 6.7 KiB 7.8 KiB
Claude Live turn WebSocket decoded 59.3 KiB 66.4 KiB
Claude Live 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.

@juliusmarminge
juliusmarminge force-pushed the windows-tests/mode-bits branch from 31595d0 to 86ff069 Compare September 4, 2026 03:20
@juliusmarminge
juliusmarminge force-pushed the windows-tests/mode-bits branch from 86ff069 to 19a463e Compare September 4, 2026 03:22
@juliusmarminge
juliusmarminge force-pushed the windows-tests/mode-bits branch from 19a463e to 27c08a6 Compare September 4, 2026 04:23
@juliusmarminge
juliusmarminge force-pushed the windows-tests/mode-bits branch 2 times, most recently from 2b380a2 to 9a746b8 Compare September 4, 2026 07:20
@juliusmarminge
juliusmarminge force-pushed the windows-tests/mode-bits branch from 9a746b8 to 6b58b7b Compare September 4, 2026 07:20
@juliusmarminge
juliusmarminge marked this pull request as ready for review September 4, 2026 07:35
@macroscopeapp

macroscopeapp Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

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.

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.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@juliusmarminge
juliusmarminge force-pushed the windows-tests/mode-bits branch from 529f1c4 to af43ec9 Compare September 4, 2026 20:26
@juliusmarminge
juliusmarminge merged commit 1108be0 into main Sep 4, 2026
35 of 45 checks passed
@juliusmarminge
juliusmarminge deleted the windows-tests/mode-bits branch September 4, 2026 20:33
sandscooling pushed a commit to sandscooling/t3code that referenced this pull request Sep 5, 2026
Upstream base b3e1d88 to 940e823, 96 commits. Merged rather than
replayed: ninety six authored commits is far more surface than the
seventy one hunks this cost, and neither carried pull request has landed.

Most of it was upstream doing this fork's Windows work for it. Twenty
three of the thirty seven conflicted files were tests where upstream had
independently answered the same question, usually better: pingdotgg#9571 replaced
inline win32 guards with it.effect.skipIf, a shared testUtils/fakeCli
replaced writeFakeExecutable, path.join assertions replaced string
matching on separators, and a stream subscription replaced a real-clock
poll in the provider status cache. Those all went to upstream.

Three conflicts were additive and would each have dropped a feature if
read as a tie-break. ProviderRuntimeIngestion kept both its new
nested-workspace test and the fork's title-generation test. ClaudeProvider
took upstream's usage probe whole and put outputStyles back on top of it.
ChatView's interruption notice now feeds upstream's incremental timeline
projection instead of deriving a timeline beside it.

Upstream also rewrote the user and internals docs into a terser voice, so
four fork sections were rewritten into the new shape rather than pasted
back: the group and orchestrator glossary rows, agent MCP tools, output
styles, and spawned sessions.

No migration moved. Upstream's highest is still 047, so the fork's 048
and 049 stay put and the installed database needs no surgery.

Model: Claude Opus 5 (1M context), harness: Claude Code in T3 Code.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant