Repository navigation
fix(storage): avoid Windows asynchronous-handle read crashes - #912
Conversation
Codex Review SummaryThis 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. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. 📝 WalkthroughWalkthroughWindows file opening now sets the nonblocking flag for regular files. Storage tests add coverage for exact-limit reads across reopen cycles and adjust staging fixtures for Windows behavior. ChangesStorage file handling
Priority: ⬆️ High Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The change targets Windows save-read crashes, and the PR reports successful Windows regression runs. No concrete issue remains to block merging. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
VERDICT: APPROVED Findings (no blockers)
Ran
Not run: the Windows runtime. I'm on macOS, so for that I relied on CI and on reading the std source. Bot inline comments: none. CodeRabbit and the Codex connector posted summary comments only. |
Windows save reads crash because Zig 0.16 opens no-follow files with asynchronous NT handles but marks them synchronous. Set the returned file's nonblocking flag so reads use Zig's APC/wait path, preserving no-follow and regular-file checks. This fixes the six save_storage crashes reported in moca-tecnologia/flying-platform-labelle#972.
Add a real-store regression for 128 KiB+17 payloads, three reopen cycles, inclusive limits and TooLarge. Make the existing purge fixtures portable using File.setTimestamps and removing the placeholder left by a failed Windows symlink creation.
Validation on Windows, Zig 0.16.0:
zig build test-storage -j2 --summary all: 17 passed, 2 skipped (Windows symlink privilege/FIFO).Flying Platform still pins engine 3.4.1. Its dependency update must follow a released engine containing this fix; no local path override is committed.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.