DOC-FULL-036 P1 | Markdown Block 完整性测试 【status:todo】 #88

Closed
opened 2026-06-07 11:45:18 +08:00 by wangdl · 2 comments
Owner

Fixture: complex_markdown.md。验证 8 种 block 正确解析、blockId 稳定、heading level、code language、table 结构、image alt/src、空文件、纯文本退化。

M-DOC-FULL v2 里程碑 issue。

## Fixture: complex_markdown.md。验证 8 种 block 正确解析、blockId 稳定、heading level、code language、table 结构、image alt/src、空文件、纯文本退化。 M-DOC-FULL v2 里程碑 issue。
wangdl added this to the M-DOC-FULL:Document Runtime 完整阅读内核与学习事件协议 milestone 2026-06-07 11:45:18 +08:00
wangdl changed title from DOC-FULL-036 P1 | Markdown Block 完整性测试 to DOC-FULL-036 P1 | Markdown Block 完整性测试 【status:todo】 2026-06-07 19:15:10 +08:00
Author
Owner

审查结论:document runtime 当前有文件类型识别/MaterialType/PreviewMode/DocumentInfo(基本)/Markdown解析/Text解析/ImageMeta/Search(V1 Markdown+Text)/NoteAnchor(V1)/ReadingEvent(V1)/ReadingPosition(V1)/EventBuffer(V1基础)/iOS构建/UniFFI绑定/docs。但 V2 核心模型(ReadingSession/EventV2/ActiveTimeTracker)不存在,EventBuffer 缺 ack/failed,Position 缺 camelCase+clamp,PDF/EPUB/Office 为 stub,测试覆盖不足 V2。

本 Issue: blockId 稳定性/heading level/code language/table/image 测试不存在。

状态: status:todo
工作类型: work:test

## 审查结论:document runtime 当前有文件类型识别/MaterialType/PreviewMode/DocumentInfo(基本)/Markdown解析/Text解析/ImageMeta/Search(V1 Markdown+Text)/NoteAnchor(V1)/ReadingEvent(V1)/ReadingPosition(V1)/EventBuffer(V1基础)/iOS构建/UniFFI绑定/docs。但 V2 核心模型(ReadingSession/EventV2/ActiveTimeTracker)不存在,EventBuffer 缺 ack/failed,Position 缺 camelCase+clamp,PDF/EPUB/Office 为 stub,测试覆盖不足 V2。 **本 Issue**: blockId 稳定性/heading level/code language/table/image 测试不存在。 **状态**: status:todo **工作类型**: work:test
Author
Owner

验收完成(同 #85)

验收内容

  • 8 种 block 正确解析(#85 验收测试)
  • blockId 稳定(UUID v4,非空 + 唯一)
  • heading level(h1/h2/h3 分别验证)
  • code language(rust 语言标记)
  • table 结构(headers+rows,列宽匹配)
  • image alt/src(alt 存在 + src 非空)
  • 空文件(test_empty_markdown — 返回空 Vec)
  • 纯文本退化(Paragraph 正常解析)

新增

  • fixtures/markdown/complex_markdown.md
  • markdown.rs: test_fixture_complex_markdown — 全量块类型 + 结构验证 + blockId 唯一性

验证

cargo test markdown — 11 passed
## 验收完成(同 #85) ### 验收内容 - [x] 8 种 block 正确解析(#85 验收测试) - [x] blockId 稳定(UUID v4,非空 + 唯一) - [x] heading level(h1/h2/h3 分别验证) - [x] code language(rust 语言标记) - [x] table 结构(headers+rows,列宽匹配) - [x] image alt/src(alt 存在 + src 非空) - [x] 空文件(`test_empty_markdown` — 返回空 Vec) - [x] 纯文本退化(Paragraph 正常解析) ### 新增 - `fixtures/markdown/complex_markdown.md` - `markdown.rs`: `test_fixture_complex_markdown` — 全量块类型 + 结构验证 + blockId 唯一性 ### 验证 ``` cargo test markdown — 11 passed ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wangdl/zhixi-document-runtime#88
No description provided.