clippy: zero pedantic warnings across the tree

This commit is contained in:
damocles 2026-05-18 22:09:34 +02:00
parent 690cb5ab5b
commit f9f1346eae
20 changed files with 71 additions and 61 deletions

View file

@ -148,6 +148,7 @@ async fn main() -> Result<()> {
}
}
#[allow(clippy::too_many_arguments, clippy::similar_names)]
async fn serve(
socket: &Path,
interval: Duration,
@ -245,13 +246,13 @@ async fn serve(
s.record(&row);
}
// After turn completes, check if there are pending messages waiting.
// If so, immediately process them instead of blocking on recv().
// This ensures messages queued during the turn are processed ASAP.
// After turn completes, log whether messages arrived during
// the turn — the outer loop will iterate back to recv() on
// its own (the Empty-arm sleep only fires when recv
// actually returned Empty), so no explicit continue needed.
let pending = inbox_unread(socket).await;
if pending > 0 {
tracing::info!(%pending, "pending messages after turn; fetching next");
continue; // Loop back to recv() immediately instead of sleeping
}
}
Ok(AgentResponse::Empty) => {
@ -409,10 +410,11 @@ async fn fetch_agent_post_turn_counts(socket: &Path) -> (Option<u64>, Option<u64
(threads, reminders)
}
/// Assemble a TurnStatRow from the harness's per-turn state. Shared
/// Assemble a `TurnStatRow` from the harness's per-turn state. Shared
/// shape between the agent + manager bin loops (each lives in its own
/// crate root so this helper is duplicated; the savings of a shared
/// module aren't worth the cross-crate ceremony at this size).
#[allow(clippy::too_many_arguments)]
fn build_row(
started_at: i64,
ended_at: i64,