zcbot/tests
caoqianming 087980d027 test(prompt): 锁住 docker 下 system prompt 不漏宿主路径(药3 复核收口)
高轮数烧 token 诊断的最后一味:复核「不停 glob /home/ubuntu/zcbot」幽灵路径。
证据链确认是 2026-06-03「system prompt 焊死宿主路径」那个 bug 的历史残影——
失败 task(ab063233 06-02 / ff1686b7 06-03)首条 assistant tool_calls 即带宿主
路径+真 uid(只可能来自当时运行时拼接的 system prompt;messages 表无 system-role
行),两者均建于修复前后。fs 工具在 docker 容器跑、容器无此宿主路径 → base
path not found → 重试风暴(实测 51 次)。

复核当前代码:docker 模式即便传 tool_base=/home/ubuntu/zcbot + 真 uid,prompt
只含 /workspace/<wd>、不漏宿主路径/uid/tmp(agent_builder.py docker 分支)。
新增 tests/test_system_prompt_paths.py(2 例)钉死防回归。三味药全部收口;
药1 重复守卫此后兜底同类风暴。无功能代码改动。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 11:30:32 +08:00
..
frontend_task_progress.test.mjs Show task progress above composer 2026-06-08 09:04:43 +08:00
test_context_compaction.py fix(progress): 停压 task_progress 参数修进度还原 + 进度区移到对话区顶部 2026-06-08 09:52:44 +08:00
test_disk_quota.py Stage C 收尾包:资源 yaml + 磁盘配额 + 网络放开 + 容器内源持久化 2026-05-27 08:35:53 +08:00
test_executor_docker.py Reduce chat context token usage 2026-06-04 16:41:14 +08:00
test_load_skill.py fix(skill_tool): docker backend 下返回容器路径而非 host 绝对路径 2026-05-28 13:37:19 +08:00
test_loop_repeat_guard.py feat(tools+loop): 批量抓取 + 重复调用守卫 —— 治高轮数烧 token 2026-06-08 16:47:56 +08:00
test_run_python_script_path.py Reduce chat context token usage 2026-06-04 16:41:14 +08:00
test_sandbox_check.py Stage C Step 5: main.py sandbox check + lifespan fs quota WARN 2026-05-26 16:41:16 +08:00
test_secret_host_tools.py feat(tools+loop): 批量抓取 + 重复调用守卫 —— 治高轮数烧 token 2026-06-08 16:47:56 +08:00
test_static_vendor.py Disable static asset caching 2026-06-08 09:16:31 +08:00
test_system_prompt_paths.py test(prompt): 锁住 docker 下 system prompt 不漏宿主路径(药3 复核收口) 2026-06-09 11:30:32 +08:00
test_task_progress_tool.py Add task progress tool 2026-06-08 08:44:16 +08:00
test_tool_output_compaction.py Reduce chat context token usage 2026-06-04 16:41:14 +08:00
test_usage_accounting.py feat(usage): 记账给前缀缓存命中折价 + 前端体现缓存命中/真实成本 2026-06-05 08:26:09 +08:00