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> {
but the module that uses it is gated to Linux:
// crates/agent/src/llm_proxy.rs:1315
#[cfg(all(test, target_os = "linux"))]
mod tests
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.
Suggested fix
Match the helper to its caller:
#[cfg(all(test, target_os = "linux"))]
fn get(&self, key: &str, device_id: &str) -> Option<String> {
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.
Found while running the local gate on macOS before pushing #99.
Summary
make checkfails on a cleanmainon macOS, and would on Windows, becauseclippy is run with
-D warningsand one#[cfg(test)]helper has no calleroutside Linux.
Reproduced against
upstream/mainwith no local changes applied, to be sure itwas not mine.
Root cause
The helper is compiled for every test build:
but the module that uses it is gated to Linux:
So on any non-Linux host
getis compiled with no callers,dead_codefires,and
-D warningsturns 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, runsmake lintWindows agent tests—windows-2025, runs onlycargo nextest run --locked --package agentdesktop-agent --lib, no clippyContainer—make dockerSo the failure is invisible to CI and visible to every contributor developing on
macOS or Windows, for whom the documented
make checkdoes not pass on a cleancheckout.
Suggested fix
Match the helper to its caller:
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 clippyjob. That is a biggercall about CI minutes, which is yours rather than mine.