Files
mnote/design/10-review/done/11-current-full-architecture-review-v1.md
T
lix-2026 1882db7681 收口 MNote P0 P1 P2 审查尾项
- 归档 OnlyOffice live bridge、Page AI、mindmap、design governance 与相关 bug 条目
- 补齐 MinerU OCR 后端 runtime 合同与 smoke/test 基线
- 收口 ChatOnly/Doubao、ObjectIdentity、Page Aggregate compat 与 runtime owner 文档口径

验证:
- cargo test --manifest-path rust/Cargo.toml -p mnote-web local_ocr -- --test-threads=1
- cargo test --manifest-path rust/Cargo.toml -p mnote-web onlyoffice_bridge -- --test-threads=1
- git diff --check
- git diff --cached --check
- codegraph index . --force && codegraph status .
- codegraph sync . && codegraph status .
2026-06-01 09:29:12 +08:00

3.0 KiB
Raw Blame History

11 [done] 当前完整架构 Review v1

更新时间:2026-05-17

状态:done

参考总文档:CURRENT_ARCHITECTURE.md

1. 结论

2026-05-31 口径补充:本文是 2026-05-17 的阶段性 review 快照。文中关于 mnote.doc.markdown_edit “已是简单正文编辑主路径”的表述已被后续 local-first agent 文件编辑控制面覆盖;当前 local-first 普通 Markdown 编辑主路径以 AGENTS.mdCURRENT_ARCHITECTURE.mdARCHITECTURE.mddesign/07-ai/process/7-18-local-first-agent-file-editing-control-plane-v1.md 为准,即“授权文件引用 + allowed roots + agent 原生 patch/diff + watcher/BufferStore/Page Aggregate 同步”。mnote.doc.markdown_edit 只作为 cloud / remote agent / compat fallback 或复杂结构辅助边界。

当前 mnote 的主线架构已经成形。本轮 review 识别出的 P0 / 内核优先缺陷已完成代码修复、文档迁移和定向验证。

已修复的四个关键冲突:

  1. Tree realtime 的发布口径与前端消费口径不一致。
  2. FileTree 资源行误走页面命令。
  3. Page Aggregate / AI context 保留前端第二真相。
  4. AI 写入链路在 markdown_editapply_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 executorapply_block_ops / mnote.block.* 仅作为结构性辅助。
  • ACP / Reasonix 的 mnote tool payload、response、run context 与幂等字段已同步到当前工具合同。

3. 已闭合 bug

  • Rust Web / realtime / ACPbugs/03-rust-web/done/3-163-21
  • Tree domainbugs/04-tree-domain/done/4-46
  • Editor mainlinebugs/05-editor-mainline/done/5-155-18
  • AIbugs/07-ai/done/7-187-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