iven
|
beeb529d8f
|
test(protocols,skills): add 90 tests for MCP types + skill loader/runner
zclaw-protocols: +43 tests covering mcp_types serde, ContentBlock
variants, transport config builders, and domain type roundtrips.
zclaw-skills: +47 tests covering SKILL.md/TOML parsing, auto-classify,
PromptOnlySkill execution, and SkillManifest/SkillResult roundtrips.
Batch 8 of audit plan (plans/stateless-petting-rossum.md).
|
2026-04-19 11:24:57 +08:00 |
|
iven
|
226beb708b
|
Merge branch 'chore/sqlx-0.8-upgrade'
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
sqlx 0.7→0.8 unified, resolves dual-version from pgvector.
|
2026-04-19 11:15:17 +08:00 |
|
iven
|
dc7a1d5400
|
chore(deps): upgrade sqlx 0.7→0.8 + libsqlite3-sys 0.27→0.30
Unifies dual sqlx versions caused by pgvector 0.4 pulling sqlx 0.8.x
as indirect dependency. Zero source code changes required, 719/719
tests pass.
Batch 3 of audit plan (plans/stateless-petting-rossum.md).
|
2026-04-19 11:15:05 +08:00 |
|
iven
|
d9b0b4f4f7
|
fix(audit): Batch 7-9 dead_code 标注 + TODO 清理 + 文档同步
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
|
2026-04-19 08:54:57 +08:00 |
|
iven
|
edd6dd5fc8
|
fix(audit): Batch 4-6 中间件注释 + 依赖迁移 + 安全加固
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 4:
- kernel/mod.rs: 添加中间件注册顺序≠执行顺序注释
- EvolutionMiddleware 注册处标注 priority=78
Batch 5:
- desktop/src-tauri/Cargo.toml: serde_yaml 0.9 (deprecated) → serde_yaml_bw 2.x
Batch 6:
- saas/main.rs: CORS 开发模式改为显式 localhost origins (修复 Any+credentials 违规)
- docker-compose.yml: 移除默认弱密码 your_secure_password,改为必填校验
- director.rs: 用户输入添加 <user_input>/<user_request> 边界标记防注入
全量测试通过: 719 passed, 0 failed
|
2026-04-19 08:46:12 +08:00 |
|
iven
|
4329bae1ea
|
fix(audit): Batch 2 生产代码 unwrap 替换 (20 处)
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
P0 修复:
- viking_commands.rs: URI 路径构建 unwrap → ok_or_else 错误传播
- clip.rs: 临时文件路径 unwrap → ok_or_else (防 Windows 中文路径 panic)
P1 修复:
- personality_detector.rs: Mutex lock unwrap → unwrap_or_else 防中毒传播
- pptx.rs: HashMap.get unwrap → expect (来自 keys() 迭代)
P2 修复:
- 4 处 SystemTime.unwrap → expect("system clock is valid")
- 4 处 dev_server URL.parse.unwrap → expect("hardcoded URL is valid")
- 9 处 nl_schedule Regex.unwrap → expect("static regex is valid")
- 5 处 data_masking Regex.unwrap → expect("static regex is valid")
- 2 处 pipeline/state Regex.unwrap → expect("static regex is valid")
全量测试通过: 719 passed, 0 failed
|
2026-04-19 08:38:09 +08:00 |
|
iven
|
924ad5a6ec
|
fix(audit): Batch 0-1 文档校准 + let _ = 静默错误修复
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 0:
- TRUTH.md 中间件层 14→15 (补 EvolutionMiddleware@78)
- wiki/middleware.md 同步 15 层 + 优先级分类更新
- Store 数字确认 25 个
Batch 1:
- approvals.rs: 3 处 map_err+let _ = 简化为 if let Err
- director.rs: oneshot send 失败添加 debug 日志
- task.rs: 4 处子任务状态更新添加 debug 日志
- chat.rs: 流消息发送和事件 emit 添加 warn/debug 日志
- heartbeat.rs: 告警广播添加 debug 日志 + break 优化
全量测试通过: 719 passed, 0 failed
|
2026-04-19 08:30:33 +08:00 |
|
iven
|
e94235c4f9
|
fix(growth): Evolution Engine 穷尽审计 3CRITICAL + 3HIGH 全部修复
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
C-01: ExperienceExtractor 接入 ExperienceStore
- GrowthIntegration.new() 创建 ExperienceExtractor 时注入 ExperienceStore
- 经验持久化路径打通:extract_combined → persist_experiences → ExperienceStore
C-02+C-03: 进化触发链路全链路接通
- create_middleware_chain() 注册 EvolutionMiddleware (priority 78)
- MemoryMiddleware 持有 Arc<EvolutionMiddleware> 共享引用
- after_completion 中调用 check_evolution() → 推送 PendingEvolution
- EvolutionMiddleware 在下次对话前注入进化建议到 system prompt
H-01: FeedbackCollector loaded 标志修复
- load() 失败时保留 loaded=false,下次 save 重试
- 日志级别 debug → warn
H-03: FeedbackCollector 内部可变性
- EvolutionEngine.feedback 改为 Arc<Mutex<FeedbackCollector>>
- submit_feedback() 从 &mut self → &self,支持中间件 &self 调用路径
- GrowthIntegration.initialize() 从 &mut self → &self
H-05: 删除空测试 test_parse_empty_response (无 assert)
H-06: infer_experiences_from_memories() fallback
- Outcome::Success → Outcome::Partial (反映推断不确定性)
|
2026-04-19 00:43:02 +08:00 |
|
iven
|
72b3206a6b
|
fix(growth): AUD-11 反馈信任度启动集成 + AUD-12 日志格式优化
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
AUD-11: FeedbackCollector 内部 lazy-load 机制
- save() 首次调用自动从持久化存储加载信任度记录
- load() 使用 or_insert 策略,不覆盖内存中较新记录
- GrowthIntegration.initialize() 保留为可选优化入口
- 移除无法在 &self 中间件中使用的 ensure_feedback_loaded
AUD-12: 日志格式优化
- ProfileSignals 新增 signal_count() 方法
- extractor.rs 使用 signal_count() 替代 has_any_signal() as usize
|
2026-04-19 00:15:50 +08:00 |
|
iven
|
0fd78ac321
|
fix: 全面审计修复 — P0 功能缺陷 + P1 代码质量
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
P0 功能修复:
- stats: Admin V2 仪表盘 API 路径修正 (/stats/dashboard → /admin/dashboard)
- mcp: 桌面端 MCP 插件增加 isTauriRuntime() 守卫,避免浏览器模式崩溃
- admin: 侧边栏高亮逻辑修复 (startsWith → 精确匹配+子路径)
P1 代码质量:
- 删除 workflowBuilderStore.ts 死代码 (456行,零引用)
- sqlite.rs 3 处 SQL 静默失败改为 tracing::warn! 日志
- mcp_tool_adapter 2 处 unwrap 改为安全回退
- orchestration_execute 添加 @reserved 标注
- TRUTH.md 测试数字校准 (734→803),Store 数 26→25
|
2026-04-18 23:57:03 +08:00 |
|
iven
|
ab4d06c4d6
|
fix(growth): 审计修复 — CRITICAL 编译错误 + LOW 静默数据丢失
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
- CRITICAL: extraction_adapter.rs extract_with_prompt() 使用不存在的
zclaw_types::Error::msg(),改为 ZclawError::InvalidInput/ZclawError::LlmError
- LOW: feedback_collector.rs save() 中 serde_json::to_string().unwrap_or_default()
改为显式错误处理 + warn 日志 + continue,避免静默存空数据
|
2026-04-18 23:30:58 +08:00 |
|
iven
|
1595290db2
|
fix(growth): MEDIUM-12 ProfileUpdater 补齐 5 维度画像更新
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
根因: ProfileUpdater 只处理 industry 和 communication_style 2/5 维度,
跳过 recent_topic、pain_point、preferred_tool。
修复:
- ProfileFieldUpdate 添加 kind 字段 (SetField | AppendArray)
- collect_updates() 现在处理全部 5 个维度:
- industry, communication_style → SetField (直接覆盖)
- recent_topic, pain_point, preferred_tool → AppendArray (追加去重)
- growth.rs 根据 ProfileUpdateKind 分派到不同的 UserProfileStore 方法:
- SetField → update_field()
- AppendArray → add_recent_topic() / add_pain_point() / add_preferred_tool()
- ProfileUpdateKind re-exported from lib.rs
测试: test_collect_updates_all_five_dimensions 验证 5 个维度 + 2 种更新类型
|
2026-04-18 23:07:31 +08:00 |
|
iven
|
2c0602e0e6
|
fix(growth): HIGH-3 FeedbackCollector 信任度持久化
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
根因: FeedbackCollector 用纯内存 HashMap 存储信任度记录,重启后归零。
修复:
- FeedbackCollector 添加 viking: Option<Arc<VikingAdapter>> 字段
- 添加 with_viking() 构造器
- 添加 save(): 遍历 trust_records → MemoryEntry → VikingAdapter 存储
- 添加 load(): find_by_prefix 反序列化回 HashMap
- EvolutionEngine::new()/from_experience_store() 传入 VikingAdapter
- submit_feedback() 改为 async,提交后自动调用 save()
- 添加 load_feedback() 供启动时恢复
测试: save_and_load_roundtrip + load_without_viking + save_without_viking
|
2026-04-18 23:03:31 +08:00 |
|
iven
|
f358f14f12
|
fix(growth): 穷尽审计修复 — tracker timeline 断链 + 文档更新
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
P1-1: tracker.rs record_learning 改为通过 MemoryEntry 存储
(之前用 store_metadata 存但 get_timeline 用 find_by_prefix 读,
两条路径不交叉,timeline 永远返回空)
P2-4: extractor.rs 移除未使用的 _llm_driver 绑定,改为 is_none() 检查
P2-5: lib.rs 模块文档更新,反映实际 17 个模块而非原始 4 个
profile_updater.rs: 添加注释说明只收集 update_field 支持的字段
测试: zclaw-growth 137 tests, zclaw-runtime 87 tests, 0 failures
|
2026-04-18 23:01:04 +08:00 |
|
iven
|
7cdcfaddb0
|
fix(growth): MEDIUM-10 Experience 添加 tool_used 字段
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
根因: Experience 结构体没有 tool_used 字段,PatternAggregator 从
context 字段提取工具名(语义混淆),导致工具信息不准确。
修复:
- experience_store.rs: Experience 添加 tool_used: Option<String> 字段
(#[serde(default)] 兼容旧数据),Experience::new() 初始化为 None
- experience_extractor.rs: persist_experiences() 从 ExperienceCandidate
的 tools_used[0] 填充 tool_used,同时填充 industry_context
- pattern_aggregator.rs: 改用 tool_used 字段提取工具名,不再误用 context
- store_experience() 将 tool_used 加入 keywords 提升搜索命中率
|
2026-04-18 22:58:47 +08:00 |
|
iven
|
3c6581f915
|
fix(growth): HIGH-6 修复 extract_combined 合并提取空壳
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
根因: growth.rs 构造 CombinedExtraction 时硬编码 experiences: Vec::new()
和 profile_signals: default(),导致 L1 结构化经验不被提取、L2 技能进化
没有输入数据、整个进化引擎无法端到端工作。
修复:
- extractor.rs: 添加 COMBINED_EXTRACTION_PROMPT 统一 prompt,单次 LLM 调用
同时输出 memories + experiences + profile_signals
- extractor.rs: 添加 parse_combined_response() 解析 LLM JSON 响应
- LlmDriverForExtraction trait: 添加 extract_with_prompt() 方法(默认不支持,
退化到现有 extract() + 启发式推断)
- MemoryExtractor: 添加 extract_combined() 方法,优先单次调用,失败则退化
- growth.rs: extract_combined() 使用新的合并提取替代硬编码空值
- TauriExtractionDriver: 实现 extract_with_prompt()
- ProfileSignals: 添加 has_any_signal() 方法
- types.rs: ProfileSignals 无 structural 变化(字段已存在)
测试: 4 个新测试(parse_combined_response_full/minimal/invalid +
extract_combined_fallback),11 个 extractor 测试全部通过
|
2026-04-18 22:56:42 +08:00 |
|
iven
|
cb727fdcc7
|
fix(growth): 二次审计修复 — 6项 CRITICAL/HIGH/MEDIUM 全部修复
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
CRITICAL-1/2: json_utils 花括号匹配改为括号平衡算法
- 处理字符串字面量中的花括号和转义引号
- 新增 5 个测试(平衡匹配、字符串内花括号、转义引号、extract_string_array)
HIGH-4: EvolutionMiddleware 只取第一个事件(remove(0)),不丢弃后续
HIGH-5: EvolutionMiddleware 先 read() 判空再 write(),减少锁竞争
HIGH-7: from_experience_store 使用传入 store 的 viking 实例(不再忽略参数)
- ExperienceStore 新增 viking() getter
MEDIUM-9: skill_generator + workflow_composer JSON 数组解析去重
- 新增 json_utils::extract_string_array() 共享函数
MEDIUM-14: EvolutionMiddleware 注入文本去除多余缩进空格
测试: zclaw-growth 133 tests, zclaw-runtime 87 tests, workspace 0 failures
|
2026-04-18 22:30:10 +08:00 |
|
iven
|
a9ea9d8691
|
fix(growth): Evolution Engine 审计修复 — 7项全部完成
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
HIGH-1: 提取共享 json_utils.rs,skill_generator/workflow_composer 去重
HIGH-2: FeedbackCollector Vec→HashMap,消除 unwrap() panic 风险
HIGH-3: ProfileUpdater 改为 collect_updates() 返回字段列表,
growth.rs 直接 async 调用 update_field(),不再用 no-op 闭包
MEDIUM-1: EvolutionMiddleware 注入后自动 drain,防止重复注入
MEDIUM-2: PatternAggregator tools 提取改为直接收集 context 值
MEDIUM-3: evolution_engine.rs 移除 4 个未使用 imports
MEDIUM-4: workflow_composer parse_response pattern 参数加下划线
MEDIUM-7: SkillCandidate 添加 version 字段(默认=1)
测试: zclaw-growth 128 tests, zclaw-runtime 86 tests, workspace 0 failures
|
2026-04-18 22:15:43 +08:00 |
|
iven
|
f97e6fdbb6
|
feat: Evolution Engine Phase 3-5 — WorkflowComposer+FeedbackCollector+EvolutionMiddleware+反馈闭环
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
Phase 3:
- EvolutionMiddleware (priority 78): 管家对话中注入进化确认提示
- GrowthIntegration.check_evolution() API 串入
Phase 4:
- WorkflowComposer: 轨迹工具链模式聚类 + Pipeline YAML prompt 构建 + JSON 解析
- EvolutionEngine.analyze_trajectory_patterns() L3 入口
Phase 5:
- FeedbackCollector: 反馈信号收集 + 信任度管理 + 推荐(Optimize/Archive/Promote)
- EvolutionEngine 反馈闭环方法: submit_feedback/get_artifacts_needing_optimization
新增 12 个测试(111→123),全 workspace 701 测试通过。
|
2026-04-18 21:27:59 +08:00 |
|
iven
|
7d03e6a90c
|
feat(runtime): GrowthIntegration 串入 EvolutionEngine — L2 触发检查 API
|
2026-04-18 21:17:48 +08:00 |
|
iven
|
415abf9e66
|
feat(growth): L2 技能进化核心 — PatternAggregator+SkillGenerator+QualityGate+EvolutionEngine
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
- PatternAggregator: 经验模式聚合,找出 reuse_count>=threshold 的可固化模式
- SkillGenerator: LLM prompt 构建 + JSON 解析 + 自动提取 JSON 块
- QualityGate: 置信度/冲突/格式质量门控
- EvolutionEngine: 中枢调度器,协调 L2 触发检查+技能生成+质量验证
新增 24 个测试(87→111),全 workspace 0 error。
|
2026-04-18 21:09:48 +08:00 |
|
iven
|
8d218e9ab9
|
feat(runtime): GrowthIntegration 串入 ExperienceExtractor + ProfileUpdater
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
|
2026-04-18 21:01:04 +08:00 |
|
iven
|
e2d44ecf52
|
feat(growth): ExperienceExtractor + ProfileUpdater — 结构化经验提取和画像增量更新
|
2026-04-18 20:51:17 +08:00 |
|
iven
|
8ec6ca5990
|
feat(growth): 扩展 LlmDriverForExtraction — 新增 extract_combined_all 默认实现
|
2026-04-18 20:48:09 +08:00 |
|
iven
|
7e8eb64c4a
|
feat(growth): 新增 Evolution Engine 核心类型 — ExperienceCandidate/CombinedExtraction/EvolutionEvent
|
2026-04-18 20:47:30 +08:00 |
|
iven
|
e88c51fd85
|
docs(wiki): 发布前审计数值校准 — TRUTH/CLAUDE/wiki 三端同步
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
TRUTH.md:
- #[test] 433→425, #[tokio::test] 368→309 (2026-04-18 验证)
- Zustand Store 21→26, Admin V2 页面 15→17
- Pipeline YAML 17→18
- Hands 启用 9→7 (6 HAND.toml + _reminder),Whiteboard/Slideshow/Speech 标注开发中
CLAUDE.md §6:
- Hands 12 个能力包 (7 注册 + 3 开发中 + 2 禁用)
- §13 架构快照同步
wiki/index.md:
- 关键数字同步更新
|
2026-04-18 14:09:47 +08:00 |
|
iven
|
e10549a1b9
|
fix: 发布前审计 Batch 2 — Debug遮蔽 + unwrap + 静默吞错 + MCP锁 + 索引 + Config验证
安全:
- LlmConfig 自定义 Debug impl,api_key 显示为 "***REDACTED***"
- tsconfig.json 移除 ErrorBoundary.tsx 排除项(安全关键组件)
- billing/handlers.rs Response builder unwrap → map_err 错误传播
- classroom_commands/mod.rs db_path.parent().unwrap() → ok_or_else
静默吞错:
- approvals.rs 3处 warn→error(审批状态丢失是严重事件)
- events.rs publish() 添加 Event dropped debug 日志
- mcp_transport.rs eprintln→tracing::warn (僵尸进程风险)
- zclaw-growth sqlite.rs 4处迁移:区分 duplicate column name 与真实错误
MCP Transport:
- 合并 stdin+stdout 为单一 Mutex<TransportHandles>
- send_request write-then-read 原子化,防止并发响应错配
数据库:
- 新迁移 20260418000001: idx_rle_created_at + idx_billing_sub_plan + idx_ki_created_by
配置验证:
- SaaSConfig::load() 添加 jwt_expiration_hours>=1, max_connections>0, min<=max
|
2026-04-18 14:09:36 +08:00 |
|
iven
|
f3fb5340b5
|
fix: 发布前审计 Batch 1 — Pipeline 内存泄漏/超时 + Director 死锁 + Rate Limit Worker
Pipeline executor:
- 添加 cleanup() 方法,MAX_COMPLETED_RUNS=100 上限淘汰旧记录
- 每步执行添加 tokio::time::timeout(使用 PipelineSpec.timeout_secs,默认 300s)
- Delay ms 上限 60000,超出 warn 并截断
Director send_to_agent:
- 重构为 oneshot::channel 响应模式,避免 inbox + pending_requests 锁竞争
- 添加 ensure_inbox_reader() 独立任务分发响应到对应 oneshot sender
cleanup_rate_limit Worker:
- 实现 Worker body: DELETE FROM rate_limit_events WHERE created_at < NOW() - INTERVAL '1 hour'
651 tests passed, 0 failed
|
2026-04-18 14:09:16 +08:00 |
|
iven
|
35a11504d7
|
docs(wiki): 审计后续修复记录
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
|
2026-04-18 09:24:25 +08:00 |
|
iven
|
450569dc88
|
fix: 审计后续 3 项修复 — 残留清理 + FTS5 CJK + HTTP 大小限制
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
1. Shell Hands 残留清理 (3处):
- message.rs: 移除过时的 zclaw_hands::slideshow 注释
- user_profiler.rs: slideshow 偏好改为 RecentTopic
- handStore.test.ts: 移除 speech mock 数据 (3→2)
2. zclaw-growth FTS5 CJK 查询修复:
- sanitize_fts_query CJK 路径从精确短语改为 token OR 组合
- "Rust 编程" → "rust" OR "编程" (之前是 "rust 编程" 精确匹配)
- 修复 test_memory_lifecycle + test_semantic_search_ranking
3. WASM HTTP 响应大小限制:
- Content-Length 预检 + 读取后截断 (1MB 上限)
- read_to_string 改为显式错误处理
651 测试全通过,0 失败。
|
2026-04-18 09:23:58 +08:00 |
|
iven
|
3a24455401
|
docs(wiki): 深度审计修复记录
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
|
2026-04-18 09:11:37 +08:00 |
|
iven
|
4e4eefdde1
|
fix: 深度审计修复 — WASM 安全加固 + A2A 编译路径 + 测试编译
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
CRITICAL:
- zclaw_file_read: 路径遍历修复 — 组件级过滤替代前缀检查
- zclaw_http_fetch: SSRF 防护 — URL scheme 白名单 + 私有IP段阻止
- Phase 4A: 移除 zclaw-protocols a2a feature gate, A2A 始终编译
- 移除 kernel/desktop multi-agent feature (不再控制任何代码)
MEDIUM:
- user_profiler: FactCategory cfg(test) 导入修复 (563 测试全通过)
|
2026-04-18 09:11:15 +08:00 |
|
iven
|
0522f2bf95
|
docs: CLAUDE.md 架构快照更新 — 记忆管道 E2E + 最近变更排序
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
|
2026-04-18 08:18:39 +08:00 |
|
iven
|
04f70c797d
|
docs(wiki): Phase 4A/4B 记录 — multi-agent gate 移除 + WASM host 函数
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
|
2026-04-18 08:18:28 +08:00 |
|
iven
|
a685e97b17
|
feat(skills): WASM host 函数真实实现 — zclaw_log/http_fetch/file_read (Phase 4B)
替换 stub 为真实实现:
- zclaw_log: 读取 guest 内存并 log
- zclaw_http_fetch: ureq v3 同步 GET (10s timeout, network_allowed 守卫)
- zclaw_file_read: 沙箱 /workspace 目录读取 (路径校验防逃逸)
添加 ureq v3 workspace 依赖, 25 测试全通过。
|
2026-04-18 08:18:08 +08:00 |
|
iven
|
2037809196
|
refactor(kernel): 移除 multi-agent feature gate — 33处 cfg 全部删除 (Phase 4A)
8 个文件移除 #[cfg(feature = "multi-agent")],zclaw-kernel default features
新增 multi-agent。A2A 路由、agents、adapters 现在始终编译。
|
2026-04-18 08:17:58 +08:00 |
|
iven
|
eaa99a20db
|
feat(ui): Feature Gates 设置页 — 实验性功能开关 (Phase 3B)
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
新增 Settings > 实验性功能 页面:
- 3 个开关: 多 Agent 协作 / WASM 技能沙箱 / 详细工具输出
- localStorage 持久化 + isFeatureEnabled() 公共 API
- 实验性功能警告横幅
- 当前为前端运行时开关,未来可对接 Kernel config
|
2026-04-18 08:05:06 +08:00 |
|
iven
|
a38e91935f
|
docs(wiki): Phase 3A loop_runner 双路径合并记录
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
|
2026-04-17 21:56:34 +08:00 |
|
iven
|
5687dc20e0
|
refactor(runtime): loop_runner 双路径合并 — 统一走 middleware chain (Phase 3A)
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
middleware_chain 从 Option<MiddlewareChain> 改为 MiddlewareChain:
- 移除 6 处 use_middleware 分支 + 2 处 legacy loop_guard inline path
- 移除 loop_guard field + Mutex import + circuit_breaker_triggered 变量
- 空 chain (Default) 行为等价于 middleware path 中的 no-op
- 1154行 → 1023行,净减 131 行
- cargo check --workspace ✓ | cargo test ✓ (排除 desktop 预存编译问题)
|
2026-04-17 21:56:10 +08:00 |
|
iven
|
21c3222ad5
|
docs(wiki): Phase 2A Pipeline 解耦记录
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
|
2026-04-17 20:10:34 +08:00 |
|
iven
|
5381e316f0
|
refactor(pipeline): 移除空的 zclaw-kernel 依赖 (Phase 2A)
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
Pipeline 代码中无任何 zclaw_kernel 引用,依赖声明是遗留物。
移除后编译验证通过: cargo check --workspace --exclude zclaw-saas ✓
|
2026-04-17 20:10:21 +08:00 |
|
iven
|
96294d5b87
|
docs(wiki): Phase 2B saasStore 拆分记录
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
|
2026-04-17 20:05:57 +08:00 |
|
iven
|
e3b6003be2
|
refactor(store): saasStore 拆分为子模块 (Phase 2B)
1025行单文件 → 5个文件 + barrel re-export:
- saas/types.ts (103行) — 类型定义
- saas/shared.ts (93行) — Device ID、常量、recovery probe
- saas/auth.ts (362行) — 登录/注册/登出/恢复/TOTP
- saas/billing.ts (84行) — 计划/订阅/支付
- saas/index.ts (309行) — Store 组装 + 连接/模板/配置
- saasStore.ts (15行) — re-export barrel(外部零改动)
所有 25+ 消费者 import 路径不变,`tsc --noEmit` ✓
|
2026-04-17 20:05:43 +08:00 |
|
iven
|
f9f5472d99
|
docs(wiki): Phase 5 移除空壳 Hand 记录
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
|
2026-04-17 19:56:32 +08:00 |
|
iven
|
cb9e48f11d
|
refactor(hands): 移除空壳 Hand — Whiteboard/Slideshow/Speech (Phase 5)
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
删除 3 个仅含 UI 占位的 Hand,清理 Rust 实现与前端引用:
- Rust: whiteboard.rs(422行) + slideshow.rs(797行) + speech.rs(442行)
- 前端: WhiteboardCanvas + SlideshowRenderer + speech-synth + 相关类型/常量
- 配置: 3 个 HAND.toml
- 净减 ~5400 行,Hands 9→6(启用) + Quiz/Browser/Researcher/Collector/Clip/Twitter/Reminder
|
2026-04-17 19:55:59 +08:00 |
|
iven
|
14fa7e150a
|
docs(wiki): Phase 1 错误体系重构记录
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
|
2026-04-17 19:38:47 +08:00 |
|
iven
|
f9290ea683
|
feat(types): 错误体系重构 — ErrorKind + error code + Serialize
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
Rust (crates/zclaw-types/src/error.rs):
- 新增 ErrorKind enum (17 种) + Serde Serialize/Deserialize
- 新增 error_codes 模块 (稳定错误码 E4040-E5110)
- ZclawError 新增 kind() / code() 方法
- 新增 ErrorDetail struct + Serialize impl
- 保留所有现有变体和构造器 (零破坏性)
- 新增 12 个测试: kind 映射 + code 稳定性 + JSON 序列化
TypeScript (desktop/src/lib/error-types.ts):
- 新增 RustErrorKind / RustErrorDetail 类型定义
- 新增 tryParseRustError() 结构化错误解析
- 新增 classifyRustError() 按 ErrorKind 分类
- classifyError() 优先解析结构化错误,fallback 字符串匹配
- 17 种 ErrorKind → 中文标题映射
验证: cargo check ✓ | tsc ✓ | 62 zclaw-types tests ✓
|
2026-04-17 19:38:19 +08:00 |
|
iven
|
0754ea19c2
|
docs(wiki): Phase 0 修复记录 — 流式事件/CI/中文化
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
|
2026-04-17 18:13:43 +08:00 |
|
iven
|
2cae822775
|
fix: Phase 0 阻碍项修复 — 流式事件错误处理 + CI 排除 + UI 中文化
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
BLK-2: loop_runner.rs 22 处 let _ = tx.send() 全部替换为
if let Err(e) { tracing::warn!(...) },修复流式事件静默丢失问题
BLK-5: 50+ 英文字符串翻译为中文
- HandApprovalModal.tsx (~40处): 风险标签/按钮/状态/表单标签
- ChatArea.tsx: Thinking.../Sending...
- AuditLogsPanel.tsx: 空状态文案
- HandParamsForm.tsx: 空列表提示
- CreateTriggerModal.tsx: 成功提示
- MessageSearch.tsx: 时间筛选/搜索历史
BLK-6: CI/Release workflow 添加 --exclude zclaw-saas
- ci.yml: clippy/test/build 三个步骤
- release.yml: test 步骤
验证: cargo check ✓ | tsc --noEmit ✓
|
2026-04-17 18:12:42 +08:00 |
|
iven
|
93df380ca8
|
docs(wiki): BUG-M4/L1 已修复 + wiki 数字更新
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
- BUG-M4 标记为已修复 (admin_guard_middleware)
- BUG-L1 标记为已验证修复 (代码已统一为 pain_seed_categories)
- E2E 04-17 MEDIUM/LOW 全部关闭
- butler.md/log.md: pain_seeds → pain_seed_categories
|
2026-04-17 11:46:04 +08:00 |
|