Document the VSCode-like local-first product shape, demote Convex to a control-plane role, and retire stale architecture drafts. Add local workspace migration/export references plus smoke coverage for no-Convex managed workspace startup, local markdown title/body/options persistence, asset upload behavior, and Convex fixture export. Verification: git diff --cached --check; node scripts/check-local-first-convex-guard.js --staged; node scripts/task444-convex-workspace-export-local-fixture-smoke.js; node scripts/task166-local-first-managed-workspace-no-convex-smoke.js; node scripts/task167-local-markdown-title-body-options-no-convex-smoke.js
42 lines
1.0 KiB
Markdown
42 lines
1.0 KiB
Markdown
# 7-33 [done][bug] markdown_edit 全部 search 失败仍返回成功 v1
|
||
|
||
> 发现时间:2026-05-18
|
||
>
|
||
> 状态:`[done]`
|
||
>
|
||
> 关联主线:`07-ai`
|
||
|
||
## 1. 问题定义
|
||
|
||
`mnote.doc.markdown_edit` 逐条执行 search/replace 时,如果所有 search 都失败,旧实现仍会继续进入写回阶段,并返回:
|
||
|
||
```json
|
||
{"ok": true, "operationsApplied": 0}
|
||
```
|
||
|
||
这会让页面 AI fast workflow 把“没有改动”误报为编辑成功。
|
||
|
||
## 2. 修复
|
||
|
||
- 当 `applied == 0` 时立即返回 `mnote_markdown_edit_no_operations_applied`。
|
||
- 不再执行本地文件写入或在线 `page.body.save`。
|
||
- 新增回归测试 `hermes_tools_markdown_edit_rejects_no_applied_operations`。
|
||
|
||
## 3. 验证
|
||
|
||
RED:
|
||
|
||
```bash
|
||
cargo test --manifest-path rust/Cargo.toml -p mnote-web hermes_tools_markdown_edit_rejects_no_applied_operations -- --nocapture
|
||
```
|
||
|
||
旧实现返回 `200`。
|
||
|
||
GREEN:
|
||
|
||
```bash
|
||
cargo test --manifest-path rust/Cargo.toml -p mnote-web hermes_tools_markdown_edit_rejects_no_applied_operations -- --nocapture
|
||
```
|
||
|
||
结果:`1 passed`。
|