返回 Bug 清单
BUG-0884project-80中已修复docker-registry
非 cacheable tool 不再打 cache=miss 标记
发现:2026-10-09验证:2026-10-27置信度:70%
症状
commit 9c71860e0d05 (2026-09-20) fix(agent_tools): 非 cacheable tool 不再打 cache=miss 标记
根因
commit message 描述: fix(agent_tools): 非 cacheable tool 不再打 cache=miss 标记
修复方案
修复 1 行,删除 2 行。改动文件: backend/app/services/agent_tools.py
错误签名
fix(agent_tools): 非 cacheable tool 不再打 cache=miss 标记 之前 REGISTRY.execute 无条件给所有 tool result 加 metadata.cache='miss'
导致非 CACHEABLE_TOOLS (如 list_projects) 也带 cache 字段,语义混乱。
改为只在 using_cache=True 时才加 cache 标记。
ToolCache 验证通过:
#1 search_trademark (MISS) → Redis SET 300s ✅
#2 search_trademark (HIT) → 直接返回缓存 ✅
#3 list_projects (非 cacheable) → 无 cache 字段 ✅技术信息
来源项目
project-80
涉及文件
backend/app/services/agent_tools.py
标签
git-sweep, auto-ingested, project-80, mcp-reported, source-agent