ElyPDF: page pictures stay through an edit until they repaint (P-02)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-09 12:50:11 -04:00
1 parent 139e8f6250
commit 04040a2a03
8 files changed
+60 -9

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
FAIL
apps/ely-pdf/src/tests/input.rs:340 — 新增回归测试仅检查缩略图缓存与 Arc 身份,P-02 要求的等待期间持续绘制旧图缺少断言。具体复现:在隔离副本中将 side.rs:156 的图片读取加上 `.filter(|_| !read.thumbs_stale.contains(&(page, dark)))`,编辑后的过期缩略图随即停止绘制,新增测试 `an_edit_keeps_page_pictures_until_they_repaint` 仍通过。另一个探针暂停替换请求、清除旧图的图集项并重绘,原实现通过,该变异实现因旧图未进入绘制而失败;恢复原实现后再次通过。证据保存在 `/tmp/ely-p02-mutation-existing.log`、`/tmp/ely-p02-mutation-visual.log`、`/tmp/ely-p02-restored.log`。修复方向:给新增测试加入可控的替换等待阶段,验证旧缩略图在该阶段实际绘制,并验证新图到达后的替换。
+5
View File
@@ -0,0 +1,5 @@
FAIL
apps/ely-pdf/src/tests/input.rs:344 — 上一轮的实际绘制测试缺口仍在:`drawn` 调用的 `picture()` 返回 `thumbs` 缓存,Arc 身份断言验证的是缓存保留。具体复现:在隔离副本中将 `side.rs:163` 改成 `let picture = read.picture(page, dark).filter(|_| !read.thumbs_stale.contains(&(page, dark)));`,编辑后的过期缩略图停止绘制,`an_edit_keeps_page_pictures_until_they_repaint` 仍通过。暂停重画期间清除旧图图集项、重绘并检查 `window.has_image_atlas_entry(&old)` 的探针,在原实现上通过、该变异上失败、恢复后再次通过。worker 构建与 ElyPDF 全部 123 项测试通过;变异证据见 `/tmp/ely-p02-r2-mutation-existing.log`、`/tmp/ely-p02-r2-mutation-visual.log`、`/tmp/ely-p02-r2-restored.log`,探针说明见 `/tmp/ely-p02-r2-probe.log`。修复方向:在受控等待阶段及新图替换后断言缩略图实际进入绘制,覆盖行组件隐藏旧图的回归。
apps/ely-pdf/src/tests/input.rs:339 — 新增注释 `Hold the repaint: a picture on its way blocks the next.` 含 11 个英文单词,超过 agents.md 规则 5 的十词上限。具体复现:运行 `python3 tests/scripts/comments.py`,退出码为 1,唯一报告指向该行;证据见 `/tmp/ely-p02-r2-comments.log`。修复方向:将该单行注释缩短至十词以内。
+1
View File
@@ -0,0 +1 @@
PASS