Files
mnote/.codex/reasonix-tasks/2026-05-22-sqlite-control-plane-worker-e-share-audit.md
T
lix-2026 5f97800489 chore: align local-first control plane and editor fixes
- wire SQLite control-plane access/session paths into Rust web local-folder routes

- preserve local Markdown attachment semantics across upload, reload, and secondary-pane resource tabs

- refresh design governance docs, Reasonix task templates, and bug records

- retire root .mcp.json local MCP config
2026-05-23 23:38:42 +08:00

56 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Reasonix Worker Econtrol-plane share_links / audit / outbox 扩展
Project root: `/mnt/Data1T/mnote`
你不是独自在代码库中工作。其他 worker 可能并行修改 `mnote-web` 适配层、auth/session 或 access policy。不要还原、覆盖或清理不属于你任务范围的改动。不要提交 git。
## 背景
上位设计稿:
`design/02-convex-rust-long-term-architecture/process/2-8-convex-replace-with-rust-sqlite-control-plane-v1.md`
当前 `control-plane` crate 已有 users/auth/workspaces/directory_grants/sync_state 的骨架,但 share_links、audit_log、outbox 的能力还不够完整。
## Ownership
允许修改:
- `rust/crates/control-plane/src/model.rs`
- `rust/crates/control-plane/src/store.rs`
- `rust/crates/control-plane/src/sqlite.rs`
- `rust/crates/control-plane/src/migrations.rs`
- `rust/crates/control-plane/migrations/*.sql`
- `rust/crates/control-plane/src/error.rs` 仅限必要错误映射
禁止修改:
- `rust/crates/mnote-web/**`
- `infra/convex/**`
- `.env*`
- `scripts/**`
## 任务
1. 补强 `control-plane` 模型与 store trait
- `share_links` 的 create/list/revoke/resolve
- `audit_log` append/list 最小能力
- `outbox_events` drain/mark-delivered 的稳定方法
2. 为 share_links 增加 SQLite 实现与单测:
- token 只保存 hash
- revoke 后不可再 resolve
3. 为 audit_log 增加最小单测:
- 创建分享、撤销授权、AI/控制面关键事件可追加
4. 保持 schema 迁移幂等。
## 验收命令
```bash
cargo test --manifest-path rust/Cargo.toml -p control-plane -- --nocapture
```
## 最终回复格式
请列出:
- 修改文件
- 新增 API / 表能力
- 实际运行过的命令及结果
- 未完成项 / 风险