Repository navigation
test(link): run the activity-holds directory-sync seam on Windows too - #8628
Conversation
The clear (D8) case "a clear whose directory sync fails after the rename keeps the link held across a restart" failed on the 14-shard Windows batch: durableWrite called the syncDir test hook only inside the POSIX branch, so on Windows the injected failure never fired and the clear reported success. The hook now marks the post-rename durability point on every platform; the real chmod and directory fsync stay POSIX-only, so production behavior is unchanged. Reproduced on Linux by reporting process.platform as win32 (11 pass, 1 fail before; 12 pass after).
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
✅ READY
Hygiene✅ Deterministic PR hygiene checks passed. |
Runs the T5d3a-R1-01 clear with process.platform reported as win32. It fails against the POSIX-only hook (12 pass, 1 fail) and passes with it (13 pass).
|
Maintainer judgment (dev integration, MAINTAINERS.md maintainer-integration exception): merging without a second maintainer approval, as part of the DEV-RED repair for dev batch run 43343080374 (windows 11/14).
|
Summary
The 14-shard Windows dev batch (run 43343080374, windows 11/14) failed
tests/clients/link-ws-activity-holds-operator.test.ts:108,clear (D8) > a clear whose directory sync fails after the rename keeps the link held across a restart (T5d3a-R1-01). The case was added with the store in #8593. The test injects a failure through thesyncDirwrite hook, butdurableWriteinsrc/link/ws-activity-holds.tscalled that hook only inside its POSIX branch. On Windows the injected failure never fired, soclearreturned{ ok: true, cleared: ... }instead of{ ok: false, reason: "write-failed" }.The hook now marks the post-rename durability point on every platform, so the callers' handling of "the rename landed but is reported as not durable" runs under test on Windows too. The real
chmodand directoryfsyncstay POSIX-only (NTFS journals the rename), and the hook is undefined outside tests, so production behavior is unchanged. A new case runs the same D8 scenario withprocess.platformreported aswin32, so the Windows path is pinned on every runner.Verification
process.platformaswin32:bun test --preload <win32> tests/clients/link-ws-activity-holds-operator.test.tsgave 11 pass, 1 fail (the CI case) before, 12 pass, 0 fail after.src/link/ws-activity-holds.tsthe file gives 12 pass, 1 fail (the new win32 case); with this PR, 13 pass, 0 fail.bun run typecheck: exit 0.bun run structure:check: passed.Checklist
Summary by CodeRabbit