Reviews for M-02; its test now proves a refresh restarts the counts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-10 04:04:59 -04:00
1 parent 68b5af76e0
commit 42bbc4e8fb
4 files changed
+11 -3

No files matched your search

+6 -2
View File
@@ -81,16 +81,20 @@ mod tests {
fn a_key_from_before_a_refresh_leaves_it_settled() {
let mut tally = Tally::<()>::new();
let old = tally.load();
// The old page counted two versions.
tally.change(2);
assert!(tally.text(2));
tally.restart();
// The renderer's change for the old text lands late.
if tally.current(Some(old)) {
tally.change(1);
tally.change(3);
}
assert!(tally.settled(), "an old change does not count");
assert_eq!(tally.changed(), 0, "versions start over");
// The refreshed page's own edits count again.
tally.change(1);
assert!(!tally.settled());
assert!(tally.text(1));
assert!(tally.text(1), "the new page's first text counts");
assert!(tally.settled());
}
+1 -1
View File
@@ -62,7 +62,7 @@
- [x] D-07 导航栏隐藏时仍随每次光标移动重读大纲与书签 — 隐藏时不跟随标签、不读;再显示时读一次
- [x] D-08 Linux、Windows 上“打印…”可用,导出 PDF 后才报“此平台未构建” — 未构建平台禁用打印、不绑快捷键、错误不带路径;命令面板先查禁用
- [x] M-01 键入期间外部以相同内容重写文件,丢掉上次停顿之后键入的全部文字 — 先等页面送出未送的键;同文只接过文件与字节、标签为已保存;磁盘回到上次保存的文字时保留编辑并恢复自动保存;R1–R4 字节、自动保存、在途写入、已保存基线;R5 PASS
- [ ] M-02 `refresh` 归零版本计数却不换代,在途的一键让标签一直“未落定”
- [x] M-02 `refresh` 归零版本计数却不换代,在途的一键让标签一直“未落定” — 刷新即换代、归零并结束欠下的渲染(tally.rs);R1 渲染回调悬空、无在途消息的测试;R2 测试未证旧代归零;R3 PASS
- [ ] M-03 干净标签接过磁盘文字后关闭仍问“是否保存”
- [ ] M-04 第二次打印或导出 PDF 悄悄取消第一次,没有文件也没有错误
- [ ] M-05 点页面里的链接什么也不发生
+3
View File
@@ -0,0 +1,3 @@
FAIL
apps/ely-mark/src/tally.rs:80 — R1 的回归覆盖缺口仍未补齐:刷新测试从零计数开始,未验证旧代非零版本归零。内存变异探针删除 `restart` 中 `(self.changed, self.reported) = (0, 0)` 后,现有三个 tally 测试全部通过;补测“旧代 changed=reported=2 → restart → 新代 changed=1、text=1”则失败:changed 仍为 2,text(1) 被拒,保存与关闭一直等落定。当前实现通过补测,问题在回归测试不足。修复方向:先在旧代产生并接收非零版本,再刷新,断言版本归零、迟到旧代消息被丢、新代首个文本被接收并恢复 settled;该测试须能杀死删除归零语句的变异。R1 的渲染回调悬空已由 restart 排空及 end_renders 显式报错修复。本轮两端 cargo check 均通过;Linux cargo test 21/21,Windows 19/20(唯一失败为已划归 W-02 的 vcs 尾空格路径用例,排除后 19/19)。探针二进制与两端增量缓存已删除,未复制源码树。
+1
View File
@@ -0,0 +1 @@
PASS