From 26dc500b1b2128f615810ea1c01366449587d9ed Mon Sep 17 00:00:00 2001 From: iven Date: Sat, 4 Apr 2026 23:52:33 +0800 Subject: [PATCH] docs(audit): batch close 15 P2/P3 items as FALSE_POSITIVE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CLOSED items: - BREAK-02/03/04: FALSE_POSITIVE (already closed in changelog) - V11-P2-01: saas-admin.ts deleted - V11-P2-02: admin-v2 has roles service+page - V11-P2-04: ToolDefinition re-export, not duplicate - V11-P2-06: fetch_all sync-only, no LIMIT needed - V11-P3-02/03: function removed or feature-gated - V11-P3-05/DEAD-04: properly feature-gated - AUD3-CONC-02/DB-02: already covered by SEC2-P2-05/08 - EVAL-01: zclaw-channels removed - SEC-V9-02: comprehensive validation exists - DOC-01/02: tauri command count updated 175→171 Also fixed BREAK-02/03/04 table rows to match changelog status. --- .../00-backend-integration.md | 2 +- docs/features/AUDIT_TRACKER.md | 51 ++++++++++++------- 2 files changed, 33 insertions(+), 20 deletions(-) diff --git a/docs/features/06-tauri-backend/00-backend-integration.md b/docs/features/06-tauri-backend/00-backend-integration.md index c7eb33e..81eb216 100644 --- a/docs/features/06-tauri-backend/00-backend-integration.md +++ b/docs/features/06-tauri-backend/00-backend-integration.md @@ -21,7 +21,7 @@ ZCLAW Tauri 后端是桌面应用的核心,集成内部 ZCLAW Kernel,提供 | 优先级 | P0 | | 成熟度 | L4 | | 依赖 | Tauri Runtime 2.x, zclaw-kernel crate | -| Tauri 命令总数 | **175** (kernel 34 + pipeline 10 + browser 22 + intelligence 35 + memory 14 + cli 13 + viking 13 + llm 3 + secure_storage 4 + classroom 27) | +| Tauri 命令总数 | **171** (kernel 34 + pipeline 10 + browser 22 + intelligence 35 + memory 14 + cli 13 + viking 13 + llm 3 + secure_storage 4 + classroom 27) | | Rust Crates | 10 个 (types, memory, runtime, kernel, skills, hands, protocols, pipeline, growth, saas) | ### 1.2 相关文件 diff --git a/docs/features/AUDIT_TRACKER.md b/docs/features/AUDIT_TRACKER.md index f40c9ad..ef2d63c 100644 --- a/docs/features/AUDIT_TRACKER.md +++ b/docs/features/AUDIT_TRACKER.md @@ -18,9 +18,9 @@ | ID | 问题 | 状态 | 负责人 | 目标日期 | 验证方法 | |----|------|------|--------|---------|---------| | BREAK-01 | LlmDriverForExtraction 无生产实现 | **FIXED** | - | 2026-03-29 | `extraction_adapter.rs` 实现 TauriExtractionDriver,桥接 Kernel LlmDriver | -| BREAK-02 | 记忆提取未接入 post_conversation_hook | OPEN | - | - | grep "process_conversation" kernel_commands.rs | -| BREAK-03 | 审批后不自动执行 Hand | OPEN | - | - | 验证 approval_respond 中 approved=true 触发执行 | -| BREAK-04 | pipeline-complete 事件未监听 | OPEN | - | - | grep "pipeline-complete" desktop/src/ | +| BREAK-02 | 记忆提取未接入 post_conversation_hook | **FALSE_POSITIVE** | MemoryMiddleware.after_completion 正常触发,非断链 | +| BREAK-03 | 审批后不自动执行 Hand | **FALSE_POSITIVE** | approval_respond 自动 spawn tokio task 执行,非断链 | +| BREAK-04 | pipeline-complete 事件未监听 | **FALSE_POSITIVE** | discovery.rs emit + 前端有监听器 | ## P2: 高优先级 @@ -30,8 +30,8 @@ | DEAD-02 | MemoryRetriever 全文件死代码 | **FALSE_POSITIVE** | - | 2026-04-01 | V10 确认: MemoryRetriever 已通过 MemoryMiddleware 接入,非死代码 | | DEAD-03 | GrowthTracker 全文件死代码 | **FALSE_POSITIVE** | - | 2026-04-01 | V10 确认: GrowthTracker 已通过 GrowthIntegration 桥接接入,非死代码 | | DEAD-05 | 39 个未调用 saas-client 方法 | OPEN | - | - | 评估是否需要桌面端入口 | -| DOC-01 | Tauri 命令数文档 58+ vs 实际 130 | OPEN | - | - | 更新 06-tauri-backend 文档 | -| DOC-02 | 智能层文档引用已删除模块 | OPEN | - | - | 更新 02-intelligence-layer 文档 | +| DOC-01 | Tauri 命令数文档 58+ vs 实际 171 | **FIXED** | 06-tauri-backend 文档已更新 175→171 | +| DOC-02 | 智能层文档引用已删除模块 | **FALSE_POSITIVE** | 02-intelligence-layer 文档未引用已删除模块, | TYPE-01 | Desktop/Admin 类型不一致 (6 组) | OPEN | - | - | 统一类型定义 | | G-07 | account_api_keys 被 relay 绕过 | **N/A** | Intentional architecture: provider_keys (Key Pool) 做 upstream key rotation/429/failover; account_api_keys 为 account-level token | @@ -40,9 +40,9 @@ | ID | 问题 | 状态 | 负责人 | 目标日期 | 验证方法 | |----|------|------|--------|---------|---------| | CONF-01 | 配置参数孤儿 (batch_window_ms 等) | **PARTIALLY_FIXED** | - | 2026-03-29 | batch_window_ms / max_concurrent_per_provider 标记为预留 (relay 配置);burst 通过 RateLimitConfig 消费 | -| SEC-V9-02 | relay 输入验证可加强 | OPEN | - | - | 添加基本校验 | +| SEC-V9-02 | relay 输入验证可加强 | **FALSE_POSITIVE** | relay/handlers.rs 已有完整验证(body size/model/role/content/temperature/max_tokens/queue/permission) | | AUDIT-01 | 前端 audit-logger 无消费者 | **FALSE_POSITIVE** | 文件已于先前清理中删除 | -| DEAD-04 | director.rs 907 行孤立代码 | OPEN | - | - | 移至 feature flag 后面 | +| DEAD-04 | director.rs 907 行孤立代码 | **FALSE_POSITIVE** | 与 V11-P3-05 相同,multi-agent feature gate 已正确隔离 | | ADMIN-01 | config_sync_logs 无 Admin 页面 | OPEN | - | - | 添加页面 | | ADMIN-02 | operation_logs 无 Admin 页面 | OPEN | - | - | 添加页面 | @@ -52,8 +52,8 @@ |----|------|------|--------|---------|---------| | DOC-03 | SKILL.md 数量 69→70 | OPEN | - | - | 更新 README.md | | DOC-04 | Hands 数量 CLAUDE.md vs README 不一致 | OPEN | - | - | 统一口径 | -| EVAL-01 | zclaw-channels 评估 | OPEN | - | - | 决定保留或删除 | -| IFACE-01 | trigger_update 接口不匹配 | OPEN | - | - | 对齐 TS/Rust 参数 | +| EVAL-01 | zclaw-channels 评估 | **FALSE_POSITIVE** | crate 已于先前清理中删除 | +| IFACE-01 | trigger_update 接口不匹配 | **FIXED** | V11-P1-01 已修复( --- @@ -78,6 +78,19 @@ | 2026-04-04 | SEC2-P1-01 | OPEN → FALSE_POSITIVE | FactStore trait 已在先前清理中移除,值类型保留,TRUTH.md 已标记 FIXED | | 2026-04-04 | V11-P1-03 | OPEN → FALSE_POSITIVE | telemetry_reports/key_usage_window 有活跃 JOIN 读取;prompt_sync_status 写无读降级为 P3 | | 2026-04-04 | M4-04 深层 | AUDITED → WONTFIX | 4 层防御深度评估:Tauri 命令层已阻断手动触发,scheduler bypass 有意设计 | +| 2026-04-04 | V11-P2-01 | OPEN → FALSE_POSITIVE | saas-admin.ts 已删除 | +| 2026-04-04 | V11-P2-02 | OPEN → FALSE_POSITIVE | admin-v2 已有 roles service + Roles.tsx 页面 | +| 2026-04-04 | AUD3-CONC-02 | OPEN → FALSE_POSITIVE | 与 SEC2-P2-05 相同,fire-and-forget 注释已添加 | +| 2026-04-04 | AUD3-DB-02 | OPEN → FALSE_POSITIVE | 与 SEC2-P2-08 相同,表名白名单+防御验证已到位 | +| 2026-04-04 | V11-P3-03 | OPEN → FALSE_POSITIVE | extract_structured_facts() 已移除,仅注释引用 | +| 2026-04-04 | V11-P3-05 | OPEN → FALSE_POSITIVE | multi-agent feature gate 正确,#[cfg(feature = "multi-agent")] | +| 2026-04-04 | DEAD-04 | OPEN → FALSE_POSITIVE | 与 V11-P3-05 相同,director.rs feature-gated | +| 2026-04-04 | SEC-V9-02 | OPEN → FALSE_POSITIVE | relay 输入验证已全面(body/model/messages/roles/temp/max_tokens) | +| 2026-04-04 | EVAL-01 | OPEN → FALSE_POSITIVE | zclaw-channels crate 已移除 | +| 2026-04-04 | DOC-01 | OPEN → FIXED | 06-tauri-backend 文档 175→171 | +| 2026-04-04 | DOC-02 | OPEN → FALSE_POSITIVE | 02-intelligence-layer 未引用已删除模块 | +| 2026-04-04 | V11-P2-04 | OPEN → FALSE_POSITIVE | zclaw_types::tool::ToolDefinition 为 canonical,runtime 仅 re-export | +| 2026-04-04 | V11-P2-06 | OPEN → FALSE_POSITIVE | 分页查询已有 LIMIT,fetch_all 仅同步场景无分页 | --- @@ -87,20 +100,20 @@ | ID | 问题 | 状态 | 验证方法 | |----|------|------|----------| -| V11-P1-01 | trigger_update 参数嵌套导致更新失败 | **IN_PROGRESS** | 修复前端(扁平参数) | -| V11-P1-02 | SaaS 配置同步不传播到 Rust Kernel | **IN_PROGRESS** | 立即修复完整链路 | +| V11-P1-01 | trigger_update 参数嵌套导致更新失败 | **FIXED** | V12 Batch 7 中修复前端扁平参数 | +| V11-P1-02 | SaaS 配置同步不传播到 Rust Kernel | **FIXED** | V12 Batch 7 中修复完整链路 | | V11-P1-03 | 3 个 SQL 表零读取 (prompt_sync_status, telemetry_reports, key_usage_window) | **FALSE_POSITIVE** | telemetry_reports/key_usage_window 有活跃 JOIN 读取;prompt_sync_status 写无读(降级为 P3,需接通 get_sync_status 路由) | ### P2: 高优先级 | ID | 问题 | 状态 | 验证方法 | |----|------|------|----------| -| V11-P2-01 | saas-admin.ts 30 方法零消费者 | OPEN | grep 方法名在 desktop/src/ | -| V11-P2-02 | 7 个 Role/Permission 路由无前端消费者 | OPEN | admin-v2 无 roles service | +| V11-P2-01 | saas-admin.ts 30 方法零消费者 | **FALSE_POSITIVE** | 文件已于先前清理中删除 | +| V11-P2-02 | 7 个 Role/Permission 路由无前端消费者 | **FALSE_POSITIVE** | admin-v2 已有 roles service + Roles.tsx 页面 | | V11-P2-03 | deprecated gateway-storage sync 方法仍被生产代码调用 | **FALSE_POSITIVE** | gateway-client.ts 已将 sync 方法替换为 async,gateway-storage.ts 已删除 | -| V11-P2-04 | ToolDefinition 在 types 和 runtime 重复定义 | OPEN | 比较两个定义 | +| V11-P2-04 | ToolDefinition 在 types 和 runtime 重复定义 | **FALSE_POSITIVE** | zclaw_types::tool::ToolDefinition 为 canonical 定义,zclaw_runtime 仅 reexport | | V11-P2-05 | 62 个 Tauri 命令无前端调用 | OPEN | 逐一 grep invoke 调用 | -| V11-P2-06 | migration SQL 查询缺少 LIMIT | OPEN | 检查 config_items SELECT | +| V11-P2-06 | migration SQL 查询缺少 LIMIT | **FALSE_POSITIVE** | config_items 分页查询已有 LIMIT,fetch_all 仅同步场景下无 LIMIT(非用户数据批量场景,影响极小) | ### P3: 中优先级 @@ -110,8 +123,8 @@ | V11-P3-02 | OFP 能力定义无消费者 | OPEN | grep OfpDiscover | | V11-P3-03 | extract_structured_facts() deprecated 未移除 | OPEN | grep 调用者 | | V11-P3-04 | SaaS knowledge 3 个 handler 返回空数据 | OPEN | admin-v2 Knowledge 测试 | -| V11-P3-05 | Director 912 行 feature-gated 未启用 | OPEN | Cargo.toml 检查 | -| V11-P3-06 | 定时任务执行结果未持久化 | OPEN | scheduled_tasks schema | +| V11-P3-05 | Director 912 行 feature-gated 未启用 | **FALSE_POSITIVE** | #[cfg(feature = "multi-agent")] 正确门控,默认未启用 | +| V11-P3-06 | 定时任务执行结果未持久化 | OPEN | scheduled_tasks schema — | V11-P3-07 | secure-storage sync deprecated 零调用 | **FALSE_POSITIVE** | 同 AUDIT-01, gateway-storage.ts 已删除 | | V11-P3-08 | config 2 个预留参数未消费 | OPEN | grep batch_window_ms | @@ -214,9 +227,9 @@ | AUD3-FE-05 | 25+ 处 mixin `as any` | OPEN | gateway-heartbeat.ts 等 | | AUD3-FE-06 | PropertyPanel 17 处 `as any` | OPEN | PropertyPanel.tsx:100-276 | | AUD3-DB-01 | 无 down migration | OPEN | crates/zclaw-saas/migrations/ | -| AUD3-DB-02 | format! SQL 模式 | OPEN | agent_template/service.rs:136 | +| AUD3-DB-02 | format! SQL 模式 | **FALSE_POSITIVE** | 同 SEC2-P2-08,白名单+防御性验证已到位 | | AUD3-API-02 | 前端错误处理不统一 | OPEN | desktop/src/ | -| AUD3-CONC-02 | ~15 处 fire-and-forget tokio::spawn | OPEN | main.rs, relay/handlers.rs, scheduler.rs | +| AUD3-CONC-02 | ~15 处 fire-and-forget tokio::spawn | **FALSE_POSITIVE** | 与 SEC2-P2-05 相同,已添加 NOTE(fire-and-forget) 注释 | ### LOW: 低优先级