Skip to content

test(persistence): cfg(unix)-gate the dir-lost latch unit test — Windows Check red on main#370

Merged
pilotspacex-byte merged 1 commit into
mainfrom
fix/windows-dir-lost-test-cfg
Jul 17, 2026
Merged

test(persistence): cfg(unix)-gate the dir-lost latch unit test — Windows Check red on main#370
pilotspacex-byte merged 1 commit into
mainfrom
fix/windows-dir-lost-test-cfg

Conversation

@pilotspacex-byte

@pilotspacex-byte pilotspacex-byte commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Windows Check (main-push-only, so invisible on PR #369) failed deterministically (3/3 tries) on test_dir_lost_latches_pauses_and_self_heals: the non-unix query_free_bytes stub always returns Ok, so the dir-lost latch never engages on Windows by design — the test's dir_lost() assertion cannot hold there. This gates the latch-behavior unit test with cfg(unix), matching the integration suite's existing #![cfg(unix)]. The disarmed-guard sibling test stays cross-platform (its expectations hold under the stub). Run: https://github.com/pilotspace/moon/actions/runs/29560815512

Summary by CodeRabbit

  • Bug Fixes

    • Improved cross-platform test reliability by limiting directory-loss behavior checks to supported Unix environments.
    • Clarified that no-flush errors cannot repeatedly trigger at 1 ms intervals and that the directory-loss latch is intentionally Unix-only.
  • Documentation

    • Expanded changelog details describing directory-loss latch behavior and platform-specific testing.

…ows Check red on main

Windows Check (main-push-only, PR-invisible) failed 3/3 tries on
test_dir_lost_latches_pauses_and_self_heals after #369 merged: the
non-unix query_free_bytes stub always returns Ok, so the dir-lost
latch never engages on Windows BY DESIGN — the test's dir_lost()
assertion can't hold there. Gate the latch-behavior test with
cfg(unix); the disarmed-guard sibling stays cross-platform (its
expectations hold under the stub). Same Windows-gate treatment the
integration suite already had (#![cfg(unix)]).

author: Tin Dang <tindang.ht97@gmail.com>
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0642e4b5-0917-47a0-b88c-76f27a9d770e

📥 Commits

Reviewing files that changed from the base of the PR and between 1e86f3a and 4cce461.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • src/shard/disk_monitor.rs

📝 Walkthrough

Walkthrough

The directory-lost latch unit test is now gated to Unix platforms, with comments explaining the non-Unix stub behavior. The changelog documents the Unix-only latch behavior and test configuration.

Changes

Directory-lost latch platform gating

Layer / File(s) Summary
Gate directory-lost latch test on Unix
src/shard/disk_monitor.rs, CHANGELOG.md
The directory-lost latch test is restricted to Unix builds, and the changelog describes the non-Unix behavior and cfg(unix) gating.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: tindang97

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the fix, but it omits the required Summary, Checklist, Performance Impact, and Notes sections. Rewrite it using the repo template, including Summary, Checklist items, Performance Impact, and Notes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the Unix-gated dir-lost latch test change, though the Windows note is extra noise.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/windows-dir-lost-test-cfg

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pilotspacex-byte
pilotspacex-byte merged commit 5b801b0 into main Jul 17, 2026
8 checks passed
@TinDang97
TinDang97 deleted the fix/windows-dir-lost-test-cfg branch July 17, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants