Files
BlueArchiveToolkit/infrastructure
nyaKazuhaandClaude Fable 5 4d818f512c fix(official-sync): 发布成功后立即提交版本状态事务
publish() 切换 current symlink 后,写最终 snapshot 或 complete_version_state
若失败会经 ? 提前返回,此时 VersionStateGuard 尚未 commit,其 Drop 会把这个
磁盘上已发布(current 已指向)的版本记入 failed_versions,造成状态与磁盘不一致。

改为在 publish() 成功后立即取出完成记录并 commit 版本状态事务,随后 snapshot
与 version-state 写入失败降级为可下轮重试的警告(不再 ? 中断、不再误记 failed);
snapshot_written 也改为仅在实际写入成功时置 Some。

对应 issue #18 维护清单 1-3。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 07:17:51 -07:00
..
2026-07-12 23:04:13 +08:00