Repository navigation
[PR] fix: recover orphan-frozen indexes on cold load - #4373
ranxianglei merged 4 commits into
Conversation
…-gated (ranxianglei#4216/ranxianglei#4370) The orphan fingerprint gates recovery too narrowly: a journal-write failure or an async-backend importRecord miss freezes the index with no retained orphan contents in the view. Probe the envelope once per cold load and let progress decide (requests strictly greater, or equal with a greater fold cursor — the freshness proxy owner-ruled for cross-writer generations, ranxianglei#4323). Equal/behind keeps the index authoritative, so rollback safety is unchanged; ranxianglei#4323 B4 negative gate narrowed to equal-progress (fold richness alone never displaces the index).
cda5676 to
e6c7396
Compare
|
(ai: zhipuai-lb/glm-5.3) 审查结论 + 一个增强提交(e6c7396,rebase 到 master 后追加): 原补丁审查:通过。 触发→严格进度比较(requests 严格更大,或持平且 nextBlockId 更大)→同步 增强:防御性同步,不再依赖孤儿指纹。 冻结形状比指纹宽——journal 写失败、异步后端 一处既有测试语义收窄(必须随本 PR 合并,否则 master CI 红): #4323 B4 负向门从「无锁存时无论计数如何都统一优先」收窄为「进度持平时统一优先」——原夹具(envelope 99 requests vs 索引 5)正是防御性同步要恢复的无锁存冻结形状;折叠块更多但进度持平仍不 displacement(负向保留)。 测试:storage-orphan-recovery 9→11(新增无指纹恢复、领先前滚、持平权威双向);storage/persist/4216/4323 相邻 256+56 全绿;typecheck 干净。CI 全量以后续 lane 为准。 |
|
ework |
|
接单 |
1 similar comment
|
接单 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.760-master.fdbddd0 # this exact build
npm install -g billion-context@master # always the newest merged build
|
A session whose index was frozen by orphan-skipped ingests still cold-loads old fold/ref state after upgrading to #4249. The next request can replay raw history and spend minutes compressing stale ranges before a save finally attempts convergence.
When the indexed view contains retained orphan originals, compare the recovery envelope's request counter and fold cursor with the index. Import and serve the envelope only when that progress is strictly ahead, before preflight runs. Healthy/equal/newer indexes remain authoritative. Recovery retains originals and persists even without a subsequent request/save. This is a narrow follow-up to #4249; the existing orphan-save fix is reused.
Validation:
No schema, config or version change.
Fixes #4370