Files
mnote/bugs/07-ai/done/7-57-onlyoffice-plugin-bridge-p2-productization-tail-v1.md
T
lix-2026 1882db7681 收口 MNote P0 P1 P2 审查尾项
- 归档 OnlyOffice live bridge、Page AI、mindmap、design governance 与相关 bug 条目
- 补齐 MinerU OCR 后端 runtime 合同与 smoke/test 基线
- 收口 ChatOnly/Doubao、ObjectIdentity、Page Aggregate compat 与 runtime owner 文档口径

验证:
- cargo test --manifest-path rust/Cargo.toml -p mnote-web local_ocr -- --test-threads=1
- cargo test --manifest-path rust/Cargo.toml -p mnote-web onlyoffice_bridge -- --test-threads=1
- git diff --check
- git diff --cached --check
- codegraph index . --force && codegraph status .
- codegraph sync . && codegraph status .
2026-06-01 09:29:12 +08:00

81 lines
5.4 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.
# 7-57 OnlyOffice Plugin Bridge P2 产品化尾项
## 状态
- 状态:done
- Owner07-ai / ONLYOFFICE live bridge / Page AI target runtime
- 发现时间:2026-06-01
- 归档时间:2026-06-01
## 现象
OnlyOffice live bridge 的 P0 安全阻断已完成:显式 session、resource scope、真实 iframe 多 session 隔离、非 dry-run 写入落点和 Page AI target picker 到 live session 的绑定均已有 smoke 证据。但 `7-43` 仍保留若干 P2 产品化尾项,缺少独立 bug 落点。
## 证据
- `design/07-ai/process/7-43-onlyoffice-plugin-bridge-design-v1.md` 仍保留 P2 follow-upOffice 主文档加载噪音治理、第三批 recipe 逐项实测。`session/current``session/close` 与 session state `docKey/pageOrigin` 已在 2026-06-01 续补完成。
- 已有 smoke 证明安全主路径完成:
- `scripts/task515-onlyoffice-live-scope-http-smoke.js`
- `scripts/task516-onlyoffice-bridge-multisession-browser-smoke.js`
- `scripts/task517-onlyoffice-bridge-plugin-direct-smoke.js`
- `scripts/task518-onlyoffice-real-iframe-session-scope-smoke.js`
- `scripts/task523-page-ai-onlyoffice-real-target-session-smoke.js`
## 影响
- P0 安全问题已经不再阻塞;P2 recipe 扩展已收窄为 `7-43` 的矩阵化后续,不再作为本文 bug 阻塞项。
- `7-43` 已区分已完成安全项和后续产品化项。
## 下一步
1. 记录并治理 Office 主文档加载噪音,例如 DocumentServer `errorCode=-18`、WebSocket / polling 失败等。(已完成)
2. 第三批 recipe 必须逐项实测后再暴露给 agent,不凭 API 名称直接开放。(已收窄为矩阵规则)
## 验收
- [x] `session/current``session/close` API 已实现并有 Rust route 测试。
- [x] session state 已补 `docKey` / `pageOrigin`,并由 plugin config / register session / list sessions smoke 证明透传。
- [x] Office 加载噪音有明确分类、截图或日志证据,并不误判为打开成功。
- [x] 每个已暴露 recipe 保留 Rust unit、browser direct smoke 和 tool API smoke 要求;未暴露第三批 recipe 已明确不对 agent 宣称可用。
- [x] 插件执行层已补 editorType guard`document.*` / `sheet.*` / `presentation.*` 不能跨 Word / Excel / PPT session 串用。
- [x] `design/07-ai/process/7-43...` 中 P0 已完成项与 P2 尾项拆分清晰。
## 2026-06-01 session lifecycle 续补记录
- `rust/crates/mnote-web/src/routes/onlyoffice_bridge.rs` 已新增 `current_session` / `close_session`,并把 `docKey` / `pageOrigin` 纳入 `BridgeSessionState``BridgeSessionPayload``BridgeSessionInfo` 和 plugin index state。
- `/onlyoffice` 页面会把当前 `fileState.docKey``location.origin` 传给 bridge plugin configmock plugin direct smoke 已验证 plugin 注册后 session 中存在 `docKey/pageOrigin`
- `scripts/task516-onlyoffice-bridge-multisession-browser-smoke.js` 已扩展 `session/current``session/close` 和关闭后 session 不再可取 command 的断言。
- 已通过:
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web onlyoffice_bridge -- --test-threads=1`
- `node scripts/task517-onlyoffice-bridge-plugin-direct-smoke.js`
- `MNOTE_UI_BASE_URL=http://127.0.0.1:3302 node scripts/task516-onlyoffice-bridge-multisession-browser-smoke.js`
## 2026-06-01 噪音分类与主文档失败断言
- `scripts/task518-onlyoffice-real-iframe-session-scope-smoke.js` 已新增 `classifyOnlyOfficeSignals`,把 bridge plugin translation 404、ONLYOFFICE 内置插件噪音和主文档加载失败分开记录。
- smoke 会断言 MNote bridge session 注册与 command loop 可用,同时要求 `mainDocument.ready=true`
- `errorCode=-18` 不再被当作可忽略噪音;一旦在 console 或 editor error log 中出现,`task518` 会失败并把它归为主文档失败。
- `design/07-ai/process/7-43-onlyoffice-plugin-bridge-design-v1.md` 头部口径已声明 P0 session/scope 安全阻断完成,本文和 `7-43` 只继续跟踪 P2 recipe 扩展与产品化尾项。
本文继续保持 `process` 的剩余原因:
- 已归档。第三批 recipeWord 图片/修订/content controls/表格行列样式、Excel 筛选/工作表删除移动、PPT 图片/重排/主题布局/shape 样式位置、PDF/forms)仍需逐项实测后再开放给 agent,但这些是后续 `7-43` 矩阵项,不再作为本文 bug 阻塞。
## 2026-06-01 归档记录
Recipe 产品化矩阵:
| 类别 | 当前状态 | 归档口径 |
| --- | --- | --- |
| Word 基础读写 / 表格 / 评论 | exposed-with-tests | 已暴露,继续要求 Rust unit、browser direct smoke、tool API smoke。 |
| Excel sheets / range / format / dimensions / sort / chart | exposed-with-tests | 已暴露,Excel sort/chart 已纳入当前 capabilities。 |
| PPT slide texts / shapes / replace / delete / table / clear / shape | exposed-with-tests | 已暴露,PPT table/clear/shape 已纳入当前 capabilities。 |
| Word 图片 / 修订 / content controls / 表格增删行列和样式 | not-exposed | 仅作为候选,不向 agent 宣称可用。 |
| Excel 筛选 / 工作表删除移动 | not-exposed | 仅作为候选,不向 agent 宣称可用。 |
| PPT 图片 / slide 重排 / 主题布局 / shape 样式位置 | not-exposed | 仅作为候选,不向 agent 宣称可用。 |
| PDF / forms 字段读取与填写 | blocked-by-api | 需先确认 ONLYOFFICE 社区版 Plugin API 可行性。 |
验证:
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web onlyoffice_bridge -- --test-threads=1`