2.0 KiB
2.0 KiB
3-11 [process] Rust Web Legacy Next Retirement Gates v1
目标
将 Next App Router 从 3000 默认主链降级为显式 legacy/debug/internal 兼容边界。默认首页、文档页、搜索页、导图页、tree SSE 与 Hermes bridge 均由 mnote-web 承接。
当前 owner
/:Rust Webgateway::root_entry,ownermnote-web。/documents/{document_id}:Rust Webweb_shell::document_page_shell,Page Aggregate ownerrust-kernel。/search:Rust Websearch::shell,Search projection ownerrust-kernel。/mindmap/{doc_id}/{mindmap_id}:Rust Webmindmap_shell::mindmap_object_shell,Mindmap projection ownerrust-kernel。/api/tree/events:Rust Web SSE,stream ownerrust-web。/api/hermes/bridge:Rust Web Hermes bridge,AI bridge ownerrust-web-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仅声明 canonical route/api/hermes/bridge,结构化写入必须经 Hermes/Rust bridge。
删除条件
- 删除
/api/compat/next/sidebar:Sidebar、workspace shell、file tree smoke 均证明 Rust projection 可覆盖默认入口。 - 删除
/api/compat/next/ai-agent/run:AI 面板默认请求 Hermes,task126 smoke 通过,并且 legacy 调用方清零。 - 删除 fallback proxy:
task117默认关闭 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