Repository navigation
fix: eliminate flaky tests from port TOCTOU race and CI timing - #2341
Merged
Merged
Conversation
- Replace file-based port allocator with OS-assigned ephemeral ports (port 0) to eliminate cross-process port collision. Return held TcpListener alongside port so callers can minimize the TOCTOU window between release and daemon bind. - Update start_daemon() to accept and drop the held listener immediately before spawning the daemon thread, reducing the race window to near zero. - Widen execute_sparse_with_large_file timeout from 10s to 30s to accommodate slow macOS CI runners (observed 13.8s on macOS beta). - Add nextest CI retry policy (retries = 2) for daemon tests and sparse tests as belt-and-suspenders against residual timing sensitivity.
oferchen
added a commit
that referenced
this pull request
May 1, 2026
fix: eliminate flaky tests from port TOCTOU race and CI timing
oferchen
added a commit
that referenced
this pull request
May 5, 2026
fix: eliminate flaky tests from port TOCTOU race and CI timing
5 tasks done
oferchen
added a commit
that referenced
this pull request
May 18, 2026
… (STN-7 #2341) Wire the SpillCompression knob on SpillPolicy through the SpillableReorderBuffer write/read path. The on-disk record format gains a single leading tag byte per record (0x00 raw, 0x01 zstd) so the reader can dispatch unambiguously, and the spill-compression Cargo feature now pulls in zstd 0.13 as an optional dependency. Default builds keep the historical raw-byte payload format and pay no extra dependency cost. The Zstd variant of SpillCompression is still gated by the feature so constructing it in a default build is a compile error - the natural "fail fast at construction" guarantee. A reader that encounters the zstd tag without the feature surfaces the new typed SpillError::UnsupportedCompression(0x01) instead of feeding garbage to the item codec.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
… (STN-7 #2341) Wire the SpillCompression knob on SpillPolicy through the SpillableReorderBuffer write/read path. The on-disk record format gains a single leading tag byte per record (0x00 raw, 0x01 zstd) so the reader can dispatch unambiguously, and the spill-compression Cargo feature now pulls in zstd 0.13 as an optional dependency. Default builds keep the historical raw-byte payload format and pay no extra dependency cost. The Zstd variant of SpillCompression is still gated by the feature so constructing it in a default build is a compile error - the natural "fail fast at construction" guarantee. A reader that encounters the zstd tag without the feature surfaces the new typed SpillError::UnsupportedCompression(0x01) instead of feeding garbage to the item codec.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
oferchen
added a commit
that referenced
this pull request
May 18, 2026
oferchen
added a commit
that referenced
this pull request
May 18, 2026
oferchen
added a commit
that referenced
this pull request
May 18, 2026
oferchen
added a commit
that referenced
this pull request
May 18, 2026
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TcpListeneruntil right before daemon spawn to minimize TOCTOU between port release and daemon bindexecute_sparse_with_large_filetimeout from 10s to 30s for slow CI runners (macOS beta observed 13.8s)Test plan
execute_sparse_with_large_filepasses locallycargo clippy --workspace --all-targets --all-features --no-deps -D warningscleancargo fmt --all -- --checkclean