You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
make check fails on non-Linux hosts: cfg(test) helper whose only caller is Linux-gated #153
Found while running the local gate on macOS before pushing #99.
Summary
make check fails on a clean main on macOS, and would on Windows, because
clippy is run with -D warnings and one #[cfg(test)] helper has no caller
outside Linux.
error: method `get` is never used
--> crates/agent/src/llm_proxy.rs:149:8
error: could not compile `agentdesktop-agent` (lib test) due to 1 previous error
Reproduced against upstream/main with no local changes applied, to be sure it
was not mine.
Root cause
The helper is compiled for every test build:
// crates/agent/src/llm_proxy.rs:147-152/// A cached credential for the key and device, if one is still valid.#[cfg(test)]fn get(&self,key:&str,device_id:&str) -> Option<String>{
So on any non-Linux host get is compiled with no callers, dead_code fires,
and -D warnings turns it into an error.
Why CI does not catch it
Clippy only ever runs on the Linux job, where the test module is compiled and
the helper is used:
Test and lint — blacksmith-4vcpu-ubuntu-2404, runs make lint
Windows agent tests — windows-2025, runs only cargo nextest run --locked --package agentdesktop-agent --lib, no clippy
Container — make docker
So the failure is invisible to CI and visible to every contributor developing on
macOS or Windows, for whom the documented make check does not pass on a clean
checkout.
Happy to send that as a PR if you want it — it is one line, so I did not assume.
A broader option, if you would like non-Linux breakage caught in future: add a
clippy step to the Windows job, or a macOS cargo clippy job. That is a bigger
call about CI minutes, which is yours rather than mine.
Activity
fix(agent): gate the cache test helper like its only caller
fix(agent): gate the cache test helper like its only caller (agentdes…