实现 6 个修复单元(U1-U6)并应用 ce-code-review 发现的 5 项安全修复。 ## U1: benchmark 超时阈值 - 按 difficulty 分级超时:easy=45s, medium=60s, hard=90s - 替换原单一 60s 硬编码 ## U2: OpenAICompatibleProvider httpx 超时 - 新增 timeout 参数(默认 120s),替换硬编码 60s - ProviderConfig.timeout 透传到 Provider - 新增 2 项单元测试 ## U3: 激活 QualityGate skill_match 校验 - BaseAgent._build_skill_context() 构造 skill_context - 在 base.py / tasks.py / runner.py 三处传入 QualityGate.validate() ## U4: 添加 disambiguation_keywords 字段 - IntentConfig 新增 disambiguation_keywords 字段 - 8 个 skill YAML 补充该字段 ## U5: 优化 RequestPreprocessor 路由正则 - 拆分 _FACTUAL_RE 为 CN/EN 双正则(中文无空格) - 新增 _MATH_RE / _TRANSLATION_RE 纯模式 - _TOOL_CONTEXT_RE 排除需要工具的实时查询 - 多行输入守卫 + 结尾标点支持 - 新增 21 项单元测试(共 40 项全通过) ## U6: 重新基准测试 - 真实 LLM benchmark:准确率 60% -> 93.3% - 4/5 通过,p50=40.8s,一致性=100% - 旧基线备份至 baseline_2026-06-17_old_arch.json ## ce-code-review 修复(5 项) - 修复 \s 字符类匹配换行符的安全隐患 - 添加事实/数学正则的结尾标点支持 - 修复 geo_optimizer.yaml 关键词重复 - 修复 _login_with_retry 不可达 return - 修复 real_llm_server fixture stderr_fh 资源泄漏 测试:tests/unit/chat/ 63 项全通过,ruff 检查通过。 |
||
|---|---|---|
| .. | ||
| test_request_preprocessor.py | ||
| test_skill_routing.py | ||
| test_sqlite_conversation_store.py | ||