30 lines
1.2 KiB
Markdown
30 lines
1.2 KiB
Markdown
# 7-48 Mindmap create_from_outline envelope 单测缺少 embed 边界
|
||||
|
|
|
|||
|
|
## 状态
|
|||
|
|
|
|||
|
|
- 状态:done
|
|||
|
|
- Owner:07-ai / Hermes tools / mindmap resource
|
|||
|
|
- 发现时间:2026-05-31
|
|||
|
|
- 修复时间:2026-05-31
|
|||
|
|
|
|||
|
|
## 现象
|
|||
|
|
|
|||
|
|
`cargo test --manifest-path rust/Cargo.toml -p mnote-web --lib hermes_tools_mindmap -- --test-threads=1` 中 `hermes_tools_mindmap_create_from_outline_writes_default_envelope` 失败,返回:
|
|||
|
|
|
|||
|
|
```text
|
|||
|
|
mnote_resource_page_not_found: 找不到要绑定 mindmap 的本地 Markdown 页面
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## 根因
|
|||
|
|
|
|||
|
|
该用例只验证 `mnote.mindmap.create_from_outline` 生成默认 `.mindmap.json` envelope,但 payload 未显式设置 `embedIntoPage`。当前工具合同中 `embedIntoPage` 默认是 `true`,而测试 fixture 没有创建 `README.md`,导致资源文件写入后进入页面 embed 阶段并失败。
|
|||
|
|
|
|||
|
|
## 修复
|
|||
|
|
|
|||
|
|
- 在纯 envelope 写入用例里显式设置 `embedIntoPage: false`。
|
|||
|
|
- 保留另一个 `hermes_tools_mindmap_create_from_outline_can_embed_into_local_markdown_page` 用例继续覆盖显式 `embedIntoPage=true` 的页面绑定行为。
|
|||
|
|
|
|||
|
|
## 验证
|
|||
|
|
|
|||
|
|
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web --lib hermes_tools_mindmap -- --test-threads=1`
|