fix(audit): Batch 7-9 dead_code 标注 + TODO 清理 + 文档同步
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Batch 7: dead_code 标注统一 (16 处) - crates/ 9 处: growth, kernel, pipeline, runtime, saas, skills - src-tauri/ 7 处: classroom, intelligence, browser, mcp - 统一格式: #[allow(dead_code)] // @reserved: <原因> Batch 7+: EvolutionEngine L2/L3 10 个未使用 pub 函数 - 全部标注 @reserved: EvolutionEngine L2/L3, post-release integration Batch 9: TODO → FUTURE 标记 (4 处) - html.rs: template-based export - nl_schedule.rs: LLM-assisted parsing - knowledge/handlers.rs: category_id from upload - personality_detector.rs: VikingStorage persistence Batch 5+: Cargo.lock 更新 (serde_yaml_bw 迁移) 全量测试通过: 719 passed, 0 failed
This commit is contained in:
@@ -168,7 +168,7 @@ impl SessionManager {
|
||||
|
||||
/// Get the number of active sessions
|
||||
/// Reserved for future status dashboard
|
||||
#[allow(dead_code)]
|
||||
#[allow(dead_code)] // @reserved: post-release status dashboard session count
|
||||
pub async fn session_count(&self) -> usize {
|
||||
let sessions = self.sessions.read().await;
|
||||
sessions.len()
|
||||
|
||||
@@ -101,7 +101,7 @@ impl ClassroomPersistence {
|
||||
}
|
||||
|
||||
/// Delete a classroom and its chat history.
|
||||
#[allow(dead_code)]
|
||||
#[allow(dead_code)] // @reserved: post-release classroom deletion Tauri command
|
||||
pub async fn delete_classroom(&self, classroom_id: &str) -> Result<(), String> {
|
||||
let mut conn = self.conn.lock().await;
|
||||
sqlx::query("DELETE FROM classrooms WHERE id = ?")
|
||||
|
||||
@@ -99,7 +99,7 @@ pub struct CompactionCheck {
|
||||
|
||||
/// Configuration for LLM-based summary generation
|
||||
/// NOTE: Reserved for future LLM compaction Tauri command
|
||||
#[allow(dead_code)]
|
||||
#[allow(dead_code)] // @reserved: post-release LLM compaction Tauri command
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct LlmSummaryConfig {
|
||||
pub provider: String,
|
||||
|
||||
@@ -313,7 +313,7 @@ pub fn configure_extraction_driver(driver: Arc<dyn LlmDriver>, model: String) {
|
||||
}
|
||||
|
||||
/// Check if the extraction driver is available (legacy OnceCell path).
|
||||
#[allow(dead_code)]
|
||||
#[allow(dead_code)] // @reserved: diagnostic check for legacy OnceCell extraction driver
|
||||
pub fn is_extraction_driver_configured() -> bool {
|
||||
EXTRACTION_DRIVER.get().is_some()
|
||||
}
|
||||
@@ -321,7 +321,7 @@ pub fn is_extraction_driver_configured() -> bool {
|
||||
/// Get the global extraction driver (legacy OnceCell path).
|
||||
///
|
||||
/// Prefer accessing via `kernel.extraction_driver()` when the Kernel is available.
|
||||
#[allow(dead_code)]
|
||||
#[allow(dead_code)] // @reserved: legacy accessor, prefer kernel.extraction_driver()
|
||||
pub fn get_extraction_driver() -> Option<Arc<TauriExtractionDriver>> {
|
||||
EXTRACTION_DRIVER.get().cloned()
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ mod tests {
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Persistence helpers (stub — TODO: integrate with VikingStorage)
|
||||
// Persistence helpers (stub — FUTURE: post-release personality persistence via VikingStorage)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
use std::sync::OnceLock;
|
||||
|
||||
@@ -206,7 +206,7 @@ pub async fn post_conversation_hook(
|
||||
///
|
||||
/// NOTE: Memory injection is now handled by MemoryMiddleware in the Kernel
|
||||
/// middleware chain. This function is kept as a utility for ad-hoc queries.
|
||||
#[allow(dead_code)]
|
||||
#[allow(dead_code)] // @reserved: ad-hoc memory context queries outside middleware chain
|
||||
async fn build_memory_context(
|
||||
agent_id: &str,
|
||||
user_message: &str,
|
||||
|
||||
@@ -33,7 +33,7 @@ impl Default for McpManagerState {
|
||||
|
||||
impl McpManagerState {
|
||||
/// Create with a pre-allocated kernel_adapters Arc for sharing with Kernel.
|
||||
#[allow(dead_code)]
|
||||
#[allow(dead_code)] // @reserved: alternate constructor for shared MCP adapter injection
|
||||
pub fn with_shared_adapters(kernel_adapters: Arc<std::sync::RwLock<Vec<McpToolAdapter>>>) -> Self {
|
||||
Self {
|
||||
manager: Arc::new(Mutex::new(McpServiceManager::new())),
|
||||
|
||||
Reference in New Issue
Block a user