归档本轮 P0/P1 bug 修复、设计审查迁移、AI selection scope 收口与 stream contract 调整,并保留当前 05 主线迁移起点。
2.0 KiB
2.0 KiB
7-23 [done][bug] mnote.doc.markdown_edit manifest schema 缺少 required 与写入字段 v1
发现时间:2026-05-17
状态:
[done]关联主线:
07-ai
1. 问题定义
mnote.doc.markdown_edit manifest 的 input schema 没有完整声明 required 字段,也缺少 dryRun、idempotencyKey 等写入合同字段。
这会让模型、ACP wrapper 和外部调用方无法从 manifest 得知真实写入要求。
2. 证据
- manifest.rs 附近定义
mnote.doc.markdown_editmanifest。 - 当前 schema 更像参数提示,没有完整表达写入前置条件。
3. 影响
- 调用方可能不传幂等字段或 dryRun 字段。
- tool toggle / schema validation 无法提前拒绝不合规请求。
- Reasonix / ACP 等多 runtime 接入时会继续复制不完整合同。
4. 建议修复
- 为
mnote.doc.markdown_edit补全 JSON Schema:required、互斥的operations/full_content、写入合同字段。 - manifest 与 Rust runtime 校验保持一致。
- 增加 manifest snapshot 测试,防止字段再次漂移。
5. 修复
已修复:
- manifest.rs
mnote.doc.markdown_edit改为复用统一write_toolschema 生成器。 - manifest.rs manifest 现在声明
dryRun、idempotencyKey与 actor/session/run/toolCall/trace 等写入合同字段。 - manifest.rs 通过
anyOf声明operations/full_content至少提供一个。 - hermes_tools.rs 增加 manifest 路由级测试,防止 schema 再次漂移。
6. 验证
cargo test --manifest-path rust/Cargo.toml -p mnote-web hermes_tools_manifest_describes_markdown_edit_write_contract -- --nocapture
结果:1 个测试通过。