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

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:
iven
2026-04-19 08:54:57 +08:00
parent edd6dd5fc8
commit d9b0b4f4f7
20 changed files with 31 additions and 40 deletions

View File

@@ -565,7 +565,7 @@ async fn store_refresh_token(
/// 清理过期和已使用的 refresh tokens
/// 注意: 现已迁移到 Worker/Scheduler 定期执行,此函数保留作为备用
#[allow(dead_code)]
#[allow(dead_code)] // @reserved: backup for Worker/Scheduler cleanup; kept as fallback
async fn cleanup_expired_refresh_tokens(db: &sqlx::PgPool) -> SaasResult<()> {
let now = chrono::Utc::now();
// 删除过期超过 30 天的已使用 token (减少 DB 膨胀)

View File

@@ -804,7 +804,7 @@ async fn handle_document_upload(
// 创建知识条目
let item_req = CreateItemRequest {
category_id: "uploaded".to_string(), // TODO: 从上传参数获取
category_id: "uploaded".to_string(), // FUTURE: post-release category_id from upload params
title: doc.title.clone(),
content,
keywords: None,

View File

@@ -6,7 +6,7 @@ use super::types::*;
/// 数据库行结构
#[derive(Debug, FromRow)]
#[allow(dead_code)]
#[allow(dead_code)] // @reserved: FromRow deserialization struct; fields accessed via destructuring
struct ScheduledTaskRow {
id: String,
account_id: String,