Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion examples/openclaw-plugin/tests/e2e/test-archive-expand.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@
3. LLM 后端可达(Gateway 需要调用 LLM 生成回复和触发工具调用)
4. 有效的 Gateway auth token(通过 --token 传入或自动发现)
关键 openclaw.json 配置:
- plugins.slots.contextEngine = "openviking"
- plugins.entries.openviking.enabled = true
- plugins.entries.openviking.config.autoCapture = true
- plugins.entries.openviking.config.commitTokenThreshold = 50
↑ 此值控制 auto-commit 时机。32 轮对话需要多次 auto-commit 产生归档,
若值过大可能导致归档数不足。建议 <= 5000。
- agents.defaults.alsoAllow = ["ov_archive_expand"]
↑ 必须显式允许 ov_archive_expand 工具,否则 LLM 无法调用
服务部署参考:
- OpenViking: openviking-server(HTTP 默认 2934,AGFS 默认 2833)
- Gateway: openclaw gateway(HTTP 默认 19789)
Expand Down Expand Up @@ -132,7 +142,33 @@
在 Phase 4 前重启 Gateway 清除工作记忆,强制走归档展开路径。
================================================================================
六、预期结果
六、已知限制
================================================================================
1. LLM 是否调用 ov_archive_expand:
不同模型对工具调用的倾向性不同。如果模型直接从 archive overview 摘要
中推测答案而不展开归档,关键词可能命中(摘要恰好包含)也可能不命中。
使用 --gateway-restart-cmd 可强制清除工作记忆,迫使走归档展开路径。
2. 关键词精确匹配:
数字格式差异可能导致匹配失败(如 "12000" vs "12,000" vs "1.2万")。
Q4 的 "12000" 在实际测试中因 LLM 输出 "12,000" 而未命中,但整体命中率
仍达 67% 超过 50% 阈值。
3. 测试耗时:
完整测试需要 32 轮对话 + 验证 + 追问,约 10-15 分钟。如需快速验证,可
使用 --phase expand 单独跑追问阶段(前提是已有归档数据)。
4. 对话顺序依赖:
4 批对话必须按顺序执行(Phase 1 → 2a → 2b → 2c),因为后续批次的归档
编号依赖前序批次。不能单独跑 chat2 而跳过 chat1。
5. 环境要求:
Gateway 必须配置 OpenViking 插件且启用 ov_archive_expand 工具定义,
否则 LLM 无法调用归档展开。
================================================================================
七、预期结果
================================================================================
15/15 断言全部通过:
Expand Down
Loading
Loading