Files
mnote/design/03-rust-web/done/3-11-rust-web-legacy-next-retirement-gates-v1.md
T
lix-2026 96e03645f7 chore: 收口 review 执行清单与 runtime 验证
- 补齐 design/10-review 执行清单、验收标准与相关设计治理记录

- 迁移已完成的 tree、mindmap、runtime fallback、AI kernel 等设计和缺陷条目

- 推进 Rust Web runtime、tree/sidebar、page aggregate、mindmap 与 OnlyOffice 路由侧验证支撑

- 增加 task177-task180 smoke/audit 脚本及前端相关测试覆盖
2026-05-14 05:52:08 +08:00

2.8 KiB
Raw Blame History

3-11 [done] Rust Web Legacy Next Retirement Gates v1

状态说明:

  • 本稿定义的 default gate 已在当前主线代码中成立:mnote-web3000 ownerNext 仅保留 legacy compat/debug 边界
  • MNOTE_WEB_ENABLE_LEGACY_NEXT_COMPAT 默认关闭与 task117 guard 已落地,故迁入 done/
  • 2026-05-13 追加说明:本文中“长期 agent 执行面收口到 mnote-cli”是历史完成口径;当前 AI 长期方向已由 design/07-ai/process/7-3-page-ai-hermes-panel-and-mnote-plugin-v1.md 覆盖为 Hermes 页面内客户端 + mnote Hermes skill/plugin

目标

将 Next App Router 从 3000 默认主链降级为显式 legacy/debug/internal 兼容边界。默认首页、文档页、搜索页、导图页、tree SSE 与 AI bridge host 均由 mnote-web 承接;AI 会话与编排长期归 Hermesmnote 通过 Hermes skill/plugin 暴露业务工具。

当前 owner

  • /Rust Web gateway::root_entryowner mnote-web
  • /documents/{document_id}Rust Web web_shell::document_page_shellPage Aggregate owner rust-kernel
  • /searchRust Web search::shellSearch projection owner rust-kernel
  • /mindmap/{doc_id}/{mindmap_id}Rust Web mindmap_shell::mindmap_object_shellMindmap projection owner rust-kernel
  • /api/tree/eventsRust Web SSEstream owner rust-web
  • /api/hermes/bridgeRust Web 兼容 AI bridge;仅作为过渡边界,不是新的 Hermes 页面内客户端代理。
  • /api/compat/next/*legacy compat boundary,仅用于迁移期兼容与调试。

Gate

  • MNOTE_WEB_ENABLE_LEGACY_NEXT_COMPAT 默认关闭;只有显式设置为 1/true/yes 才允许 fallback proxy。
  • 默认主路径不得返回 x-mnote-legacy-upstream: next-app-router
  • 导图、搜索、文档页 contract 不得再把 next-app-router 声明为主 runtime。
  • /api/ai-agent/run 当前仍保留兼容 route,但长期应退出页面 AI 主路径;新的页面 AI 应走 Hermes client proxy,结构化写入必须经 mnote Hermes plugin -> Rust runtime / kernel。

删除条件

  • 删除 /api/compat/next/sidebarSidebar、workspace shell、file tree smoke 均证明 Rust projection 可覆盖默认入口。
  • 删除 /api/compat/next/ai-agent/run:AI 面板默认请求统一 Hermes client proxylegacy 调用方清零;mnote-cli 只可作为 mnote plugin 内部适配器或调试入口。
  • 删除 fallback proxytask117 默认关闭 legacy compat 后覆盖首页、文档页、搜索页、导图页与 tree SSE。

验收命令

cd /mnt/Data1T/mnote/rust
cargo test -p mnote-web gateway
cargo test -p mnote-web legacy_next

cd /mnt/Data1T/mnote
MNOTE_UI_BASE_URL=http://127.0.0.1:3000 node scripts/task117-next-retirement-guard.js
rg -n "legacy_next|compat/next|next-app-router|fallback proxy" rust/crates/mnote-web wolai-frontend design