Files
mnote/.codex/reasonix-tasks/2026-05-21-batch-e-worker-a-gfm-save-error.md
T

59 lines
2.3 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 AGFM AST 保存失败与降级策略尾项
Project root: `/mnt/Data1T/mnote`
你不是唯一 worker。不要回滚、覆盖或整理他人改动;只处理本任务 ownership 范围。
## 背景
上位 checklist`design/01-tree-first-graph-kernel/process/1-12-batch-e-p1-p2-tail-execution-checklist-v1.md`
当前 `design/03-rust-web/process/3-13-rust-web-local-markdown-gfm-ast-parser-migration-v1.md` 仍保留几个尾项:
- 保存失败时保留编辑器状态并给出可解释错误。
- 表格带 mark 单元格 / 不支持结构的降级策略测试仍不足。
- `web_shell.rs``legacyStylesToTiptapMarks` 等临时适配分支是否可移除尚未判定。
## Ownership
允许修改:
- `design/03-rust-web/process/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`
- 可新增或修改一个 `scripts/task48*-local-markdown-save-error-*.js`
只读审查,不允许修改:
- `rust/crates/mnote-web/src/routes/web_shell.rs`
禁止修改:
- AI / Hermes / OnlyOffice 文件
- FileTree action / trash 代码
- `rust/crates/mnote-web/src/routes/web_shell.rs`(只读审查即可,避免与 Worker B 冲突)
- git commit、git reset、git checkout
## 任务
1. 先审查代码,确认保存失败状态保留是否已有行为和测试。
2. 尽量补一个最小单测或 smoke,覆盖保存失败时编辑器仍保留当前内容,并能显示可解释错误。
3. 补表格带 mark 单元格或不支持结构降级策略的最小测试;如果已有测试足够,更新文档证据。
4. 只读审查 `web_shell.rs` 临时 legacy marks 分支;不能安全移除就把 `3-13` 的“必须移除”改为“保留兼容层 + 明确退出条件”。不要修改 `web_shell.rs`
5. 更新 `3-13` 的本轮执行记录,不把未验证项标完成。
## 验收命令
- `cargo test -p mnote-web local_markdown -- --test-threads=1`
- `cargo test -p mnote-web web_shell -- --test-threads=1`
- 如新增 smoke`node --check scripts/task48*-local-markdown-save-error-*.js`,并尽量实跑。
## 最终回复
请列出:
- 修改文件
- 运行的命令和结果
- 未完成项
- 风险或需要 Codex 再判断的点