Semantic Diff

#9034 Fix Windows rewatch CI flakes from files opened without delete sharing

4 commits

d48d577bf67854c0023aa07a2a5a219d015d1f9f..pr-9034

314e53fbf · cknitt + Claude · Oct 25, 2026, 05:42 UTC

Open files with delete sharing on Windows

Unix.openfile opens files on Windows without FILE_SHARE_DELETE unless asked, so while the watcher read lib/watch.lock (every 100 ms) or hashed a source, other processes could not delete or rename it. Removing the lock then failed with "Device or resource busy" and the watcher kept running; Rust's File::open shares delete by default.

a1da0c0f2 · cknitt + Claude · Oct 25, 2026, 05:43 UTC

Retry removing watch.lock and stop a watcher that ignores it

A single failed rm left the watcher running into later tests, where the runner later killed it as an orphan. Retry for five seconds, and kill the watcher when it still does not exit so the failure stays in its test.

94ef5ea44 · cknitt + Claude · Oct 25, 2026, 05:43 UTC

Diagnose Windows rewatch CI failures that leave no evidence

The retained-parse test now prints watch.log and calls.log when the edit of B does not re-parse A. A watchdog in the parity step reports and stops runaway rescript/bsc processes: four Windows runners lost contact with GitHub during that step, past its timeout, without any log.

c5694c7e4 · cknitt + Claude · Oct 25, 2026, 06:18 UTC

Serialize writes to the compiler call log

Parallel domains appended to REWATCH_COMPILER_CALL_LOG through separate handles, and Windows emulates append as seek-then-write, so one domain's line could overwrite another's. The retained-parse test then missed A's parse line (and the initial build's implementation line for A) although A was parsed: the Windows "flake" in that test was a lost log line.