chore: retire remaining convex infrastructure

- move self-hosted Convex infra and root placeholder into recycle

- update architecture docs to remove active infra/convex deployment guidance

- extend local-first Convex guard to block retired infra regressions
This commit is contained in:
lix-2026
2026-05-22 19:31:20 +08:00
parent 47e224d419
commit 42fb58310c
13 changed files with 61 additions and 21 deletions
@@ -1040,9 +1040,9 @@ local-first 下,AI 的长期主路径不是继续发明一套 MNote 专用编
#### G. 控制面收口与旧数据迁移
- [x] G1. 历史 Convex 控制面字段边界冻结;当前默认控制面已替换为 SQLite。
- 文件:`infra/convex/``rust/crates/mnote-web/src/transport/convex.rs`
- 文件:`recycle/20260522-convex-runtime-retirement/infra/convex/``rust/crates/mnote-web/src/transport/convex.rs`
- 完成定义:新增 Convex 调用只能属于显式 cloud source、compat、migration 或 sync replica;默认 auth、membership、share grants、sync state、AI policy、ACP/Hermes runtime session 走 Rust SQLite control-plane。
- 完成证据:`infra/convex/README.md``docker-compose.yml` 已明确 Convex 自托管仅作为显式 cloud source / compat / sync replica 或历史数据导出;`transport/convex.rs` 保留为 cloud/compat transport 边界;`scripts/check-local-first-convex-guard.js --self-test` 已通过,并新增 active `convex/` 目录防重新引入未标注 documents/media 主存储表或函数。
- 完成证据:`recycle/20260522-convex-runtime-retirement/infra/convex/README.md``docker-compose.yml` 已明确 Convex 自托管仅作为显式 cloud source / compat / sync replica 或历史数据导出;`transport/convex.rs` 保留为 cloud/compat transport 边界;`scripts/check-local-first-convex-guard.js --self-test` 已通过,并新增 active `convex/` `infra/convex` 退役目录回流拦截,防重新引入未标注 documents/media 主存储表或函数。
- [x] G2. 旧 Convex workspace 导出为 local workspace。
- 文件:新增迁移脚本,优先放 `scripts/``tools/`
- 验证:fixture workspace 导出后包含 `.md`、assets、`.mnote/page-ids.json`
@@ -790,7 +790,7 @@ Ownership
- [x] `/api/realtime/ws` 能收到控制面事件。
- [x] AI allowed roots 不扩大到未授权目录。
- [x] `NEXT_PUBLIC_CONVEX_URL=http://127.0.0.1:9` 时 local-first 主路径 smoke 通过。
- [x] `infra/convex` 不再被 `npm run desktop:hot` 或默认启动链路要求。
- [x] `infra/convex` 已软删除到 `recycle/20260522-convex-runtime-retirement/infra/convex/`不再被 `npm run desktop:hot` 或默认启动链路要求。
- [x]`convex/` functions 源码已软删除到 `recycle/20260522-convex-runtime-retirement/convex/``scripts/run-convex-deploy.js` 已随之归档。
- [x] `package.json` / npm lock / pnpm lock 已移除只服务根 Convex functions 的 `@auth/core``@convex-dev/auth``convex` 依赖。
- [x] 文档更新,明确 Convex 只作为历史迁移源或显式 legacy 兼容入口。
@@ -850,6 +850,6 @@ Ownership
-`convex/` 已按软删除规则移动到 `recycle/20260522-convex-runtime-retirement/convex/`,只作为历史审计 / 迁移对照素材。
- `scripts/run-convex-deploy.js` 已移动到 `recycle/20260522-convex-runtime-retirement/scripts/run-convex-deploy.js`;默认仓库不再提供根 Convex functions deploy 入口。
- `package.json``package-lock.json``pnpm-lock.yaml` 已移除只服务根 Convex functions 的 `@auth/core``@convex-dev/auth``convex` 依赖。
- `npm run desktop:hot``npm run dev:hot` 均已确认只启动 Rust `mnote-web` hot 链路,不启动 Convex`infra/convex` 仍保留为显式 cloud / compat / sync replica 服务基础设施。
- `npm run desktop:hot``npm run dev:hot` 均已确认只启动 Rust `mnote-web` hot 链路,不启动 Convex`infra/convex` 已软删除到 `recycle/20260522-convex-runtime-retirement/infra/convex/`,只作为历史对照,不再作为默认启动链路或 active 服务基础设施。
- `gateway.rs` 已移除旧 Convex Auth action proxy / username lookup / auth response cookie helper,默认 `/api/auth` 只走 SQLite session。
- `scripts/check-local-first-convex-guard.js` 更新为拦截重新新增根 `convex/schema.ts``auth.ts``users.ts``aiSessions.ts`,防止退役 functions 源码回流默认控制面。