clippy: zero pedantic warnings across the tree
This commit is contained in:
parent
690cb5ab5b
commit
f9f1346eae
20 changed files with 71 additions and 61 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -206,12 +206,12 @@ async fn serve(
|
|||
);
|
||||
s.record(&row);
|
||||
}
|
||||
// Check for messages that arrived during the turn and loop
|
||||
// immediately if any are waiting — mirrors hive-ag3nt behaviour.
|
||||
// Check for messages that arrived during the turn so we
|
||||
// surface "draining" in the logs. The loop will already
|
||||
// re-iterate from here — no explicit continue needed.
|
||||
let pending = inbox_unread(socket).await;
|
||||
if pending > 0 {
|
||||
tracing::info!(%pending, "pending messages after turn; fetching next");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
Ok(ManagerResponse::Empty) => {
|
||||
|
|
@ -333,8 +333,9 @@ async fn fetch_manager_post_turn_counts(socket: &Path) -> (Option<u64>, Option<u
|
|||
(threads, reminders)
|
||||
}
|
||||
|
||||
/// Manager flavour of the agent's build_row helper. Duplicated rather
|
||||
/// Manager flavour of the agent's `build_row` helper. Duplicated rather
|
||||
/// than shared to keep each bin self-contained at this size.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn build_row(
|
||||
started_at: i64,
|
||||
ended_at: i64,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue