Skip to content

fix(hardware): keep Windows Clippy clean in mesh-llm-system - #3231

Merged
i386 merged 1 commit into
Mesh-LLM:mainfrom
Virgile-pct:fix/windows-clippy-system-hardware
Nov 29, 2026
Merged

i386 merged 1 commit into
Mesh-LLM:mainfrom
Virgile-pct:fix/windows-clippy-system-hardware

Conversation

@Virgile-pct

@Virgile-pct Virgile-pct commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

Original problem

cargo clippy -p mesh-llm-system --all-targets -- -D warnings fails on Windows without features and with skippy-devices alone, on dead code in hardware/mod.rs. The dynamic-native-runtime builds are clean. CI lints on Ubuntu only, so it never shows up there; anyone running clippy on Windows hits it before their own change.

  • With skippy-devices: windows_per_gpu_vram, merge_adapter_memory, read_windows_adapter_memory and read_windows_video_controllers are never used. Their only caller is the Windows survey in default_collector.rs, which is built without skippy-devices or with dynamic-native-runtime, while they were built on every Windows target.
  • Without features: the Windows read_system_ram_bytes is never used. Its only caller is survey_system_ram, which is gated on skippy-devices or test; the Windows survey reads read_windows_total_ram_bytes directly.

Fix

Each helper takes its caller's cfg. The two pure helpers keep test, so their tests still run on every platform. The Windows read_system_ram_bytes gets the gate the macOS one already has. No behaviour changes.

Validation

On Windows 11, from this branch:

  • cargo clippy -p mesh-llm-system --all-targets -- -D warnings is clean with no features, skippy-devices, dynamic-native-runtime, and both. On main the first two fail and the last two are clean.
  • cargo test -p mesh-llm-system --lib hardware: 106 passed. With skippy-devices, 104 pass and 6 tests that go through the Skippy device probe (test_query_*, test_survey_returns_all_metrics, test_detect_collector_returns_default_on_non_tegra) panic in skippy-ffi (dynamic.rs:79), also with SKIPPY_NATIVE_RUNTIME_BUNDLE_DIR set. test_query_vram_only panics the same way on main on this machine.
  • rustfmt --check is clean.
  • No UI change.

Summary by CodeRabbit

  • Chores
    • Updated Windows hardware support availability to align with application configuration. No changes to end-user features or behavior are included in this update.

@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Windows hardware RAM and adapter-memory helpers now use feature conditions that align their compilation with the configured device collection. Some helpers remain available in tests.

Changes: Windows hardware feature gates

Layer / File(s) Summary
Gate Windows hardware readers
mesh/crates/mesh-llm-system/src/hardware/mod.rs
The Windows system-RAM reader, VRAM conversion, memory merge, adapter-memory probe, and video-controller probe now use feature-specific compilation conditions. The VRAM conversion and memory merge helpers also remain available in tests.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Refactor

Possibly related PRs

  • Mesh-LLM/mesh-llm#3230: Reports the Windows Clippy failure involving unused functions in the same hardware module.

Suggested reviewers: i386

Merge Risk: Minimal · up to d326f

This change adjusts compile-time feature gates on Windows hardware helpers so that Clippy no longer reports unused-code warnings. It changes no runtime behavior, and there is no identified merge-blocking risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the Windows Clippy fix in mesh-llm-system, which matches the changeset. The change gates Windows hardware helpers by the same cfg as their callers, so Clippy passes under each feature …
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.
Full details: Title check

Explanation

The title names the Windows Clippy fix in mesh-llm-system, which matches the changeset. The change gates Windows hardware helpers by the same cfg as their callers, so Clippy passes under each feature configuration. The title is specific and concise, and it names the crate and the platform.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

Clippy (1.99.1)

Clippy execution failed

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b9bcd2bf-fd27-4b04-bb93-6475439d7f9e
Commits

Reviewing files that changed from the base of the PR and between 74c8765 and d326fd9.

Files selected for processing: 1

  • mesh/crates/mesh-llm-system/src/hardware/mod.rs

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

…aller is

The Windows survey in default_collector.rs is built without skippy-devices
or with dynamic-native-runtime, but the adapter helpers it calls were built
on every Windows target, and the Windows read_system_ram_bytes only serves
the skippy-devices path. Clippy with -D warnings on Windows failed on them
as dead code without features and with skippy-devices alone. Gate each on
its caller's cfg.
@Virgile-pct
Virgile-pct force-pushed the fix/windows-clippy-system-hardware branch from d18ad0c to d326fd9 Compare November 28, 2026 13:38
@i386
i386 merged commit 9afca76 into Mesh-LLM:main Nov 29, 2026
15 of 29 checks passed
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