Repository navigation
fix(outbox): preserve rejected appends across quarantine interruptions - #2625
Merged
vastsa merged 3 commits intoNov 27, 2026
Merged
Conversation
Removing a rejected append before its dead letter was committed left no recovery record if the process exited or the archive write failed. Keep the transfer identity with the queued snapshot until the archive commit succeeds. Recovery can then finish the handoff exactly once and leave a newer snapshot with the same key available for delivery.
Owner
|
已独立验证:在 |
Contributor
Author
|
@vastsa 感谢验证!CI 已经全绿而且主线仍然匹配 |
Owner
|
谢谢提醒。上一轮 CI 通过后主线已推进到 |
zergfff
added a commit
to zergfff/PI-Desktop-fork
that referenced
this pull request
Nov 30, 2026
Ported from vastsa/PI-Desktop v0.24.0-beta.7 (bug fixes only; the release's features were left for a later rebase): vastsa#2625 quarantine rejected outbox appends instead of retrying them forever vastsa#2574 settle live turns and tool rows when the sidecar dies mid-stream vastsa#2578 native Pi turns stay stoppable after a reload vastsa#2634 the task badge mirrors work that is still running vastsa#2639 let Arabic and Hebrew paragraphs choose their own side vastsa#2640 stop a renderer crash loop with one GPU-less relaunch, then a dialog vastsa#2642 reject differing spellings of one tool argument vastsa#2655 compaction summaries open on demand in the transcript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / 概要
原实现先从活动队列移除被拒绝的消息,再把失败记录写入另一个文件。两次文件替换之间的进程退出或归档写入失败,都会使这次拒绝失去可恢复的副本。
本次改动先将唯一的归档标识、原始内容、拒绝时间和原因保存在活动队列中。失败队列提交成功后才清理活动记录。进程重启后,即使 Host 暂不可用,也可以按同一标识补完归档。这样既能识别已写入的失败记录,也能继续投递后来使用相同消息键的新快照。
两个文件沿用现有的 JSON 数组格式,历史记录可直接读取。每次归档会多做一次活动队列文件替换,用于保存中断恢复所需的信息。存储规格 · 对应的 E2E 场景
Requirement link / 需求关联
Closes #2624
Testing / 验证
374317cb上,归档前退出和归档写入失败两个用例均复现了恢复记录丢失。42245f9上,68 项持久化、检查点和退出相关测试全部通过,其中 7 项为新增回归用例。覆盖失败队列文件替换前后分别退出、写入失败后重试、同键快照替换,以及清理失败后删除会话。新增回归测试pnpm lint、架构检查、pnpm check:pr-base和git diff --check均通过。复跑上述 68 项测试的命令如下。
本地验证环境为 macOS 15.7.2 arm64、Node.js 26.0.0。中断测试使用真实子进程和临时文件,Host 使用测试替身。完整 Electron 界面流程和 Windows 实机强退尚未验证。