fix: resolve all clippy warnings in benchmarks crate

Remove unused fields, methods, and error variants. Allow dead_code on
public API types intended for future use. Drop needless Default spread.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
This commit is contained in:
Illia Polosukhin
2026-02-18 01:05:07 -08:00
co-authored by Claude Opus 4.6
parent 05cb01816b
commit d46ab3a1d7
7 changed files with 4 additions and 28 deletions
-2
View File
@@ -20,8 +20,6 @@ struct GaiaEntry {
level: Option<u32>,
#[serde(alias = "file_name", default)]
file_name: Option<String>,
#[serde(alias = "Annotator Metadata", default)]
annotator_metadata: Option<serde_json::Value>,
}
/// GAIA benchmark suite.
-5
View File
@@ -64,11 +64,6 @@ impl BenchChannel {
pub fn capture(&self) -> Arc<Mutex<ChannelCapture>> {
Arc::clone(&self.capture)
}
/// Get a clone of the message sender for injecting follow-up messages.
pub fn sender(&self) -> mpsc::Sender<IncomingMessage> {
self.msg_tx.clone()
}
}
#[async_trait]
-9
View File
@@ -14,9 +14,6 @@ pub enum BenchError {
#[error("Task {task_id} failed: {reason}")]
TaskFailed { task_id: String, reason: String },
#[error("Timeout after {seconds}s for task {task_id}")]
Timeout { task_id: String, seconds: u64 },
#[error("Scoring error for task {task_id}: {reason}")]
Scoring { task_id: String, reason: String },
@@ -31,10 +28,4 @@ pub enum BenchError {
#[error("Agent error: {0}")]
Agent(#[from] ironclaw::Error),
#[error("Results directory error: {0}")]
ResultsDir(String),
#[error("Resume failed: no completed tasks found in {path}")]
ResumeEmpty { path: PathBuf },
}
+1
View File
@@ -15,6 +15,7 @@ use ironclaw::llm::{
/// Recorded metrics from a single LLM call.
#[derive(Debug, Clone)]
#[allow(dead_code)]
pub struct LlmCallRecord {
pub input_tokens: u32,
pub output_tokens: u32,
-1
View File
@@ -179,7 +179,6 @@ async fn main() -> anyhow::Result<()> {
let session = ironclaw::llm::create_session_manager(ironclaw::llm::SessionConfig {
auth_base_url: ironclaw_config.llm.nearai.auth_base_url.clone(),
session_path: ironclaw_config.llm.nearai.session_path.clone(),
..Default::default()
})
.await;
session.ensure_authenticated().await?;
+1 -11
View File
@@ -1,7 +1,6 @@
use std::collections::HashSet;
use std::io::{BufRead, Write};
use std::path::{Path, PathBuf};
use std::time::Duration;
use chrono::{DateTime, Utc};
use uuid::Uuid;
@@ -23,12 +22,6 @@ pub struct Trace {
pub hit_timeout: bool,
}
impl Trace {
pub fn wall_time(&self) -> Duration {
Duration::from_millis(self.wall_time_ms)
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct TraceToolCall {
pub name: String,
@@ -73,6 +66,7 @@ pub struct RunResult {
impl RunResult {
/// Build aggregate from individual task results.
#[allow(clippy::too_many_arguments)]
pub fn from_tasks(
run_id: Uuid,
suite_id: &str,
@@ -113,10 +107,6 @@ impl RunResult {
finished_at: Utc::now(),
}
}
pub fn total_wall_time(&self) -> Duration {
Duration::from_millis(self.total_wall_time_ms)
}
}
/// Append a single task result as one JSON line to the JSONL file.
+2
View File
@@ -44,6 +44,7 @@ pub enum ResourceType {
/// What the agent produced for scoring.
#[derive(Debug, Clone)]
#[allow(dead_code)]
pub struct TaskSubmission {
pub response: String,
pub conversation: Vec<ConversationTurn>,
@@ -108,6 +109,7 @@ impl BenchScore {
/// Each suite (GAIA, Tau-bench, custom, etc.) implements this trait
/// to provide task loading, scoring, and optional lifecycle hooks.
#[async_trait]
#[allow(dead_code)]
pub trait BenchSuite: Send + Sync {
/// Human-readable name (e.g., "GAIA Validation").
fn name(&self) -> &str;