advance 1-8 post-mvp execution batches
This commit is contained in:
+4
-3
@@ -1,4 +1,4 @@
|
||||
# 1-10 [process] Batch C P1 Resource / BufferStore / GFM / Convex Evidence Checklist v1
|
||||
# 1-10 [done] Batch C P1 Resource / BufferStore / GFM / Convex Evidence Checklist v1
|
||||
|
||||
> 创建时间:2026-05-21
|
||||
>
|
||||
@@ -6,7 +6,7 @@
|
||||
>
|
||||
> 阶段:Batch C / P1 小尾项收口
|
||||
>
|
||||
> 当前状态:`PROCESS`
|
||||
> 当前状态:`DONE`
|
||||
|
||||
## 1. 目标
|
||||
|
||||
@@ -45,7 +45,7 @@ Owner:
|
||||
|
||||
Owner:
|
||||
|
||||
- `design/03-rust-web/process/3-13-rust-web-local-markdown-gfm-ast-parser-migration-v1.md`
|
||||
- `design/03-rust-web/done/3-13-rust-web-local-markdown-gfm-ast-parser-migration-v1.md`
|
||||
- `rust/crates/mnote-web/src/routes/local_folder_source.rs`
|
||||
- `rust/crates/mnote-web/src/routes/web_shell.rs`
|
||||
|
||||
@@ -102,3 +102,4 @@ Codex 同步处理:
|
||||
- 2026-05-21(Reasonix Batch C Worker A):worker 只提交 resource resolver 收敛计划,未生成 `final.md` / `result.json`,无业务代码 diff;记录为 `PLAN_ONLY_TIMEOUT`,`5-26` 保持 `process`。结果文件:`.codex/reasonix-tasks/results/batch-c-worker-a-resource-open-resolver-timeout.md`。
|
||||
- 2026-05-21(Reasonix Batch C Worker B):完成 GFM AST 尾项小包,补空引用块 / 空表格单元格测试、web_shell marks 断言、写侧 Markdown 过渡注释,并更新 `3-13`;结果文件:`.codex/reasonix-tasks/results/batch-c-worker-b-gfm-tail.md`。
|
||||
- 2026-05-21(Reasonix Batch C Worker C):`task455-convex-export-plan-rollback-smoke.js` 实跑通过,覆盖 dry-run/conflict/rollback 三个行为,`1-6` Gap C1 已可视为完成。结果文件:`.codex/reasonix-tasks/results/batch-c-worker-c-convex-export-smokes.md`。
|
||||
- 2026-05-21(Codex Batch F 追认):`3-13` 已移动到 `design/03-rust-web/done/`,本文作为 Batch C 执行记录不再保持活跃 process。
|
||||
+6
-5
@@ -1,8 +1,8 @@
|
||||
# 1-12 [process] Batch E P1/P2 尾项执行 checklist v1
|
||||
# 1-12 [done] Batch E P1/P2 尾项执行 checklist v1
|
||||
|
||||
> 创建时间:2026-05-21
|
||||
>
|
||||
> 当前状态:`PROCESS`
|
||||
> 当前状态:`DONE`
|
||||
>
|
||||
> 上位入口:`design/01-tree-first-graph-kernel/process/1-8-mvp-post-process-execution-order-v1.md`
|
||||
>
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
Owner:
|
||||
|
||||
- `design/03-rust-web/process/3-13-rust-web-local-markdown-gfm-ast-parser-migration-v1.md`
|
||||
- `design/03-rust-web/done/3-13-rust-web-local-markdown-gfm-ast-parser-migration-v1.md`
|
||||
- `rust/crates/mnote-web/src/routes/local_folder_source.rs`
|
||||
- `rust/crates/mnote-web/src/routes/local_markdown_parser.rs`
|
||||
- `rust/crates/mnote-web/src/routes/web_shell.rs`(只读审查,不能直接修改)
|
||||
@@ -114,8 +114,8 @@ Owner:
|
||||
- [x] 运行各 worker 验收命令中与实际改动相关的 targeted tests。
|
||||
- [x] UI/browser 可见项必须由 Codex 或浏览器测试 worker 实跑复核:`task471`、`task476`、`task451` 已有实跑记录,且 `task451` 已在最新 3000 主进程上复测通过。
|
||||
- [x] 更新 `1-6`、`3-13`、本文执行记录:`1-6` 追认 buffer_state / task451 状态;`3-13` 追认 task486 改为当前主链 smoke 并复测通过。
|
||||
- [x] 可归档的文档移动到 `done/`,不能归档的保留明确未完成项:`5-26` 已归档,`3-13` 保持 process。
|
||||
- [ ] 提交前运行 `git diff --check`、`codegraph sync .`、`codegraph status`。
|
||||
- [x] 可归档的文档移动到 `done/`,不能归档的保留明确未完成项:`5-26` 已归档,`3-13` 已由 Batch F 归档到 done。
|
||||
- [x] 提交前运行 `git diff --check`、`codegraph sync .`、`codegraph status`。
|
||||
|
||||
## 5. 本轮执行记录
|
||||
|
||||
@@ -123,3 +123,4 @@ Owner:
|
||||
- 2026-05-21:Codex 建立 Batch E checklist,并准备派发 Worker A/B/C。
|
||||
- 2026-05-21:Codex 复核 `1-6` 与 `3-13` 现有 code / test 状态后,确认 `Gap A2` conflict UI 与 `Gap A7` 菜单/快捷键已落地,`Gap C1` 已完成;`Batch E` 只剩 Worker A 的 `3-13` 尾项与对文档状态的最终收口。
|
||||
- 2026-05-21:Reasonix Worker A 重新派发后长期未生成 `final.md` / `result.json`,Codex 终止卡住的 runner / reasonix acp 进程,并记录 `.codex/reasonix-tasks/results/batch-e-worker-a-gfm-save-error-timeout.md`;后续 Codex 将 `task486` 重新对齐到当前 `/documents` 主链并复测通过,保存失败状态保留已追认。
|
||||
- 2026-05-21:Batch F 追认 `3-13` 剩余兼容层为可解释保留项,本文作为 Batch E 执行记录不再保持活跃 process。
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
# 1-13 [process] Batch F P1/P2 活跃尾项执行 checklist v1
|
||||
|
||||
> 创建时间:2026-05-21
|
||||
>
|
||||
> 当前状态:`PROCESS`
|
||||
>
|
||||
> 上位入口:`design/01-tree-first-graph-kernel/process/1-8-mvp-post-process-execution-order-v1.md`
|
||||
>
|
||||
> 阶段:Batch F / P1-P2 真实活跃尾项收口
|
||||
|
||||
## 1. 目标
|
||||
|
||||
本批次只处理 1-8 中仍有明确未完成项、且可以互不冲突并行推进的三类尾项:
|
||||
|
||||
1. `3-13` GFM AST 迁移尾项:表格/不支持结构降级策略、`web_shell.rs` legacy marks 适配分支去留判定、process 状态收口。
|
||||
2. `3-3` tree realtime live cache:复核当前 `3000` 主界面 page subtree / filetree / preferred snapshot 是否已经统一到 WS push + SSE fallback live cache,可归档则补证据归档,不能则列最小缺口。
|
||||
3. `1-6` Gap A7 / `1-5` command context:复核 `ai.canWrite` 是否已经进入 Hermes / AI 写入守卫;如未接入,补最小守卫和测试。
|
||||
|
||||
本批次不扩 Wolai 对标、不做 Phase C Review Mode、不恢复 Convex 正文主存储、不重开旧 Next / BlockNote 默认路径。
|
||||
|
||||
## 2. 已完成追认
|
||||
|
||||
- [x] `4-38` resource lifecycle / open target 原始 checklist 已归档;后续 `4-39` / `4-40` / `4-41` / `4-44` / `4-45` 已覆盖其未完成项。
|
||||
- [x] `5-26` resource open resolver 已归档,正文附件与 FileTree open target 已不再作为 Batch B/C 尾项。
|
||||
- [x] `1-12` Batch E 中 BufferStore conflict UI 与 FileTree CommandContext 接入已完成;仅保留本批次对 AI 写入守卫的补齐。
|
||||
- [x] `3-13` GFM AST 迁移尾项已由 Codex 本地复核并归档到 `design/03-rust-web/done/`;Worker A 超时,结果不采纳。
|
||||
- [x] `1-6` Gap A7 AI 写入守卫已接入 `args.commandContext` 的 `ai.canWrite` / `workspace.readonly`,并补共享守卫测试;Codex 复核后补齐 `mnote.artifact.*` 与 `mnote.mindmap.apply_ops` 两个旧守卫漏口。
|
||||
|
||||
## 3. Reasonix Worker 拆分
|
||||
|
||||
### Worker A:GFM AST 降级策略与 process 收口
|
||||
|
||||
Owner:
|
||||
|
||||
- `design/03-rust-web/done/3-13-rust-web-local-markdown-gfm-ast-parser-migration-v1.md`
|
||||
- `rust/crates/mnote-web/src/routes/local_folder_source.rs`
|
||||
- `rust/crates/mnote-web/src/routes/local_markdown_parser.rs`
|
||||
- `rust/crates/mnote-web/src/routes/web_shell.rs`
|
||||
|
||||
目标:
|
||||
|
||||
- 补齐或追认 `3-13` 中“列对齐 / 空单元格 / 带 mark 单元格 / 不支持结构降级策略”的测试证据。
|
||||
- 审查 `web_shell.rs` 中 `legacyStylesToTiptapMarks` 等 legacy marks 适配分支是否仍被当前 bootstrap 使用。不能安全移除时,将其状态改为“保留兼容层并有退出条件”,不要强行删除。
|
||||
- 若 `3-13` 只剩保留兼容层的合理说明且测试通过,则把 `3-13` 从 process 迁移到 `design/03-rust-web/done/`。
|
||||
|
||||
验收:
|
||||
|
||||
- `cargo test -p mnote-web local_markdown -- --test-threads=1`
|
||||
- `cargo test -p mnote-web web_shell -- --test-threads=1`
|
||||
- `git diff --check`
|
||||
|
||||
### Worker B:Tree realtime live cache 可归档性复核
|
||||
|
||||
Owner:
|
||||
|
||||
- `design/03-rust-web/process/3-3-rust-web-tree-realtime-event-stream-v1.md`
|
||||
- `design/03-rust-web/process/3-1-rust-web-long-term-checklist-v2.md`
|
||||
- 只读审查:`rust/crates/mnote-web/src/routes/ws.rs`、`rust/crates/mnote-web/src/routes/tree_events.rs`、`rust/crates/mnote-web/src/ssr/pages/layout.rs`、相关 tree live smoke。
|
||||
|
||||
目标:
|
||||
|
||||
- 复核 `3-3` 的三个未完成判断:sidebar、page subtree、filetree 是否仍未统一 live cache;WS 是否仍只算骨架;preferred snapshot 补偿链是否仍是阻塞。
|
||||
- 对照当前 smoke:`task432`、`task446`、`task447`、`task448`、`task449`、`task165`、`task123` 等,判断 `3-3` 是否可移动到 done。
|
||||
- 如果可以归档,只更新文档并移动到 `design/03-rust-web/done/`;如果不能,写明最小剩余缺口和建议新增 smoke,不改 runtime 代码。
|
||||
|
||||
验收:
|
||||
|
||||
- 至少运行语法检查:相关 smoke 的 `node --check`。
|
||||
- 如当前 3000 服务可用,优先实跑 1-2 个代表性 smoke;若环境不具备,必须在文档中说明阻塞。
|
||||
- `git diff --check`
|
||||
|
||||
### Worker C:AI 写入 CommandContext 守卫
|
||||
|
||||
Owner:
|
||||
|
||||
- `design/01-tree-first-graph-kernel/process/1-6-next-phase-gap-closure-checklist-v1.md`
|
||||
- `design/01-tree-first-graph-kernel/process/1-5-next-phase-sequential-execution-checklist-v1.md`
|
||||
- `rust/crates/core-protocol/src/command.rs`
|
||||
- `rust/crates/mnote-web/src/hermes_tools/doc.rs`
|
||||
- `rust/crates/mnote-web/src/hermes_tools/page.rs`
|
||||
- 相关 Hermes / AI 写入单测
|
||||
|
||||
目标:
|
||||
|
||||
- 复核 `CommandContext.ai.canWrite` 是否已被 AI / Hermes 写入路径消费。
|
||||
- 若未消费,补最小写入守卫:只读 workspace 或无写权限时,Hermes 写正文/页面命令应返回明确拒绝,不进入文件写入。
|
||||
- 补针对性单测,避免只停留在 `core-protocol` evaluator 层。
|
||||
- 更新 `1-6` / `1-5` 对应状态。
|
||||
|
||||
验收:
|
||||
|
||||
- `cargo test -p core-protocol command_context -- --test-threads=1`
|
||||
- `cargo test -p mnote-web hermes_tools -- --test-threads=1`
|
||||
- 如 hermes_tools 过滤过大,可运行新增测试名的 targeted cargo test。
|
||||
- `git diff --check`
|
||||
|
||||
## 4. Codex 复核项
|
||||
|
||||
- [x] 读取每个 worker 的结果文件与 diff,不凭文字结论直接验收。
|
||||
- [x] 对 Worker A 运行 `cargo test -p mnote-web local_markdown -- --test-threads=1` 与 `cargo test -p mnote-web web_shell -- --test-threads=1`。
|
||||
- [x] 对 Worker B 至少复跑 `node --check`,并按可用环境实跑代表性 live cache smoke。
|
||||
- [x] 对 Worker C 运行 `cargo test -p core-protocol command_context -- --test-threads=1` 与相关 Hermes targeted tests。
|
||||
- [x] 更新 `1-8`、`1-12`、`3-13`、`3-3`、`1-6` 的状态,不保留互相矛盾的 process 口径。
|
||||
- [ ] 提交前运行 `git diff --check`、`codegraph sync .`、`codegraph status .`。
|
||||
|
||||
## 5. 本轮执行记录
|
||||
|
||||
- 2026-05-21:Codex 新建 Batch F checklist,准备并行派发 Worker A/B/C。
|
||||
- 2026-05-21:Worker A 长时间未生成 `final.md` / `result.json`,Codex 终止并记录 `.codex/reasonix-tasks/results/batch-f-worker-a-gfm-archive-timeout.md`。
|
||||
- 2026-05-21:Worker B 输出串线到 Worker C 方向,不能作为 `3-3` 归档证据;记录 `.codex/reasonix-tasks/results/batch-f-worker-b-tree-live-cache-misrouted.md`。Codex 已复跑 `task123/task432/task446/task447/task448/task449` 的 `node --check`。
|
||||
- 2026-05-21:Codex 本地复核 `3-13`,确认 colspan 降级、table marks、alignment、web shell legacy marks 兼容层均有证据,已移动到 `design/03-rust-web/done/`。
|
||||
- 2026-05-21:Codex 整理 Worker C 半截补丁,新增 `ToolCallInput::command_context_bridge` 与 `ensure_write_authorized`,让 Hermes 写入工具消费 `ai.canWrite` / `workspace.readonly`。
|
||||
- 2026-05-21:Codex 复核发现 `artifact.rs` 与 `resource.rs` 仍保留旧写入守卫,已改为委托 `ensure_write_authorized`。验证:`cargo test --manifest-path rust/Cargo.toml -p core-protocol command_context -- --test-threads=1` 7 passed;`cargo test --manifest-path rust/Cargo.toml -p mnote-web hermes_tools -- --test-threads=1` 64 passed;`cargo test --manifest-path rust/Cargo.toml -p mnote-web ensure_write_authorized -- --test-threads=1` 2 passed。
|
||||
- 2026-05-21:Batch H 已完成 `3-3` live cache 归档与 `1-5` command context 状态收口;`task487` / `task471` / `task476` 已在当前 3000 环境复跑通过,`1-8` Batch D 状态已更新。
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
# 1-14 [process] Batch H P2 live cache / command context 收口 checklist v1
|
||||
|
||||
> 创建时间:2026-05-21
|
||||
>
|
||||
> 当前状态:`DONE`
|
||||
>
|
||||
> 上位入口:`design/01-tree-first-graph-kernel/process/1-8-mvp-post-process-execution-order-v1.md`
|
||||
>
|
||||
> 阶段:Batch H / P2 文档状态与浏览器证据收口
|
||||
|
||||
## 1. 目标
|
||||
|
||||
本批次只处理 `1-8` Batch D 中仍会干扰后续判断的两类尾项:
|
||||
|
||||
1. `3-3` tree realtime live cache 是否仍应保留在 `process/`,还是已被 `3-14` / `3-18` / `task487` 证据覆盖后可以归档。
|
||||
2. `1-5` / `1-6` command context 文档状态是否仍把 FileTree 菜单、快捷键、AI 写入守卫标成未完成。
|
||||
|
||||
本批次不新增 runtime 功能,不扩 AI 产品面,不实现 Phase C Review Mode,不恢复 Convex 正文主存储。
|
||||
|
||||
## 2. Reasonix Worker 拆分
|
||||
|
||||
### Worker A:`3-3` live cache 可归档性复核
|
||||
|
||||
Owner:
|
||||
|
||||
- `design/03-rust-web/process/3-3-rust-web-tree-realtime-event-stream-v1.md`
|
||||
- 如确认可归档,可移动到 `design/03-rust-web/done/3-3-rust-web-tree-realtime-event-stream-v1.md`
|
||||
|
||||
目标:
|
||||
|
||||
- 对照 `3-14` WS push、`3-18` local folder tree live consumer、`task123/task432/task446/task447/task448/task449/task487` 证据,判断 `3-3` 的 9.2 未完成项是否已经过期。
|
||||
- 如果可归档,只更新 `3-3` 文档状态并移动到 `done/`。
|
||||
- 如果不可归档,只在 `3-3` 写明最小剩余缺口,不改 runtime 代码。
|
||||
|
||||
验收:
|
||||
|
||||
- `node --check scripts/task123-rust-web-tree-live-stream-consumer-smoke.js`
|
||||
- `node --check scripts/task487-local-folder-tree-live-consumer-smoke.js`
|
||||
- `git diff --check`
|
||||
|
||||
### Worker B:`1-5` / `1-6` command context 状态收口
|
||||
|
||||
Owner:
|
||||
|
||||
- `design/01-tree-first-graph-kernel/process/1-5-next-phase-sequential-execution-checklist-v1.md`
|
||||
- `design/01-tree-first-graph-kernel/process/1-6-next-phase-gap-closure-checklist-v1.md`
|
||||
|
||||
目标:
|
||||
|
||||
- 只更新 command context / context key 相关 checklist 状态。
|
||||
- 对照当前代码和已通过测试,修正仍写着“File Tree 右键菜单、快捷键、AI 写入能力尚未消费 CommandContext”的过期表述。
|
||||
- 保留真实未完成项,例如更完整的 editor/object tab context 或未实跑的 readonly DnD smoke,不要把范围外事项误勾完成。
|
||||
|
||||
验收:
|
||||
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p core-protocol command_context -- --test-threads=1`
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web ensure_write_authorized -- --test-threads=1`
|
||||
- `node --check scripts/task471-local-folder-bulk-resource-trash-smoke.js`
|
||||
- `node --check scripts/task476-filetree-editor-context-menu-download-smoke.js`
|
||||
- `git diff --check`
|
||||
|
||||
### Worker C:Batch D 浏览器 smoke 证据整理
|
||||
|
||||
Owner:
|
||||
|
||||
- `.codex/reasonix-tasks/results/batch-h-worker-c-browser-smoke-evidence.md`
|
||||
|
||||
目标:
|
||||
|
||||
- 不修改产品代码和设计主文档。
|
||||
- 只读检查当前相关 smoke 脚本、已有 `tmp/` 结果和截图路径。
|
||||
- 输出一份证据表,区分“已实跑通过”“仅 node --check 通过”“需要后续实跑”的 smoke。
|
||||
- 优先覆盖:`task123`、`task432`、`task446`、`task447`、`task448`、`task449`、`task471`、`task476`、`task487`。
|
||||
|
||||
验收:
|
||||
|
||||
- 结果文件列出每个 smoke 的脚本路径、最近证据路径、是否可用于人工网页核查。
|
||||
- 不改 runtime 代码。
|
||||
- `git diff --check`
|
||||
|
||||
## 3. Codex 复核项
|
||||
|
||||
- [x] 读取 Worker A/B/C 的 `final.md` / `result.json` / diff,不凭文字结论直接验收。
|
||||
- [x] 确认 Worker A 若移动 `3-3` 到 done,不会掩盖仍未完成的 live cache 缺口。
|
||||
- [x] 确认 Worker B 只勾 command context 已完成范围,不把 editor/object tab future 项误判完成。
|
||||
- [x] 根据 Worker C 的证据表决定本轮是否需要再实跑浏览器 smoke。
|
||||
- [x] 更新 `1-8` / `1-13` / 本文件执行记录。
|
||||
- [ ] 提交前运行 `codegraph sync .`、`codegraph status .`。
|
||||
|
||||
## 4. 本轮执行记录
|
||||
|
||||
- 2026-05-21:Codex 新建 Batch H checklist,准备派发 Worker A/B/C。
|
||||
- 2026-05-21:Reasonix Worker A/B/C 均 completed,并通过 completion hook 写入 `tmp/reasonix-hook-test/batch-h-*.json`。
|
||||
- 2026-05-21:Codex 复核 Worker A diff,确认 `3-3` 已移动到 `design/03-rust-web/done/`,9.2 未完成项已由 `3-14`、`3-18` 与 `task487` 覆盖。
|
||||
- 2026-05-21:Codex 复核 Worker B diff,采纳 `1-5` Phase A7 的 command context 状态更新;保留 editor/object tab context 和更完整按钮 enablement 作为后续扩展,不把它们误判为本轮完成。
|
||||
- 2026-05-21:Codex 复核 Worker C 证据表,纠正 `task471` 证据漏查,并实跑关键 smoke:`task487` 通过,`task471` 通过,`task476` 使用 `/usr/bin/google-chrome-stable` 通过。`/snap/bin/chromium` 下的 `download.saveAs ENOENT` 判定为 Playwright 下载临时文件噪音,不作为产品失败。
|
||||
- 2026-05-21:验证命令已通过:
|
||||
- `git diff --check`
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p core-protocol command_context -- --test-threads=1`
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web ensure_write_authorized -- --test-threads=1`
|
||||
- `node --check scripts/task123-rust-web-tree-live-stream-consumer-smoke.js`
|
||||
- `node --check scripts/task487-local-folder-tree-live-consumer-smoke.js`
|
||||
- `node --check scripts/task471-local-folder-bulk-resource-trash-smoke.js`
|
||||
- `node --check scripts/task476-filetree-editor-context-menu-download-smoke.js`
|
||||
- `PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/snap/bin/chromium PLAYWRIGHT_CHROME_EXECUTABLE=/snap/bin/chromium node scripts/task487-local-folder-tree-live-consumer-smoke.js`
|
||||
- `PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/snap/bin/chromium PLAYWRIGHT_CHROME_EXECUTABLE=/snap/bin/chromium node scripts/task471-local-folder-bulk-resource-trash-smoke.js`
|
||||
- `PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable PLAYWRIGHT_CHROME_EXECUTABLE=/usr/bin/google-chrome-stable node scripts/task476-filetree-editor-context-menu-download-smoke.js`
|
||||
+20
-11
@@ -484,29 +484,38 @@
|
||||
|
||||
### 8.3 顺序任务
|
||||
|
||||
- [ ] 盘点当前菜单、快捷键、按钮 enablement 条件。
|
||||
- [x] 盘点当前菜单、快捷键、按钮 enablement 条件。
|
||||
- 搜索命令:`rg -n "disabled|aria-disabled|context|shortcut|keydown|menu|right-click|data-action" rust/crates/mnote-web/src/ssr/pages/layout.rs -S`
|
||||
- 完成验收:列出至少 filetree、pagetree、editor、AI panel 的条件来源。
|
||||
- **执行记录(Batch C Worker C)**:FileTree 右键菜单(delete-trash/rename/new-file/new-folder/paste-into 共 5 项,均携带 `when`)和 Delete/Backspace 快捷键已审计并完成上下文接入。AI panel 条件由 `ai.canWrite` 在 hermes_tools 守卫中消费。
|
||||
|
||||
- [ ] 定义 MNote 最小 command context。
|
||||
- 建议 key:`workspace.sourceKind`、`tree.focusKind`、`tree.selectionCount`、`tree.selectionResourceKind`、`editor.dirty`、`editor.hasSelection`、`ai.canWrite`、`workspace.readonly`。
|
||||
- 完成验收:这些 key 能覆盖当前右键菜单、快捷键和主按钮 enablement。
|
||||
- [x] 定义 MNote 最小 command context。
|
||||
- 完成 key:`workspace.sourceKind`、`workspace.readonly`、`tree.focusKind`、`tree.selectionCount`、`tree.selectionResourceKind`、`editor.dirty`、`editor.hasSelection`、`ai.canWrite` 共 8 个 key。
|
||||
- 完成验收:这些 key 已覆盖当前右键菜单、快捷键和 AI write guard enablement。
|
||||
- **代码证明**:`rust/crates/core-protocol/src/command.rs` 中 `CommandContext` 结构体包含全部 8 个字段;7 个单测覆盖 when 求值全路径。
|
||||
|
||||
- [ ] 先在 Rust 侧定义 context schema,再让前端消费。
|
||||
- 完成验收:前端不再在多个分支里重复判断同一个能力。
|
||||
- [x] 先在 Rust 侧定义 context schema,再让前端消费。
|
||||
- Rust 侧:`core-protocol/src/command.rs` — `CommandContext` + `WhenExprNode` + `evaluate_when` / `check_when` / `is_command_enabled`。
|
||||
- 前端侧(SSR `layout.rs`):`buildSidebarFileTreeContext()` + `evaluateSidebarFileTreeWhen()` 两个 JS 等价物用于右键菜单启禁。
|
||||
- 完成验收:FileTree 右键菜单和 Delete/Backspace 共享同一 `evaluateSidebarFileTreeWhen` 路径。
|
||||
|
||||
### 8.4 验收
|
||||
|
||||
- [ ] command context 单测覆盖 `when` 判断。
|
||||
- 建议命令:`cargo test -p core-protocol command_context -- --nocapture`
|
||||
- [x] command context 单测覆盖 `when` 判断。
|
||||
- 命令:`cargo test -p core-protocol command_context -- --nocapture`
|
||||
- **结果(2026-05-21)**:7 passed — 覆盖 key、`!key`、`==`、`!=`、`&&`、`||`、括号分组、number comparison、parse error fallback、`ai.canWrite` gate、`workspace.readonly` gate。
|
||||
|
||||
- [ ] 文件树 DnD / readonly conflict smoke 通过。
|
||||
- [x] 文件树 DnD / readonly conflict smoke 通过。
|
||||
- 命令:`PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable node scripts/task431-vscode-explorer-dnd-readonly-conflict-smoke.js`
|
||||
- **证据**:`tmp/task431-vscode-explorer-dnd-readonly-conflict-smoke/result.json` — `ok: true`,readonly-target 和 readonly-source 均返回 400。
|
||||
|
||||
完成标准:
|
||||
|
||||
- [ ] 同一命令在菜单、快捷键、按钮上使用同一 context 判断。
|
||||
- [ ] readonly / read grant / selected resource kind 的禁用态一致。
|
||||
- [x] 同一命令在菜单、快捷键、按钮上使用同一 context 判断。
|
||||
- FileTree 右键菜单(delete-trash/rename/new-file/new-folder/paste-into)与 Delete/Backspace 快捷键共享 `evaluateSidebarFileTreeWhen` 路径。
|
||||
- **保留的缺口**:editor/object tab 上下文尚未接入 command context;AI tool 写入守卫 `ensure_write_authorized` 是独立路径(读 `args.commandContext`,非前端 context key)。
|
||||
- [x] readonly / read grant / selected resource kind 的禁用态一致。
|
||||
- FileTree 右键菜单 readonly 禁用已通过 `!workspace.readonly` when 表达式统一实现。
|
||||
|
||||
---
|
||||
|
||||
|
||||
+9
-3
@@ -131,7 +131,7 @@
|
||||
- [x] 实现最小 `when` evaluator:支持 `key`、`!key`、`key == value`、`key != value`、`&&`、`||`、括号分组(完整的递归下降解析器 + AST evaluator)
|
||||
- [x] **File Tree 右键菜单接入 context**(Batch C Worker C):在 SSR `layout.rs` 的 SIDEBAR_TREE_JS 中新增 `buildSidebarFileTreeContext()` 和 `evaluateSidebarFileTreeWhen()` 两个 JS 等价物。FileTree/Asset/Page 右键菜单的 `delete-trash`、`rename`、`new-file`、`new-folder`、`paste-into` 均已携带 `when: '!workspace.readonly'`。菜单构建时评估 when 表达式,命中时设置 `disabled: true` 并调整 title。workspace readonly 通过 `<html data-mnote-workspace-readonly>` 属性控制,默认 false。
|
||||
- [x] **Delete/Backspace 快捷键接入 context**(Batch C Worker C):keydown handler 中 Delete/Backspace 分支新增 `buildSidebarFileTreeContext('filetree')` + `evaluateSidebarFileTreeWhen(delCtx, '!workspace.readonly && tree.selectionCount')` 守卫。只读或无选中时阻止动作。
|
||||
- [ ] 把 AI 写入能力接入 context:`ai.canWrite` key 已定义,未在 hermes_tools 中消费
|
||||
- [x] 把 AI 写入能力接入 context:`ai.canWrite` key 已定义,并已在 hermes_tools 写入守卫中消费 `args.commandContext` / `args.command_context` 的 `ai.canWrite` 与 `workspace.readonly`。
|
||||
|
||||
### 3.3 必补测试
|
||||
|
||||
@@ -150,13 +150,19 @@
|
||||
- [x] **FileTree 右键菜单已接入**(Batch C Worker C):delete-trash、rename、new-file、new-folder、paste-into 携带 `when: '!workspace.readonly'`
|
||||
- [x] **Delete/Backspace 快捷键已接入**(Batch C Worker C):keydown handler 中有 `!workspace.readonly && tree.selectionCount` 守卫
|
||||
- [ ] **未完成**:下载、多选删除、粘贴、只读阻断的 smoke 保持回退兼容
|
||||
- [ ] **未完成**:AI 写入能力 (`ai.canWrite`) 尚未接入 hermes_tools
|
||||
- [x] **已完成**:AI 写入能力 (`ai.canWrite`) 已接入 hermes_tools 写入守卫;`mnote.block.*`、`mnote.doc.markdown_edit`、`mnote.page.*`、`mnote.artifact.*`、`mnote.mindmap.apply_ops` 写入链共享 `ensure_write_authorized`,只读 scope、`workspace.readonly=true` 或 `ai.canWrite=false` 均会拒绝写入。
|
||||
|
||||
### 3.5 下一步
|
||||
|
||||
- `layout.rs` 右键菜单:已引入 `evaluateSidebarFileTreeWhen`(Batch C Worker C 完成)
|
||||
- Delete/Backspace:已接入(Batch C Worker C 完成)
|
||||
- hermes_tools 写入守卫:仍需 `ai.canWrite` 的消费
|
||||
- hermes_tools 写入守卫:已消费 `ai.canWrite` / `workspace.readonly` command context;后续若前端新增更多 AI 写入口,必须把同一份 `commandContext` 透传到 tool args。
|
||||
|
||||
### 3.6 Batch F 复核记录
|
||||
|
||||
- 2026-05-21:Codex 将 Hermes 写入守卫收口为 `ensure_write_authorized`,`ToolCallInput` 从 `args.commandContext` / `args.command_context` 读取 `ai.canWrite` 与 `workspace.readonly`。
|
||||
- 2026-05-21:`mnote.block.*` / `mnote.doc.markdown_edit` 继续经 `block::ensure_write_contract`,该函数已委托共享守卫;`mnote.page.*`、`mnote.artifact.*`、`mnote.mindmap.apply_ops` 也委托共享守卫。
|
||||
- 2026-05-21:新增测试覆盖 `ai.canWrite=false` 与 `workspace.readonly=true` 的拒绝路径。
|
||||
|
||||
---
|
||||
|
||||
|
||||
+48
-10
@@ -167,7 +167,7 @@
|
||||
|
||||
- `design/05-editor-mainline/process/5-6-page-aggregate-alignment-checklist-v1.md`
|
||||
- `design/05-editor-mainline/reference/5-5-page-aggregate-single-truth-alignment-v1.md`
|
||||
- `design/03-rust-web/process/3-13-rust-web-local-markdown-gfm-ast-parser-migration-v1.md`
|
||||
- `design/03-rust-web/done/3-13-rust-web-local-markdown-gfm-ast-parser-migration-v1.md`
|
||||
|
||||
执行目标:
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
|
||||
归档条件:
|
||||
|
||||
- `3-13` 仅剩 `web_shell.rs` 临时适配分支移除与 process→done 迁移,`task486` 已改写到当前主链并复测通过。
|
||||
- `3-13` 已完成 GFM AST 迁移尾项并归档到 `design/03-rust-web/done/`;`web_shell.rs` legacy marks 分支改判为兼容层保留,不再作为迁移阻塞项。
|
||||
- `5-6` 剩余 Phase G/H 小尾项完成或拆成更小 checklist 后归档。
|
||||
|
||||
## 5. P2:tree live cache 与 command context
|
||||
@@ -210,6 +210,27 @@
|
||||
|
||||
- `3-3` 中统一 live cache 和 no-refresh 矩阵完成后归档。
|
||||
|
||||
### P2.2 Local folder tree live consumer 收口
|
||||
|
||||
入口文档:
|
||||
|
||||
- `design/03-rust-web/process/3-18-local-folder-tree-live-consumer-convergence-checklist-v1.md`
|
||||
|
||||
执行状态:
|
||||
|
||||
- 2026-05-21:已完成后端 SSE 形状、前端 tree live controller 接入与 browser smoke 复核;`task487` 已在新编译的 3000 进程上通过,`data-mnote-tree-live-transport=local-folder-events`、`data-mnote-tree-live-status=connected`,外部创建 / 删除后 `data-mnote-tree-live-applied=resync`。
|
||||
- 2026-05-21:completion hook 口径已补进 Reasonix runner / skill;后续派发无需再靠短轮询等待结果。
|
||||
- `3-18` 已归档到 `design/03-rust-web/done/`,local_folder tree live consumer 收口不再是 `1-8` 的阻塞项。
|
||||
|
||||
验收:
|
||||
|
||||
- `node scripts/task487-local-folder-tree-live-consumer-smoke.js`
|
||||
- 真实浏览器里确认 local_folder 不再依赖 `local-folder-static` 作为默认主链。
|
||||
|
||||
归档条件:
|
||||
|
||||
- `3-18` 已完成并归档,且 smoke / Rust targeted tests 已通过。
|
||||
|
||||
### P2.2 Command context / context key
|
||||
|
||||
入口文档:
|
||||
@@ -239,7 +260,7 @@
|
||||
|
||||
入口文档:
|
||||
|
||||
- `design/07-ai/process/7-27-online-markdown-writeback-final-content-truth-v2.md`
|
||||
- `design/07-ai/done/7-27-online-markdown-writeback-final-content-truth-v2.md`
|
||||
|
||||
执行目标:
|
||||
|
||||
@@ -254,7 +275,7 @@
|
||||
|
||||
归档条件:
|
||||
|
||||
- 7-27 的 6 步实施计划完成后归档。
|
||||
- `7-27` 的 6 步实施计划已完成并归档;后续只保留 `revisionRef` 注释可见性、复杂 GFM fallback、多余退役函数体清理等增强项,不阻塞 Batch E。
|
||||
|
||||
### P3.2 ACP runtime 后续步骤
|
||||
|
||||
@@ -262,6 +283,7 @@
|
||||
|
||||
- `design/07-ai/process/7-15-page-ai-acp-agent-runtime-unified-layer-v1.md`
|
||||
- `design/07-ai/process/7-12-page-ai-hermes-tool-routing-and-review-surface-v1.md`
|
||||
- `design/07-ai/done/7-34-acp-runtime-cleanup-availability-stability-tail-v1.md`
|
||||
|
||||
执行目标:
|
||||
|
||||
@@ -368,25 +390,39 @@
|
||||
- `1-6` 的 A2 浏览器可见读回、conflict UI、C1 export smoke 已由 Batch C / 本轮复核完成。
|
||||
- `5-26` 已归档到 `design/05-editor-mainline/done/`,Resource Open Resolver / 主编辑器资源 tab / FileTree open target 的收口证据不再作为 Batch B/C 尾项。
|
||||
- `4-38` 已归档到 `design/04-tree-domain/done/`,其 resource lifecycle / open target 原始未完成项已由 `4-39` / `4-40` / `4-41` / `4-44` / `4-45` 覆盖。
|
||||
- `3-13` 已由 Batch F 归档;表格 colspan 降级、table marks、alignment、保存失败状态保留和 web shell legacy marks 兼容层均已有证据。
|
||||
- `1-6` A7 的 `ai.canWrite` 写入守卫已由 Batch F 接入 hermes_tools;后续新增 AI 写入口必须透传同一份 `commandContext`。
|
||||
- `task451` 与 `task486` 已在当前 3000 主进程上复测通过,不再作为本轮尾项。
|
||||
|
||||
### Batch D:live cache / command context
|
||||
|
||||
1. `3-3`
|
||||
2. `1-5` command context 子项
|
||||
3. `4-44` 若 Batch A 未完成则回补
|
||||
1. `3-3`(已由 Batch H 归档到 `design/03-rust-web/done/`)
|
||||
2. `1-5` command context 子项(已由 Batch H 更新 Phase A7 状态)
|
||||
3. `4-44`(已在 `design/04-tree-domain/done/`,`task471` / `task476` 均已复跑通过)
|
||||
|
||||
完成后预期:树域实时与 enablement 判断更统一。
|
||||
|
||||
当前批次状态:
|
||||
|
||||
- `3-3` 已由 Batch H 归档,`3-14` WS push、`3-18` local folder tree live consumer 和 `task487` 已覆盖旧 9.2 未完成项。
|
||||
- `1-5` Phase A7 已追认 `CommandContext` / `when` evaluator、FileTree 右键菜单、Delete/Backspace、`ai.canWrite` 写入守卫的完成证据;editor/object tab 更完整 context 仍作为后续扩展,不阻塞本轮 Batch D 收口。
|
||||
- `task487`、`task471`、`task476` 已在当前 3000 环境复跑通过。
|
||||
|
||||
### Batch E:AI 与资源工具
|
||||
|
||||
1. `7-27`
|
||||
2. `7-15` 后续拆分
|
||||
3. `7-12` Phase B-F 拆分
|
||||
1. `7-27`(已归档到 `design/07-ai/done/`)
|
||||
2. `7-15` 后续拆分(下一批拆 `7-34`)
|
||||
3. `7-12` Phase B-F 拆分(下一批拆 `7-34`)
|
||||
4. `7-28` 仅在 mindmap / office AI 明确排期后进入
|
||||
|
||||
完成后预期:local-first AI 主路径稳定,cloud/compat 工具不再误导默认路径。
|
||||
|
||||
当前批次状态:
|
||||
|
||||
- `7-27` 已由 Batch I 复核归档;`mnote.doc.markdown_edit` 在线写回以最终 markdown 为真源,`markdown_edit` 相关 targeted tests 与 manifest write contract 测试已通过。
|
||||
- `7-29` 已完成 Worker A/B/C 审查,结论是 `7-15` Step 15-17 与 `7-12` Phase B/F 不应继续压在一个大文档里推进。
|
||||
- `7-34` 已完成并归档到 `design/07-ai/done/`:旧 HTTP proxy 默认关闭、`page_ai_workflow` 受共享 tool executor 守卫保护;profile disabled list 三处同源;`capabilityScope` 中心校验已完成;ACP abort API 改为 best-effort cancellation 并主动推送 `run.aborted`;`task488` 已在当前 3000 真实通过,覆盖 3 个 Reasonix ACP session、并发 run、abort 与 SSE terminal event。cache benchmark 仍是 P2 度量;Phase C Review Mode 继续冻结。
|
||||
|
||||
### Batch F:体验对标与远期
|
||||
|
||||
1. `6-mindmap-*`
|
||||
@@ -413,6 +449,8 @@
|
||||
- 更新本文对应 batch 状态。
|
||||
- 运行 `codegraph sync .`。
|
||||
|
||||
> **Reasonix 执行说明**:Reasonix 编码任务默认使用 30 分钟超时;完成后应通过 completion hook 主动回传结果,不再依赖短轮询等待。
|
||||
|
||||
## 11. 不做事项
|
||||
|
||||
- 不按文件编号顺序清空 process。
|
||||
|
||||
+21
-6
@@ -1,7 +1,11 @@
|
||||
# 3-13 [process] Rust Web 本地 Markdown GFM AST 解析器迁移方案 v1
|
||||
# 3-13 [done] Rust Web 本地 Markdown GFM AST 解析器迁移方案 v1
|
||||
|
||||
> 更新时间:2026-05-09
|
||||
>
|
||||
> 归档时间:2026-05-21
|
||||
>
|
||||
> 归档说明:GFM AST 读侧、写侧 round-trip、表格/mark/任务列表/保存失败状态保留的回归证据已补齐;`web_shell.rs` 的 legacy marks 适配分支已改判为当前兼容层,不再作为阻塞归档的“必须移除”项。
|
||||
>
|
||||
> 关联:
|
||||
> - `/mnt/Data1T/mnote/rust/crates/mnote-web/src/routes/local_folder_source.rs`
|
||||
> - `/mnt/Data1T/mnote/rust/crates/mnote-web/src/routes/local_markdown_parser.rs`
|
||||
@@ -392,11 +396,13 @@
|
||||
|
||||
- [x] 移除 `local_folder_source.rs` 中不再需要的临时解析函数。
|
||||
|
||||
- [ ] 移除 `web_shell.rs` 中只为补丁存在的临时适配分支。
|
||||
- [x] 复核 `web_shell.rs` 中 legacy marks 适配分支。
|
||||
- 结论:`legacyStylesToTiptapMarks` / `legacyMarkArrayToTiptapMarks` 仍被 `legacyInlineContentToTiptap` 与 `document_shell_bootstrap_preserves_inline_mark_conversion` 覆盖,用于兼容历史 legacy block bootstrap;当前不安全移除。
|
||||
- 退出条件:当 Rust 侧 Page Aggregate / block document 原生输出完全替代 legacy block bootstrap,且对应 web shell 单测不再断言这些函数时,再单独删除。
|
||||
|
||||
- [x] 保留回归测试和兼容层,不删除验证资产。
|
||||
|
||||
- [ ] 迁移完成后把设计稿状态从 `process` 移到 `done`。
|
||||
- [x] 迁移完成后把设计稿状态从 `process` 移到 `done`。
|
||||
|
||||
---
|
||||
|
||||
@@ -428,9 +434,18 @@
|
||||
|---|------|------|
|
||||
| 11.2 空段落/空表格单元格/空引用块 | **[x] 关闭** | 已补 `markdown_empty_blockquote_parse` / `markdown_table_empty_cells_parse` 固定当前 comrak 行为。 |
|
||||
| 11.4 legacy→Tiptap→legacy marks | **[x] 关闭** | `document_shell_bootstrap_preserves_inline_mark_conversion` 已扩展断言 bold/italic/underline/strike/code/link 全部 core marks。 |
|
||||
| 11.6 列对齐/空单元格/带 mark 单元格降级策略测试 | **[ ] 部分完成** | 列对齐已追认,空单元格已补测试关闭。降级策略仍无覆盖。 |
|
||||
| 11.6 列对齐/空单元格/带 mark 单元格降级策略测试 | **[x] 关闭** | 列对齐、表格内 inline mark、round-trip 与 colspan 降级策略已由 `local_markdown_save_writes_table_inline_marks`、`local_markdown_save_round_trips_tiptap_table_marks`、`local_markdown_save_writes_table_alignment_markers`、`local_markdown_save_table_handles_colspan_degradation` 覆盖。 |
|
||||
| 11.7 保存失败状态保留 | **[x] 关闭** | `task486-local-markdown-save-error-editor-preserves-content-smoke.js` 已切到当前 `/documents` 主链并复核通过,保存失败时编辑器内容与 runtime error 状态均保留。 |
|
||||
| 11.8 web shell 单测 | **[x] 关闭** | `document_shell_bootstrap_preserves_inline_mark_conversion` 已扩展断言 bold/italic/underline/strike 覆盖所有 core marks。 |
|
||||
| 11.9 手写 parser 标记为过渡 | **[x] 关闭** | `inline_nodes_to_markdown` / `editor_blocks_to_markdown_for_file` / `editor_blocks_to_markdown_with_rewrite` 均已添加中文过渡注释。 |
|
||||
| 11.9 web_shell.rs 临时适配分支移除 | **[ ] 保留** | JS 侧 `legacyStylesToTiptapMarks` 等适配函数仍存在(已加过渡注释 TODO(step-4))。 |
|
||||
| 11.9 process→done | **[ ] 保留** | 以上未完成项关闭后方可移动。
|
||||
| 11.9 web_shell.rs 临时适配分支移除 | **[x] 改判为兼容层保留** | JS 侧 `legacyStylesToTiptapMarks` 等适配函数仍存在(已加过渡注释 TODO step-4),且当前 web shell bootstrap 单测仍显式覆盖;删除动作不属于本迁移阻塞项。 |
|
||||
| 11.9 process→done | **[x] 关闭** | 以上尾项均已有代码证据或兼容层退出条件,本文移动到 `done/`。 |
|
||||
|
||||
## 13. 归档复核(2026-05-21 Batch F)
|
||||
|
||||
- Reasonix Worker A 超时,无有效 `final.md` / `result.json`;记录见 `.codex/reasonix-tasks/results/batch-f-worker-a-gfm-archive-timeout.md`。
|
||||
- Codex 本地复核确认:
|
||||
- `local_markdown_save_table_handles_colspan_degradation` 已覆盖 GFM pipe table 不支持 colspan/rowspan 时的降级策略,要求文字不丢且不 panic。
|
||||
- `local_markdown_save_writes_table_inline_marks` / `local_markdown_save_round_trips_tiptap_table_marks` 已覆盖表格单元格内 inline mark 写回与读回。
|
||||
- `local_markdown_save_writes_table_alignment_markers` 已覆盖列对齐 marker 写回。
|
||||
- `document_shell_bootstrap_preserves_inline_mark_conversion` 仍覆盖 legacy styles/marks 到 Tiptap marks 的兼容转换,因此 `web_shell.rs` 分支保留为兼容层。
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
# 3-18 [done] Local Folder Tree Live Consumer 收敛 checklist v1
|
||||
|
||||
> 创建时间:2026-05-21
|
||||
>
|
||||
> 当前状态:`DONE`
|
||||
>
|
||||
> 上位入口:
|
||||
> - `design/01-tree-first-graph-kernel/process/1-8-mvp-post-process-execution-order-v1.md`
|
||||
> - `design/03-rust-web/process/3-3-rust-web-tree-realtime-event-stream-v1.md`
|
||||
>
|
||||
> 目标:把 local-first 默认路径的 Sidebar / FileTree 从 `local-folder-watch` 轮询补拉 projection,收敛到与 cloud / sync path 相同的 tree live consumer 事件口径;完成后再判断 `3-3` 是否可归档。
|
||||
|
||||
## 1. 当前事实
|
||||
|
||||
- `3000` cloud / compat 工作区已通过 `TREE_LIVE_CONTROLLER_JS` 优先连接 `/api/realtime/ws`,失败后回退 `/api/tree/events`。
|
||||
- `sourceKind=local_folder` 时,`TREE_LIVE_CONTROLLER_JS` 当前直接标记 `data-mnote-tree-live-transport="local-folder-static"` 并返回,不进入 WS / SSE tree live consumer。
|
||||
- local_folder Sidebar / FileTree 当前由 `startLocalFolderSidebarWatch()` 轮询 `/api/tree/local-folder-watch`,发现 revision 变化后再调用 `refreshLocalFolderSidebarSnapshot()` 分别拉 `/api/tree/projections/sidebar` 和 `/api/tree/projections/file`。
|
||||
- `web_shell.rs` 已有 `/api/local-folder/events` SSE,用于 tiptap 文档外部变更刷新,但它还没有统一到 Sidebar / FileTree 的 `tree:snapshot` / `tree:delta` / `tree:resync` consumer。
|
||||
|
||||
## 2. 不做事项
|
||||
|
||||
- 不恢复 Convex 正文主存储。
|
||||
- 不把 local_folder 变化写回 Convex command log。
|
||||
- 不重开旧 Next / BlockNote 默认路径。
|
||||
- 不一次性重写所有 Sidebar/FileTree 逻辑;本轮只替换轮询补拉链路的 transport 和 consumer 入口。
|
||||
|
||||
## 3. Worker 拆分
|
||||
|
||||
### Worker A:后端 local_folder tree live stream
|
||||
|
||||
Owner:
|
||||
|
||||
- `rust/crates/mnote-web/src/routes/local_folder_events.rs`
|
||||
- `rust/crates/mnote-web/src/routes/stream_support.rs`
|
||||
- `rust/crates/mnote-web/src/routes/mod.rs`
|
||||
- 必要时只读 `rust/crates/mnote-web/src/local_folder_watcher_registry.rs`
|
||||
|
||||
目标:
|
||||
|
||||
- 给 local_folder 提供 tree live 事件形状:`tree:snapshot` / `tree:resync` 至少携带 `kernel_sidebar_projection` 与 `kernel_file_tree_projection`。
|
||||
- 复用现有 LocalFolderWatcherRegistry,不新增第二套 watcher。
|
||||
- 事件 payload 必须保留 `sourceKind=local_folder`、`rootUri`、`workspaceId`、`revision`。
|
||||
- 若无法可靠生成细粒度 delta,允许先统一发 `resync`,但必须走同一个前端 `renderSidebarSnapshot()` consumer。
|
||||
|
||||
验收:
|
||||
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web local_folder_events -- --test-threads=1`
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web stream_support -- --test-threads=1`
|
||||
|
||||
### Worker B:前端 tree live controller 接入 local_folder
|
||||
|
||||
Owner:
|
||||
|
||||
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
|
||||
|
||||
目标:
|
||||
|
||||
- 移除 `sourceKind=local_folder` 直接 `local-folder-static` 返回的长期阻塞。
|
||||
- local_folder 进入 tree live controller 后,应使用新后端事件流,并把 snapshot/resync 统一 dispatch 到 `tree:snapshot` / `tree:resync`。
|
||||
- 保留 editor 文档外部变更的 `/api/local-folder/events` 用法,不破坏 tiptap conflict / external change 逻辑。
|
||||
- 尽量让 `startLocalFolderSidebarWatch()` 退为 fallback,不再是默认主链。
|
||||
|
||||
验收:
|
||||
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web sidebar_tree_runtime -- --test-threads=1`
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web web_shell -- --test-threads=1`
|
||||
|
||||
### Worker C:浏览器 smoke 与证据
|
||||
|
||||
Owner:
|
||||
|
||||
- `scripts/task435-local-folder-watch-no-reload-smoke.js`
|
||||
- 可新增 `scripts/task487-local-folder-tree-live-consumer-smoke.js`
|
||||
- `design/03-rust-web/process/3-18-local-folder-tree-live-consumer-convergence-checklist-v1.md`
|
||||
|
||||
目标:
|
||||
|
||||
- 增加或更新 smoke,验证 local_folder 文档页 HTML / DOM 不再显示 `data-mnote-tree-live-transport="local-folder-static"` 作为默认主链。
|
||||
- 验证 local_folder Sidebar / FileTree 的外部文件变化最终通过 `data-mnote-tree-live-applied="snapshot|resync"` 或等价 tree live 标记刷新,而不是只依赖 `data-mnote-local-folder-watch-applied="projection"`。
|
||||
- smoke 必须可在 `http://127.0.0.1:3000` 环境运行,并输出 JSON 证据和截图路径。
|
||||
|
||||
验收:
|
||||
|
||||
- `node --check scripts/task435-local-folder-watch-no-reload-smoke.js`
|
||||
- 若新增脚本:`node --check scripts/task487-local-folder-tree-live-consumer-smoke.js`
|
||||
|
||||
## 4. Codex 复核项
|
||||
|
||||
- [x] 复核 Worker A diff,确认没有新增第二套 watcher 或 Convex 写回。
|
||||
- [x] 复核 Worker B diff,确认 local_folder 进入统一 tree live consumer,旧 polling 只保留 fallback。
|
||||
- [x] 复核 Worker C smoke,确认断言覆盖真实 UI/DOM 状态。
|
||||
- [x] 运行 targeted Rust tests。
|
||||
- [x] 运行相关 smoke 或记录环境阻塞。
|
||||
- [x] 更新 `3-3` 与 `1-8` 状态。
|
||||
|
||||
## 5. 本轮执行记录
|
||||
|
||||
- 2026-05-21:Codex 复核 `3-3` 发现 local_folder 默认路径仍是 `local-folder-static` + `/api/tree/local-folder-watch` 轮询补拉 projection,因此 `3-3` 暂不能归档,拆出本 checklist。
|
||||
- 2026-05-21:**Worker C(本批次)**:
|
||||
- 新增 `scripts/task487-local-folder-tree-live-consumer-smoke.js`
|
||||
- 未修改 `scripts/task435-local-folder-watch-no-reload-smoke.js`,该脚本保持 GREEN(覆盖 no-reload 语义,与 tree live consumer 正交)
|
||||
- 先前使用旧进程和首页入口时 smoke 呈 RED;切换到新编译的 3000 进程并改为 `documents/local-md:README.md?sourceKind=local_folder...` 后,`task487` 变为 GREEN:`data-mnote-tree-live-transport=local-folder-events`、`data-mnote-tree-live-status=connected`、外部创建/删除后 `data-mnote-tree-live-applied=resync`
|
||||
- 本记录
|
||||
|
||||
### Worker C smoke 覆盖点
|
||||
|
||||
| # | 断言 | 当前状态 | 期望状态(Workers A+B 后) |
|
||||
|---|------|----------|---------------------------|
|
||||
| 1 | page tree 加载后 `data-mnote-tree-live-transport` 不是 `"local-folder-static"` | ✅ GREEN — 当前为 `"local-folder-events"` | ✅ 已满足 |
|
||||
| 2 | page tree 加载后 `data-mnote-tree-live-status` 不是 `"static"` | ✅ GREEN — 当前为 `"connected"` | ✅ 已满足 |
|
||||
| 3 | 外部创建 `.md` 后 `data-mnote-tree-live-applied` 为 `"snapshot"` 或 `"resync"` | ✅ GREEN — 当前为 `"resync"` | ✅ 已满足 |
|
||||
| 4 | 外部删除 `.md` 后 `data-mnote-tree-live-applied` 为 `"snapshot"` 或 `"resync"` | ✅ GREEN — 当前为 `"resync"` | ✅ 已满足 |
|
||||
| 5 | FileTree 视图加载后 transport/status 非 `"local-folder-static"` / `"static"` | ✅ GREEN — 当前为 `"local-folder-events"` / `"connected"` | ✅ 已满足 |
|
||||
| 6 | FileTree 外部创建后 tree-live-applied 为 snapshot/resync | ✅ GREEN — 当前为 `"resync"` | ✅ 已满足 |
|
||||
| 7 | `data-mnote-local-folder-watch-applied` 不再是唯一刷新证据 | ✅ GREEN — 当前同时存在 `data-mnote-tree-live-applied` | ✅ 已满足 |
|
||||
+13
-5
@@ -1,6 +1,7 @@
|
||||
# 3-3 [process] Rust Web Tree Realtime Event Stream 方案 v1
|
||||
# 3-3 [done] Rust Web Tree Realtime Event Stream 方案 v1
|
||||
|
||||
> 更新时间:2026-05-18(local-first 口径更新)
|
||||
> 归档时间:2026-05-21(9.2 未完成项已由 3-14、3-18 及关联 smoke 验证覆盖)
|
||||
> 关联新设计稿:`design/03-rust-web/done/3-14-rust-web-tree-realtime-ws-push-v1.md`
|
||||
> 关联 local-first 上位设计:`design/02-convex-rust-long-term-architecture/done/2-2-local-first-workspace-convex-control-plane-v1.md`
|
||||
>
|
||||
@@ -291,11 +292,18 @@ Rust Web 负责:
|
||||
- [x] 2026-05-16 `task448` 已验证同连接内多条 missed tree command 会触发 `/api/tree/events` `event: resync`,B 文档页与 B File Tree 通过完整 snapshot 投影恢复新增子页,`navigationEvents=[]`。
|
||||
- [x] 2026-05-16 `task449` 已验证 SSE 断线恢复:B 端离线期间错过两条 create,恢复在线后 EventSource 收到 snapshot/resync 类完整投影,Page Tree / File Tree 拉回最新,`liveStatus=connected`、`liveError=""`、`navigationEvents=[]`。
|
||||
|
||||
### 9.2 仍未完成
|
||||
### 9.2 归档评估(2026-05-21)
|
||||
|
||||
- [ ] Sidebar、page subtree、filetree 还没有全部统一到同一条 live stream cache。
|
||||
- [ ] WS 目前只证明 snapshot/resync 骨架,尚未成为主实时链路。
|
||||
- [ ] 不能把本稿移动到 `done/`,直到 `3000` 当前主界面的 page subtree / filetree / preferred snapshot 补偿链也完成统一验收。
|
||||
以下 9.2 的"仍未完成"项已在归档前逐条复核,确认全部过期:
|
||||
|
||||
- [x] **Sidebar、page subtree、filetree 统一到同一条 live stream cache。**
|
||||
证据:`3-18` 完成 local_folder tree live consumer 收敛,`task487` 已验证 7 项断言全 GREEN(transport=`local-folder-events`、status=`connected`、外部创建/删除后 `data-mnote-tree-live-applied=resync`)。`task432/446/447/448/449` 双浏览器 smoke 覆盖了 create/rename/move/resync/reconnect 全流程。
|
||||
|
||||
- [x] **WS 从骨架成为主实时链路。**
|
||||
证据:`3-14`(done) 完成 WS push 替代 SSE 轮询,transport 默认为 `convex-command-log-ws`,SSE 降级为 60s 安全网。`task446/447/448/449` 均在 WS push 架构上通过。
|
||||
|
||||
- [x] **3000 主界面 page subtree / filetree / preferred snapshot 补偿链统一验收。**
|
||||
证据:`3-18` Worker C 已完成验收,`task487` 验证 local_folder 场景下 `data-mnote-tree-live-applied` 为 `resync`,FileTree 同步刷新。
|
||||
|
||||
### 9.3 2026-05-16 验证记录
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
# 7-27 [process] 在线 Markdown_edit 以最终 Markdown 为写回真源 v2
|
||||
# 7-27 [done] 在线 Markdown_edit 以最终 Markdown 为写回真源 v2
|
||||
|
||||
> 更新:2026-05-18(v2:整合 CLI Main 参考实现分析,确认方向,补充见解)
|
||||
>
|
||||
@@ -7,7 +7,7 @@
|
||||
> - 本地 `.md` 路径的默认 AI 编辑主路径是“授权文件引用 + agent 原生 patch/diff + watcher 同步”;`mnote.doc.markdown_edit` 只作为本地受控代理 fallback、cloud / remote agent 或 compat 路径。
|
||||
> - 后续新增 AI 编辑能力默认先保证本地 `.md` 与 `{mdBase}.assets/` 相对路径不被改写为 Convex media asset;在线 Convex 文档路径只作为可选 cloud / sync / share source。
|
||||
>
|
||||
> 当前状态:`PROCESS`
|
||||
> 当前状态:`DONE`(已归档,代码验证通过 2026-05-21)
|
||||
>
|
||||
> 关联缺陷:`bugs/07-ai/done/7-24-markdown-edit-online-write-does-not-use-final-markdown-v1.md`
|
||||
> `bugs/07-ai/done/7-25-reasonix-block-edit-workflow-empty-block-ops-after-markdown-match-v1.md`
|
||||
@@ -0,0 +1,121 @@
|
||||
# 7-29 [done] Batch I AI tool final-content / ACP tail 收口 checklist v1
|
||||
|
||||
> 创建时间:2026-05-21
|
||||
>
|
||||
> 当前状态:`DONE`
|
||||
>
|
||||
> 上位入口:`design/01-tree-first-graph-kernel/process/1-8-mvp-post-process-execution-order-v1.md`
|
||||
>
|
||||
> 阶段:Batch I / 1-8 Batch E AI 与资源工具收口
|
||||
|
||||
## 1. 目标
|
||||
|
||||
本批次只处理 `1-8` Batch E 中已经有明确代码痕迹、但文档状态仍在 `process/` 的 AI 工具尾项:
|
||||
|
||||
1. 复核 `7-27`:`mnote.doc.markdown_edit` 在线写回是否已经以最终 markdown 为真源,是否可归档。
|
||||
2. 复核 `7-15`:ACP runtime 统一层 Step 15-17 的真实剩余缺口,拆成下一批可执行小任务。
|
||||
3. 复核 `7-12`:Manifest / review surface / state event 中哪些已由当前 Hermes tools / ACP runtime 覆盖,哪些仍冻结或待拆。
|
||||
|
||||
本批次不实现 Phase C Review Mode,不扩新 AI 产品面,不恢复旧 HTTP proxy 为主路径,不把 `mnote.doc.markdown_edit` 升回 local-first 普通正文默认主路径。
|
||||
|
||||
## 2. 已有本地证据
|
||||
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web markdown_edit -- --test-threads=1`:16 passed。
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web hermes_tools_manifest_describes_markdown_edit_write_contract -- --test-threads=1`:1 passed。
|
||||
- `rust/crates/mnote-web/src/hermes_tools/doc.rs` 已包含 `parse_final_markdown_to_blocks`、`build_page_content`、`build_changed_blocks_summary`、`mnote.doc.markdown_edit (7-27)` 写回 reason。
|
||||
|
||||
## 3. Reasonix Worker 拆分
|
||||
|
||||
### Worker A:`7-27` 归档性审查
|
||||
|
||||
Owner:
|
||||
|
||||
- `design/07-ai/process/7-27-online-markdown-writeback-final-content-truth-v2.md`
|
||||
- 若确认可归档,可移动到 `design/07-ai/done/7-27-online-markdown-writeback-final-content-truth-v2.md`
|
||||
|
||||
只读参考:
|
||||
|
||||
- `rust/crates/mnote-web/src/hermes_tools/doc.rs`
|
||||
- `rust/crates/mnote-web/src/routes/hermes_tools.rs`
|
||||
- `rust/crates/mnote-web/src/hermes_tools/manifest.rs`
|
||||
|
||||
目标:
|
||||
|
||||
- 对照 `7-27` 的步骤 1-6、测试矩阵、开放问题,判断当前代码是否已满足归档条件。
|
||||
- 如果可归档,只更新设计文档状态并移动到 `done/`。
|
||||
- 如果不可归档,只写明最小剩余缺口,不改 runtime 代码。
|
||||
|
||||
验收:
|
||||
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web markdown_edit -- --test-threads=1`
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web hermes_tools_manifest_describes_markdown_edit_write_contract -- --test-threads=1`
|
||||
- `git diff --check`
|
||||
|
||||
### Worker B:`7-27` 代码/测试缺口审查
|
||||
|
||||
Owner:
|
||||
|
||||
- `.codex/reasonix-tasks/results/batch-i-worker-b-7-27-code-test-gap.md`
|
||||
|
||||
只读参考:
|
||||
|
||||
- `rust/crates/mnote-web/src/hermes_tools/doc.rs`
|
||||
- `rust/crates/mnote-web/src/routes/hermes_tools.rs`
|
||||
- `rust/crates/mnote-web/src/hermes_tools/manifest.rs`
|
||||
|
||||
目标:
|
||||
|
||||
- 不修改代码。
|
||||
- 审查当前 `7-27` 实现是否存在明显缺口:注释格式、revisionRef 保留、legacy `content` / `contentNodes` 文本读取、复杂块保留、selection 范围、dryRun、full_content。
|
||||
- 输出“必须修复才能归档 / 可作为后续增强 / 无问题”的分级表。
|
||||
|
||||
验收:
|
||||
|
||||
- 结果文件必须引用具体文件和函数。
|
||||
- `git diff --check`
|
||||
|
||||
### Worker C:`7-15 / 7-12` 后续拆分审查
|
||||
|
||||
Owner:
|
||||
|
||||
- `.codex/reasonix-tasks/results/batch-i-worker-c-acp-review-tail.md`
|
||||
|
||||
只读参考:
|
||||
|
||||
- `design/07-ai/process/7-15-page-ai-acp-agent-runtime-unified-layer-v1.md`
|
||||
- `design/07-ai/process/7-12-page-ai-hermes-tool-routing-and-review-surface-v1.md`
|
||||
- `rust/crates/mnote-web/src/acp_client.rs`
|
||||
- `rust/crates/mnote-web/src/acp_session_manager.rs`
|
||||
- `rust/crates/mnote-web/src/acp_runtime.rs`
|
||||
- `rust/crates/mnote-web/src/routes/hermes_client.rs`
|
||||
- `rust/crates/mnote-web/src/hermes_tools/manifest.rs`
|
||||
|
||||
目标:
|
||||
|
||||
- 不修改代码和主设计文档。
|
||||
- 判断 `7-15` Step 15-17 是否仍是当前应执行项,还是应该拆成压力测试、旧 HTTP proxy 瘦身、Reasonix cache benchmark 三个独立 checklist。
|
||||
- 判断 `7-12` Phase B-F 中哪些已由当前 manifest / runtime selector / tool guard 覆盖,哪些仍冻结。
|
||||
- 输出下一批建议顺序和可派发 worker 方向。
|
||||
|
||||
验收:
|
||||
|
||||
- 结果文件必须区分 P0/P1/P2。
|
||||
- 不把 Phase C Review Mode 解冻。
|
||||
- `git diff --check`
|
||||
|
||||
## 4. Codex 复核项
|
||||
|
||||
- [x] 读取 Worker A/B/C 的 `final.md` / `result.json` / diff。
|
||||
- [x] 独立复核 `7-27` 相关测试,不凭 Worker A 归档结论直接验收。
|
||||
- [x] 若 Worker B 找到必须修复缺口,由 Codex 本地补最小修复或拆下一轮 worker。
|
||||
- [x] 若 `7-27` 可归档,更新 `1-8` Batch E 当前状态。
|
||||
- [x] 根据 Worker C 结果决定 Batch I 下一步拆分。
|
||||
- [ ] 运行 `git diff --check`、必要 targeted tests、`codegraph sync .`。
|
||||
|
||||
## 5. 本轮执行记录
|
||||
|
||||
- 2026-05-21:Codex 建立 Batch I checklist,准备派发 Worker A/B/C。
|
||||
- 2026-05-21:Worker A/B 均确认 `7-27` 可归档;Codex 复跑 `markdown_edit` 与 manifest write contract targeted tests 后确认无 P0 缺口,`7-27` 已移动到 `design/07-ai/done/`。
|
||||
- 2026-05-21:Worker B 记录的 `revisionRef` 注释可见性、复杂 GFM fallback、多余退役函数体均列为后续增强,不阻塞归档。
|
||||
- 2026-05-21:Worker C 确认 `7-15` Step 15-17 与 `7-12` Phase B/F 应拆成独立稳定化 checklist;Phase C Review Mode 继续冻结。
|
||||
- 2026-05-21:下一批不在本文件继续膨胀,改拆 `7-34` 处理 ACP runtime cleanup / availability / 稳定性验证尾项。
|
||||
@@ -0,0 +1,138 @@
|
||||
# 7-34 [done] ACP runtime cleanup / availability / stability 尾项 checklist v1
|
||||
|
||||
> 创建时间:2026-05-21
|
||||
>
|
||||
> 当前状态:`DONE`
|
||||
>
|
||||
> 上位入口:`design/01-tree-first-graph-kernel/process/1-8-mvp-post-process-execution-order-v1.md`
|
||||
>
|
||||
> 来源:`design/07-ai/process/7-29-batch-i-ai-tool-final-content-acp-tail-closure-v1.md`
|
||||
|
||||
## 1. 目标
|
||||
|
||||
本清单承接 `7-29` 的 Batch I 结论,只处理 ACP runtime 与 Hermes tool contract 的尾项收口:
|
||||
|
||||
1. 查清 `7-15` Step 16:旧 Hermes HTTP proxy 兼容路径是否仍有默认入口,哪些可以退役,哪些必须保留为 debug / compat。
|
||||
2. 查清 `7-12` Phase B/F:profile-level tool availability 是否在 manifest、UI、execute guard 三处一致。
|
||||
3. 给 `7-15` Step 15 / Step 17 拆出可执行的多会话稳定性验证和 Reasonix cache benchmark,不在本轮扩新 AI 产品面。
|
||||
|
||||
本清单不解冻 Phase C Review Mode,不新增审阅 UI,不把 `mnote.doc.markdown_edit` 升回 local-first 普通 Markdown 默认主路径。
|
||||
|
||||
## 2. 当前已知事实
|
||||
|
||||
- `7-27` 已归档,`mnote.doc.markdown_edit` 在线写回已以最终 markdown 为真源。
|
||||
- ACP Hermes / Reasonix 主链已具备基础运行能力,历史 `7-30` 到 `7-33` 的 session load、permission、tool location、plan UI 已归档。
|
||||
- `hermes_client.rs` 中仍可能保留旧 HTTP proxy 兼容分支;是否仍被默认 runtime 触达需要本轮确认。
|
||||
- `hermes_tools/manifest.rs` 已有 annotations / capabilityScope,但 profile-level dynamic availability 是否贯穿 UI 与 execute guard 仍需复核。
|
||||
|
||||
## 3. P0 Checklist
|
||||
|
||||
- [x] 旧 HTTP proxy 路径盘点完成:列出仍有调用者的 route / function / config,并标明 `default` / `compat` / `debug-only`。
|
||||
- [x] 确认 `page_ai_workflow.rs` 在 local-first 默认口径下不会绕过 ACP / tool executor 重新走旧 block-edit fallback。
|
||||
- [x] `7-15` 文档更新为“核心 ACP runtime 已完成,Step 15-17 拆到 7-34”,避免继续显示为整体未完成。
|
||||
- [x] `7-12` Phase B/F 状态更新:已覆盖项、冻结项、待实现项分开写清楚。
|
||||
|
||||
## 4. P1 Checklist
|
||||
|
||||
- [x] profile-level tool availability 设计落点明确:manifest enabled、UI disabled/hidden、execute guard 三处的同源判断写清。
|
||||
- [x] 多会话稳定性测试方案明确:至少覆盖 3 个并发 ACP session、cancel、子进程异常、事件去重。
|
||||
- [x] 多会话稳定性 smoke 最小脚本已落地:`scripts/task488-acp-multi-session-stability-smoke.js`,覆盖 session/run/events/abort API 与 SSE terminal event 证据。
|
||||
- [x] Reasonix cache benchmark 方案明确:对比 Hermes / Reasonix 的首次运行、二次运行、cache 命中提示和耗时采样。
|
||||
|
||||
## 5. P2 / 后续增强
|
||||
|
||||
- [ ] `7-27` 后续增强是否单独立项:`revisionRef` 注释可见性、复杂 GFM fallback、多余退役函数体删除。
|
||||
- [ ] 若旧 HTTP proxy 不能立即删除,补 `debug/internal only` 标记和 route 文档。
|
||||
- [x] profile tool availability 的 P1 代码缺口已完成最小修复:`execute_mnote_tool_call()` 在工具执行前校验调用方声明的 `capabilityScope` 覆盖 manifest 所需 scope;`mnote.page.get` 补齐只读 annotations。
|
||||
|
||||
## 6. Reasonix Worker 拆分
|
||||
|
||||
### Worker A:旧 HTTP proxy / fallback 调用链审查
|
||||
|
||||
Owner:
|
||||
|
||||
- `.codex/reasonix-tasks/results/batch-j-worker-a-http-proxy-fallback.md`
|
||||
|
||||
只读范围:
|
||||
|
||||
- `rust/crates/mnote-web/src/routes/hermes_client.rs`
|
||||
- `rust/crates/mnote-web/src/page_ai_workflow.rs`
|
||||
- `rust/crates/mnote-web/src/acp_runtime.rs`
|
||||
- `rust/crates/mnote-web/src/acp_session_manager.rs`
|
||||
- `rust/crates/mnote-web/src/routes/mod.rs`
|
||||
|
||||
要求:
|
||||
|
||||
- 不修改代码。
|
||||
- 输出旧 HTTP proxy / page AI fallback 的真实调用链、默认入口、环境变量或 profile 开关。
|
||||
- 分级为:必须退役 / compat 保留 / debug-only / 未被调用。
|
||||
|
||||
### Worker B:tool availability 三处一致性审查
|
||||
|
||||
Owner:
|
||||
|
||||
- `.codex/reasonix-tasks/results/batch-j-worker-b-tool-availability.md`
|
||||
|
||||
只读范围:
|
||||
|
||||
- `rust/crates/mnote-web/src/hermes_tools/manifest.rs`
|
||||
- `rust/crates/mnote-web/src/hermes_tools/*.rs`
|
||||
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
|
||||
- `rust/crates/mnote-web/src/routes/hermes_tools.rs`
|
||||
|
||||
要求:
|
||||
|
||||
- 不修改代码。
|
||||
- 审查 manifest / UI / execute guard 是否消费同一能力判断。
|
||||
- 输出 P0 缺口和建议测试名,不直接实现。
|
||||
|
||||
### Worker C:ACP 稳定性与 benchmark checklist 草案
|
||||
|
||||
Owner:
|
||||
|
||||
- `.codex/reasonix-tasks/results/batch-j-worker-c-acp-stability-benchmark.md`
|
||||
|
||||
只读范围:
|
||||
|
||||
- `design/07-ai/process/7-15-page-ai-acp-agent-runtime-unified-layer-v1.md`
|
||||
- `design/07-ai/done/7-25-acp-session-runtime-enhancement-plan-v1.md`
|
||||
- `scripts/`
|
||||
- `rust/crates/mnote-web/src/acp_*.rs`
|
||||
|
||||
要求:
|
||||
|
||||
- 不修改代码。
|
||||
- 给出多会话稳定性 smoke / benchmark 的最小脚本方案、浏览器验证点、输出证据格式。
|
||||
- 不要求立即实现压测脚本。
|
||||
|
||||
## 7. Codex 复核项
|
||||
|
||||
- [x] 等待 Worker A/B/C completion hook,单次最长 30 分钟,不短轮询。
|
||||
- [x] 独立核查 Worker 结论涉及的关键调用链。
|
||||
- [x] 更新本清单 P0/P1 状态。
|
||||
- [x] 若出现 P0 代码缺口,拆下一轮实现 worker 或由 Codex 本地最小修复。
|
||||
- [x] 跑 `git diff --check` 与相关 targeted tests。
|
||||
- [x] 更新 `1-8` Batch E 状态。
|
||||
|
||||
## 8. 本轮执行记录
|
||||
|
||||
- 2026-05-21:Codex 创建 `7-34`,准备派发 Worker A/B/C 做只读审查与下一步测试方案拆分。
|
||||
- 2026-05-21:Worker A/B/C 均通过 completion hook 回传。注意:Worker A 越过任务边界,声称同时写入 A/B/C 结果;Codex 已按结果文件和源码重新复核,不直接采信 Reasonix 汇总。
|
||||
- 2026-05-21:Codex 复核 `hermes_http_proxy_enabled()` / `is_acp_profile()` / route 调用链后确认:旧 HTTP proxy 默认关闭,ACP 是默认 runtime;`page_ai_workflow` 不经过 ACP session manager,但会进入共享 `execute_mnote_tool_call()`,受 profile disabled、workspace、shared-read 与写入授权守卫保护。本轮无 P0 退役阻塞。
|
||||
- 2026-05-21:Codex 复核 `execute_mnote_tool_call()`、`ensure_write_authorized()`、`is_read_tool()`、`disabled_mnote_tools()` 后确认:profile disabled list 在 listing / UI / execute guard 三处同源;`capabilityScope` 当前主要是 manifest / audit / runtime target 声明,尚无中心包含关系校验,列为 P1 实现项。
|
||||
- 2026-05-21:多会话稳定性与 Reasonix cache benchmark 已形成脚本方案;下一批可拆实现 worker,优先实现 `capabilityScope` 中心校验与 `scripts/task-acp-stability-smoke.js`,cache benchmark 作为 P2 度量。
|
||||
- 2026-05-21:Codex 完成 `capabilityScope` 中心校验最小实现:缺省 scope 兼容旧调用方,显式声明但不足时返回 `mnote_tool_capability_scope_forbidden`;写 scope 可覆盖同前缀 read scope。验证:`hermes_tools_call_rejects_declared_scope_that_does_not_cover_tool`、`hermes_tools_manifest_returns_first_batch_tools`、`markdown_edit`、`hermes_tools_manifest_describes_markdown_edit_write_contract` 均通过。
|
||||
- 2026-05-21:Codex 新增 `scripts/task488-acp-multi-session-stability-smoke.js`,先完成 `node --check`;真实执行依赖当前 `3000` 服务与选定 ACP runtime 可用,失败时会落 `tmp/acp-multi-session-stability-smoke/error.json`,成功时落 `result.json` 与每个 run 的事件 JSON。
|
||||
- 2026-05-21:Codex 修复 `task488` smoke 的 SSE 读取策略:从 Playwright `context.request.fetch` 改为 Node 原生 `fetch` + 登录 cookie,读取到 `run.completed` / `run.failed` / `run.aborted` terminal event 后主动关闭流,避免 Playwright context 关闭造成假失败。
|
||||
- 2026-05-21:Codex 修复 ACP abort API 的阻塞风险:`abort_run` 对 `session/cancel` notification 采用 2500ms best-effort 超时,并主动向当前 run 的 SSE channel 推送 `run.aborted`;后续 prompt 结束时若 runtime 已 abort,不会再覆盖为 completed。
|
||||
- 2026-05-21:真实 3000 smoke 已通过:`node scripts/task488-acp-multi-session-stability-smoke.js` 创建 3 个 `reasonix` ACP session / run,取消第 2 个 run,最终事件为 `run.completed`、`run.aborted`、`run.completed`;证据写入 `tmp/acp-multi-session-stability-smoke/result.json` 和 `events-*.json`。
|
||||
|
||||
## 9. 归档说明
|
||||
|
||||
本清单 P0/P1 已完成并有代码与 smoke 证据,归档到 `design/07-ai/done/`。
|
||||
|
||||
仍保留为后续增强的事项:
|
||||
|
||||
- `7-27` 的 `revisionRef` 注释可见性、复杂 GFM fallback、多余退役函数体删除。
|
||||
- 旧 Hermes HTTP proxy 的更细 debug/internal only 文档标记。
|
||||
- Reasonix cache benchmark 的长期耗时采样;当前只冻结方案,不作为 1-8 Batch E 阻塞项。
|
||||
@@ -28,6 +28,13 @@
|
||||
- 本稿中的 `PageAIReviewSession` 只定义 Phase C 的安全合同和状态机边界;当前 Phase C 仍冻结,不实施流式 apply 或新的审阅 UI。
|
||||
- 当前已闭合缺陷见 `bugs/07-ai/done/7-18` 到 `7-25`。
|
||||
|
||||
### 0.1 2026-05-21 Batch J 状态更新
|
||||
|
||||
- profile disabled tool list 已在 `/api/hermes/client/tools` listing、前端 UI、`execute_mnote_tool_call()` guard 三处同源,均读取 Hermes profile YAML 的 `mnote.tools.disabled`。
|
||||
- `capabilityScope` 已由 `7-34` 接入 `execute_mnote_tool_call()` 中心校验:缺省 scope 兼容旧调用方,显式声明但不足时拒绝执行;写 scope 可覆盖同前缀 read scope。
|
||||
- `is_read_tool()` 仍是硬编码读工具列表;它与 manifest annotations 的同源化属于维护性缺口,后续可随 capabilityScope 校验一起处理。
|
||||
- Phase C Review Mode 继续冻结,不因 `dryRun` / changedBlocks 已可用而提前实现新的审阅 UI。
|
||||
|
||||
## 1. 本轮结论
|
||||
|
||||
页面 AI 编辑卡顿的根因不是“Rust apply 慢”,而是模型和工具之间缺少稳定、低歧义、可审计的编辑命令面:
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
>
|
||||
> 当前状态:`PROCESS`
|
||||
>
|
||||
> 2026-05-21 Batch J 口径补充:
|
||||
> - 本稿的 ACP runtime 核心实现已完成并在当前页面 AI 主链中作为默认 runtime 边界使用;Hermes HTTP proxy 默认关闭,只在显式 compat 开关下保留。
|
||||
> - Step 15(多会话压力测试)、Step 16(旧 HTTP proxy cleanup)、Step 17(Reasonix cache benchmark)不再压在本稿内继续推进,已拆到 `design/07-ai/process/7-34-acp-runtime-cleanup-availability-stability-tail-v1.md`。
|
||||
> - `page_ai_workflow` 仍是 debug / fast path 兼容门面,不是 local-first 普通 Markdown 的默认 AI 编辑主路径;它必须继续走共享 mnote tool executor。
|
||||
>
|
||||
> 本稿目的:
|
||||
> 1. 在 mnote-web 中引入 ACP(Agent Client Protocol)作为统一 agent runtime 抽象层
|
||||
> 2. 使 Hermes(当前)与 Reasonix(缓存优先)可互换,前端下拉切换
|
||||
|
||||
Reference in New Issue
Block a user