Skip to content

Commit 686b9f7

Browse files
hyperpolymathclaude
andcommitted
chore: eliminate all compiler warnings (0 warnings, 248 tests pass)
- Remove unused `colored::Colorize` import from main.rs - Suppress dead_code warnings on API surface prepared for future integrations (LLM structs, neural module, BoJ cartridge types) - Fix `ProverStats` visibility in agent router - Add `#[allow(unexpected_cfgs)]` for ConceptNet feature gates - Remove unused imports via cargo fix (77 auto-fixed) - Restore `Priority` and `Goal` imports in agent test modules that cargo fix incorrectly removed - Add training_data/scripts/ to .gitignore Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f2ad141 commit 686b9f7

37 files changed

Lines changed: 98 additions & 83 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ Thumbs.db
88
*.swo
99
*~
1010
.idea/
11+
12+
# Training data scripts (one-off analysis, not part of build)
13+
training_data/scripts/
1114
.vscode/
1215

1316
# Build

src/rust/agent/actors.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// SPDX-License-Identifier: PMPL-1.0-or-later
33

44
#![allow(dead_code)]
5+
#![allow(unexpected_cfgs)]
56

67
//! Actor-based Multi-Agent Orchestration
78
//!
@@ -10,12 +11,12 @@
1011
use actix::prelude::*;
1112
use anyhow::Result;
1213
use std::sync::Arc;
13-
use std::time::{Duration, Instant};
14-
use tracing::{debug, info, warn};
14+
use std::time::Instant;
15+
use tracing::{debug, info};
1516

1617
use crate::core::{Goal, ProofState};
1718
use crate::provers::{ProverBackend, ProverKind};
18-
use super::{AgenticGoal, GoalResult};
19+
use super::AgenticGoal;
1920

2021
/// Message types for actor communication
2122
#[derive(Message)]
@@ -143,7 +144,7 @@ impl Actor for ContextAgent {
143144
impl Handler<GetRelatedConcepts> for ContextAgent {
144145
type Result = Vec<String>;
145146

146-
fn handle(&mut self, msg: GetRelatedConcepts, _ctx: &mut Self::Context) -> Self::Result {
147+
fn handle(&mut self, _msg: GetRelatedConcepts, _ctx: &mut Self::Context) -> Self::Result {
147148
#[cfg(feature = "conceptnet")]
148149
{
149150
use actix::AsyncContext;

src/rust/agent/explanations.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
use serde::{Deserialize, Serialize};
1212
use std::collections::HashMap;
1313

14-
use crate::core::{Goal, Term};
14+
use crate::core::Term;
1515
use crate::provers::ProverKind;
16-
use super::{AgenticGoal, Priority};
16+
use super::AgenticGoal;
1717

1818
/// Explanation for a proof attempt
1919
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -301,7 +301,7 @@ impl ExplanationGenerator {
301301
Term::Let { name, value, body, .. } => {
302302
format!("let {} = {} in {}", name, self.format_term(value), self.format_term(body))
303303
}
304-
Term::Match { scrutinee, branches, .. } => {
304+
Term::Match { scrutinee, branches: _, .. } => {
305305
format!("match {} with ...", self.format_term(scrutinee))
306306
}
307307
Term::Fix { name, body, .. } => {
@@ -378,6 +378,8 @@ impl Default for ExplanationGenerator {
378378
#[cfg(test)]
379379
mod tests {
380380
use super::*;
381+
use crate::agent::Priority;
382+
use crate::core::Goal;
381383

382384
#[test]
383385
fn test_failure_explanation() {

src/rust/agent/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@
99
//! across multiple provers with neural guidance and symbolic verification.
1010
1111
use anyhow::Result;
12-
use async_trait::async_trait;
1312
use serde::{Deserialize, Serialize};
1413
use std::collections::VecDeque;
1514
use tokio::sync::RwLock;
1615
use tracing::{debug, info, warn};
1716

18-
use crate::core::{Goal, ProofState, Tactic, TacticResult, Term, Theorem};
17+
use crate::core::{Goal, ProofState, Tactic, Term};
1918
use crate::provers::{ProverBackend, ProverKind};
2019

2120
pub mod memory;
@@ -290,7 +289,7 @@ impl AgentCore {
290289
}
291290

292291
/// Process a single goal
293-
async fn process_goal(&self, mut goal: AgenticGoal) -> Result<GoalResult> {
292+
async fn process_goal(&self, goal: AgenticGoal) -> Result<GoalResult> {
294293
// Step 1: Check memory for similar proofs
295294
if let Some(cached) = self.memory.find_similar(&goal).await? {
296295
info!("Found similar proof in memory for goal {}", goal.goal.id);
@@ -330,7 +329,7 @@ impl AgentCore {
330329
};
331330

332331
// Step 5: Try tactics
333-
let start = std::time::Instant::now();
332+
let _start = std::time::Instant::now();
334333

335334
for tactic in tactics {
336335
debug!("Trying tactic {:?} for goal {}", tactic, goal.goal.id);

src/rust/agent/planner.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use async_trait::async_trait;
1212
use tracing::{debug, info};
1313

1414
use crate::core::{Goal, Term};
15-
use super::{AgenticGoal, Priority};
15+
use super::AgenticGoal;
1616

1717
/// Trait for goal planning/decomposition
1818
#[async_trait]
@@ -35,7 +35,7 @@ impl RulePlanner {
3535
}
3636

3737
/// Check if term is a conjunction (A ∧ B)
38-
fn is_conjunction(&self, term: &Term) -> Option<(Term, Term)> {
38+
fn is_conjunction(&self, _term: &Term) -> Option<(Term, Term)> {
3939
// TODO: Implement proper pattern matching for conjunction
4040
None
4141
}
@@ -71,7 +71,7 @@ impl Planner for RulePlanner {
7171
// Rule 1: Decompose implication (A → B) into:
7272
// - Assume A
7373
// - Prove B
74-
if let Some((premise, conclusion)) = self.is_implication(&goal.goal.target) {
74+
if let Some((_premise, conclusion)) = self.is_implication(&goal.goal.target) {
7575
debug!("Decomposing implication");
7676

7777
// Sub-goal 1: Assume premise (this becomes a hypothesis)
@@ -150,6 +150,7 @@ impl Planner for LeanPlanner {
150150
#[cfg(test)]
151151
mod tests {
152152
use super::*;
153+
use crate::agent::Priority;
153154
use crate::core::{Goal, Term};
154155

155156
#[tokio::test]

src/rust/agent/router.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use super::AgenticGoal;
1717

1818
/// Prover performance statistics
1919
#[derive(Debug, Clone, Serialize, Deserialize)]
20-
struct ProverStats {
20+
pub struct ProverStats {
2121
/// Total attempts
2222
attempts: u32,
2323

src/rust/anomaly_detection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ impl ConsensusChecker {
181181
/// Check consensus across multiple provers
182182
pub fn check_consensus(
183183
&self,
184-
goal: &str,
184+
_goal: &str,
185185
prover_results: Vec<(String, bool)>,
186186
) -> ConsensusResult {
187187
let mut voting = HashMap::new();

src/rust/aspect.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,7 @@ impl RuleBasedTagger {
789789
///
790790
/// This integrates with Julia ML components for neural aspect classification.
791791
/// The neural model is trained on a corpus of tagged theorems.
792+
#[allow(dead_code)]
792793
pub struct NeuralTagger {
793794
/// Confidence threshold for aspect prediction
794795
threshold: f64,
@@ -821,13 +822,15 @@ impl NeuralTagger {
821822
}
822823

823824
/// Get embeddings for a term (to be implemented with Julia integration)
825+
#[allow(dead_code)]
824826
async fn get_embeddings(&self, _statement: &Term) -> Vec<f64> {
825827
// TODO: Implement Julia FFI or HTTP call to Julia ML service
826828
// For now, return dummy embeddings
827829
vec![0.0; 128]
828830
}
829831

830832
/// Classify embeddings into aspects (to be implemented)
833+
#[allow(dead_code)]
831834
async fn classify_embeddings(&self, _embeddings: &[f64]) -> HashMap<Aspect, f64> {
832835
// TODO: Implement Julia FFI or HTTP call to Julia ML service
833836
// For now, return empty predictions
@@ -859,6 +862,7 @@ impl AspectTagger for NeuralTagger {
859862
///
860863
/// Maps mathematical concepts to OpenCyc ontology and uses semantic relationships
861864
/// to infer aspects.
865+
#[allow(dead_code)]
862866
pub struct OpenCycTagger {
863867
/// OpenCyc service URL
864868
service_url: String,
@@ -877,6 +881,7 @@ impl OpenCycTagger {
877881
}
878882

879883
/// Query OpenCyc for concept relationships
884+
#[allow(dead_code)]
880885
async fn query_concept(&self, _concept: &str) -> Option<Vec<Aspect>> {
881886
// TODO: Implement OpenCyc API integration
882887
// For now, return None

src/rust/dispatch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::time::Instant;
1313
use tracing::{info, warn};
1414

1515
use crate::integrity::solver_integrity::{IntegrityChecker, IntegrityStatus};
16-
use crate::llm::{LlmAdvisor, DispatchOptimisation};
16+
use crate::llm::LlmAdvisor;
1717
use crate::provers::{ProverConfig, ProverFactory, ProverKind};
1818
use crate::verification::axiom_tracker::{AxiomTracker, AxiomUsage, DangerLevel};
1919
use crate::verification::confidence::{compute_trust_level, TrustFactors, TrustLevel};

src/rust/executor/sandbox.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
1515
use anyhow::{Context, Result};
1616
use serde::{Deserialize, Serialize};
17-
use std::path::{Path, PathBuf};
17+
use std::path::Path;
1818
use std::process::Stdio;
1919
use tokio::io::AsyncWriteExt;
2020
use tokio::process::Command;

0 commit comments

Comments
 (0)