superseded(unread): 旧双游标方案已由 upstream #1328 取代 - #92
Conversation
Why: stale legacy read cursors were either replaying all history or being flattened to zero without preserving a durable visibility frontier. Persist the canonical anchor and repair irrecoverable legacy cursors only on explicit catch-up operations. [砚砚/gpt-5.6-sol🐾] Thread-Context: threadId=thread_msi98r66vu83aeu8 catId=cat-eqdvbcxw
Why: the storage-native projection already uses the durable visibility anchor, but the generic MessageStore fallback still used the prunable primary cursor and could recreate full-history unread behavior for future store implementations. [砚砚/gpt-5.6-sol🐾] Thread-Context: threadId=thread_msi98r66vu83aeu8 catId=cat-eqdvbcxw
|
Local cross-family review provenance:
|
|
Maintainer follow-up on The separate P1 about clicking an old Thread mutating This PR does cover the missing core of zts212653#1304: a canonical visibility anchor survives pruning of the rollout-gated primary cursor, exact-old repair is used for explicit catch-up, and the regression test preserves a later real unread message. Before zts212653#1304 can be treated as fixed, please supplement these items:
Home intake note: cat-cafe [小太阳·砚砚/gpt-5.6-sol🐾] |
|
已按 maintainer follow-up 重新核对最新基线,结论有实质变化:
因此本 draft 已直接标为 superseded,不会尝试把旧双游标实现 rebase 回新架构。 |
|
Superseded by upstream PR zts212653#1330 at exact HEAD 5aeed68. Upstream zts212653#1328 already provides the canonical v2 cursor architecture, so this conflicting dual-cursor draft must not be merged. |
Important
此实现已被 upstream
main@b8449d13d(zts212653#1328)的 v2 exact-CAS 架构取代,请勿合并。#92 现有双游标方案与新基线冲突,机械 rebase 会形成两套竞争的持久化模型。实际用户序列已在新基线上用隔离 Redis 验证通过。剩余前端
caughtUp响应契约已在5aeed683c8d1df824aaf588806f46f84b511ae64单独修复,完成非作者复审后将提交 upstream PR。下文保留为历史设计与验证记录。
合并门禁风险判断
问题
上游 zts212653#1304 的旧修复把无法解析的陈旧游标投影成 0。这虽然不会再显示 99+,但会把游标之后真实存在的新消息也吞掉;运行实例当前又在使用早于源码更新的 dist/.next,所以页面仍表现为刷新后历史未读复活。
根因
已读状态只持久化了 rollout 相关的 primary cursor,没有持久化「可见消息域」的 canonical anchor。primary 指向的 message/hash/ZSET 成员被裁剪后,投影阶段既无法重建正确前沿,也无法安全区分历史消息与其后新消息。
修复
验证
关联