Skip to content

fix(test): gate Value import behind cfg(unix) — unbreaks the nightly Windows job - #697

Merged
logbie merged 3 commits into
mainfrom
fix/windows-clippy-unused-value-import
Aug 14, 2026
Merged

fix(test): gate Value import behind cfg(unix) — unbreaks the nightly Windows job#697
logbie merged 3 commits into
mainfrom
fix/windows-clippy-unused-value-import

Conversation

@logbie

@logbie logbie commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

What

One line: gate use wfl::interpreter::value::Value; in tests/filesystem_mode_test.rs behind #[cfg(unix)].

Why

Nightly run 31795283997 failed the Build WFL for Windows job at the clippy step:

error: unused import: `wfl::interpreter::value::Value`
  --> tests\filesystem_mode_test.rs:12:5
   = note: `-D unused-imports` implied by `-D warnings`
error: could not compile `wfl` (test "filesystem_mode_test") due to 1 previous error

#694 consolidated the test helpers into tests/common/mod.rs, deleting the top-level get_global(..) -> Value and expect_text(&Value). Those were the platform-independent uses of Value. The only surviving reference is at line 132, inside #[cfg(unix)] mod unix — so the import is live on Unix and dead on Windows. Linux passed; Windows failed.

This reached main because #694 merged during the Actions allowlist outage (#695) with zero CI. Its run was a startup_failure, so no clippy job ever ran. This is the concrete cost of that outage rather than just the red X's.

Risk class

R0 — test-only, no runtime or public behavior change, no backward-compatibility surface.

Acceptance criteria → tests

Criterion Evidence
Windows clippy is clean under -D warnings cargo clippy --test filesystem_mode_test --all-features -- -D warnings
The file's tests still pass on Windows cargo test --test filesystem_mode_test --all-features — 4 passed, 0 failed
Unix coverage is unchanged Value is still imported under cfg(unix); the unix module is untouched
Formatting cargo fmt --all -- --check clean

Red → Green evidence

Reproduced on a real Windows host (win32, MSVC), matching the CI failure exactly.

Red — before the change:

error: unused import: `wfl::interpreter::value::Value`
  --> tests\filesystem_mode_test.rs:12:5
error: could not compile `wfl` (test "filesystem_mode_test") due to 1 previous error

Green — after:

    Checking wfl v26.8.2 (G:\repos\wfl)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.51s

running 4 tests
test file_mode_on_a_missing_path_errors ... ok
test windows::file_mode_still_returns_an_approximation ... ok
test file_mode_reads_a_four_character_octal_string ... ok
test windows::set_file_mode_reports_that_it_is_unsupported ... ok
test result: ok. 4 passed; 0 failed

Residual risk

None meaningful. If a future change adds a platform-independent use of Value to this file, the cfg(unix) gate will surface immediately as an unresolved-name compile error on Windows, not a silent gap.

Refs #695

🤖 Generated with Claude Code


Open in Devin Review

#694 consolidated the test helpers into tests/common/mod.rs, removing the
top-level `get_global(..) -> Value` and `expect_text(&Value)`. That left the
`Value` import with exactly one remaining reference, inside `#[cfg(unix)] mod
unix`, so on Windows the import is dead and `cargo clippy -- -D warnings`
fails the whole nightly Windows job.

The break reached main because #694 merged during the Actions allowlist
outage (#695) with zero CI: its run was a startup_failure, so no clippy job
ever executed.

Red: `cargo clippy --test filesystem_mode_test --all-features -- -D warnings`
on Windows reproduces `error: unused import: wfl::interpreter::value::Value`,
matching nightly run 31795283997 exactly. Green after this change, with the
4 tests in the file still passing.

Refs #695

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 14, 2026 11:23
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@logbie, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 41 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 546ae931-3a6d-4a87-9ba5-deca7af6bca1

📥 Commits

Reviewing files that changed from the base of the PR and between 67f386b and 8cd263e.

📒 Files selected for processing (1)
  • tests/filesystem_mode_test.rs

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.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a Windows-only clippy -D warnings failure in the filesystem_mode_test integration test by ensuring the Value import is only compiled on Unix, matching the only remaining usage site (inside the Unix-gated module).

Changes:

  • Gate use wfl::interpreter::value::Value; behind #[cfg(unix)] to avoid an unused-import warning on Windows.
  • Add a brief comment explaining why the import is Unix-only.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI review requested due to automatic review settings August 14, 2026 11:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings August 14, 2026 12:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@logbie
logbie merged commit 7622201 into main Aug 14, 2026
20 checks passed
@logbie
logbie deleted the fix/windows-clippy-unused-value-import branch August 14, 2026 12:07
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