chore(#1474): add reason= to remaining bare clippy allows outside dashboard

This commit is contained in:
damocles 2026-06-09 00:26:19 +02:00 committed by mara
commit 7c9954ceec
12 changed files with 81 additions and 16 deletions

View file

@ -113,7 +113,11 @@ pub(crate) fn recv_timeout(wait_seconds: Option<u64>) -> std::time::Duration {
}
}
#[allow(clippy::too_many_lines)]
#[allow(
clippy::too_many_lines,
reason = "flat dispatch table: one match arm per shared request variant; \
splitting it would scatter the routing logic without shrinking it"
)]
/// Handle the subset of `Request` variants that are identical on both
/// the agent socket and the manager socket. Returns `Some(response)` for
/// every variant it handles; returns `None` for variants with socket-specific
@ -301,7 +305,11 @@ pub(crate) async fn dispatch_shared(
})
}
#[allow(clippy::too_many_lines)]
#[allow(
clippy::too_many_lines,
reason = "flat dispatch table: one match arm per agent-socket request \
variant; splitting it would scatter the routing logic"
)]
async fn dispatch(req: &AgentRequest, agent: &str, coord: &Arc<Coordinator>) -> AgentResponse {
if let Some(resp) = dispatch_shared(req, agent, coord).await {
return resp;
@ -553,7 +561,11 @@ async fn dispatch(req: &AgentRequest, agent: &str, coord: &Arc<Coordinator>) ->
///
/// The manager is not exempt - grant `read_host_journal` in
/// `meta/capabilities.json` to enable it for any agent including the manager.
#[allow(clippy::too_many_arguments)]
#[allow(
clippy::too_many_arguments,
reason = "args mirror the GetHostJournal wire variant 1:1 at this single \
call site; a params struct would just relabel the same fields"
)]
pub async fn dispatch_host_journal(
agent: &str,
unit: &Option<String>,