You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] doc: successful +update / +media-insert writes reported as read-back verification failure; block list hasMore stays true past the end #1465
On v1.0.63 (commit 4cd5d05), document writes that actually succeed are reported as failed by the built-in read-back verification, and doc block list pagination signals more pages after the last block. Together they make agents treat successful writes as partial_success and tempt them to retry (which the error text itself forbids).
Related: #1103 reports the same "applied remotely, read-back verification fails" pattern for aitable composites.
Environment
dingtalk-workspace-cli 1.0.63, Edition open, MCP Static Endpoint Mode, Linux (WSL2)
Target: a normal online doc (adoc) of about 117 top-level blocks with tables, callouts (container / colorBlocks), links and one inline image
message 文档写入已经执行,但回读验证失败;请先检查当前内容,不要直接重试写入, cause 回读结果未包含预期内容
A manual +fetch / doc block list read-back shows the content was fully written every time (6 of 6 block operations, plus the overwrite).
dws doc +media-insert --file ./image.png --ref-block <table block> --where after --yes uploads and inserts the image, then fails verification with cause 媒体资源在有界回读窗口内仍无法读取: list_document_blocks 声明仍有下一页但当前页为空. The image block is present on read-back.
dws doc block list --content-format jsonml pagination:
--end-index is exclusive: --start-index 0 --end-index 49 returns 49 blocks (indices 0–48), so paging with s .. s+49 silently skips every 50th block. The help example (--start-index 0 --end-index 5) does not state which way it works.
A page past the end (--start-index 150 on a 117-block document) returns blocks: [] with hasMore: true, matching the media-insert verification cause above.
Expected
Write verification reports success when the content is present, or reports unknown with a pointer to read back, rather than verify: failed.
hasMore is false once the last block has been returned; an empty page never carries hasMore: true.
--end-index semantics (inclusive / exclusive) are documented in the help text.
Reproduce
Create a doc from JSONML containing a few tables and one container callout (dws doc +create --doc-format jsonml).
Run any of the writes above against it, then read back with +fetch.
Call doc block list with --start-index beyond totalCount and inspect hasMore.
Activity
AlwaysLee commentedon Oct 13, 2026
Hi @dzshzx 👋
感谢报告这个问题!你提供的复现步骤和详细环境信息非常有助于定位。三个子问题已全部修复并部署。
问题原因
服务端
list_document_blocks接口的分页计算存在缺陷:hasMore在越界时仍返回true— 分页终止条件计算错误,导致空页也声称"还有下一页"--end-index表现为 exclusive — 闭区间计算差一,每页最后 1 个块被静默丢弃修复状态
服务端已修复并上线,
hasMore、totalCount、nextStartIndex在jsonml和element两种格式下行为一致且正确。写入操作(+update/+media-insert/block_replace)的回读验证现在可以正常分页收敛,不再误报verify: failed。如果问题仍然存在,请提供
dws --version和--verbose日志,我们会继续跟进 🔧