归档本轮 P0/P1 bug 修复、设计审查迁移、AI selection scope 收口与 stream contract 调整,并保留当前 05 主线迁移起点。
2.4 KiB
2.4 KiB
11 [done] 当前完整架构 Review v1
更新时间:2026-05-17
状态:
done参考总文档:CURRENT_ARCHITECTURE.md
1. 结论
当前 mnote 的主线架构已经成形。本轮 review 识别出的 P0 / 内核优先缺陷已完成代码修复、文档迁移和定向验证。
已修复的四个关键冲突:
- Tree realtime 的发布口径与前端消费口径不一致。
- FileTree 资源行误走页面命令。
- Page Aggregate / AI context 保留前端第二真相。
- AI 写入链路在
markdown_edit、apply_block_ops、Hermes / ACP / Reasonix 之间的合同漂移。
仍需后续主线继续推进的不是本轮 P0 bug,而是长期架构收口:Page Aggregate 原生 EditorBlockDocument 落库、正文保存主命令面、tree.resource.* 资源生命周期和兼容路由瘦身。
2. 关键判断
- Rust kernel 与 bridge-runtime 已经承担语义主导权。
- Rust SSR 主壳已默认以
/api/realtime/ws为实时主链,SSE 是 fallback。 - FileTree 资源行的 owner document 与页面命令目标已分离。
- AI context 的 page subtree 已只读 Rust Page Aggregate projection。
mnote.doc.markdown_edit已是简单正文编辑主路径,page_ai_workflow复用统一 mnote tool executor,apply_block_ops/mnote.block.*仅作为结构性辅助。- ACP / Reasonix 的 mnote tool payload、response、run context 与幂等字段已同步到当前工具合同。
3. 已闭合 bug
- Rust Web / realtime / ACP:
bugs/03-rust-web/done/3-16到3-21 - Tree domain:
bugs/04-tree-domain/done/4-46 - Editor mainline:
bugs/05-editor-mainline/done/5-15到5-18 - AI:
bugs/07-ai/done/7-18到7-25
4. 验证
find bugs -path '*/process/*' -type f | wc -l- 结果:
0
- 结果:
cargo test --manifest-path rust/Cargo.toml -p mnote-web markdown_edit -- --nocapture- 结果:9 passed
cargo test --manifest-path rust/Cargo.toml -p mnote-web page_ai_workflow -- --nocapture- 结果:3 passed
cargo test --manifest-path rust/Cargo.toml -p mnote-web acp_client -- --nocapture- 结果:6 passed
cargo test --manifest-path rust/Cargo.toml -p mnote-web ssr::pages::layout::tests -- --nocapture- 结果:14 passed
5. 备注
本次审查的详细架构说明已统一写入根目录:CURRENT_ARCHITECTURE.md。