Commit 6127a3f
(Codex) 修正
* 修正 `synchronize.ts` 避免 误判和误删
* ✅ 补充 synchronize 测试并保留 orphan 状态
- 新增 deleteScript/pushScript 等待 digest 更新的回归测试
- 新增 orphan uuid cloudStatus 保留的回归测试
- syncOnce 加 try/catch 避免错误冒泡破坏队列后续任务
- 跳过 orphan 时保留其云端 status,避免覆盖另一台设备的半上传状态
* ✅ 补齐 synchronize 队列与错误兜底测试
- scriptInstall 走 cloud_sync 队列,且 push 后才更新 digest
- scriptsDelete 走同一队列,跳过 deleteBy=sync,结束后更新 digest
- cloudSyncConfigChange 的 buildFileSystem 失败被 .catch 吞掉
* 🐛 避免 syncOnce 内部删除事件回灌触发空跑同步任务
scriptsDelete 入口先过滤 deleteBy === "sync" 的条目,避免 syncOnce
通过 mq.publish 回灌的 sync 来源删除事件再排一次 buildFileSystem +
updateFileDigest 的空跑任务。
---------
Co-authored-by: 王一之 <yz@ggnb.top>synchronize.ts 避免 误判和误删 (#1374)1 parent f617cce commit 6127a3f
2 files changed
Lines changed: 684 additions & 37 deletions
0 commit comments