Repository navigation
feat(recording): survive engine death mid-recording + auto-rescue - #49
Merged
Merged
Conversation
All cloud engines dying (network drop, WS disconnect) no longer ends a live recording. The fatal .error is latched instead of transitioned while the controller is still .recording, so the shared mic tap and WAV keep running until the user releases the key. The session's final then archives the completed WAV as a failed history entry and schedules one automatic retranscribe rescue of that entry (replay -> clipboard); if the rescue fails too, the red entry remains for manual rescue. Engines dying after stop (during finalization) get the same archive + auto-rescue via the trailing-final drop branch. Capture failure keeps its immediate fatal path, distinguished structurally: its stream finishes right after the error with no trailing final, which the consumer's loop exit turns into the error transition. env changes: saveHistory now returns the new entry id; new rescue(id) closure routed through AppDelegate.retranscribeEntry. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Closes #46 的目标 1 + 2。
变更
.recording状态下收到致命.error时只做 latch(pendingErrorMessage),不再 transition——麦克风和 WAV 落盘持续到用户松键。采集失败保持原有立即报错路径(结构上区分:其流在 error 后立刻结束、无尾部 final,由消费循环出口转为致命错误)。saveHistory返回条目 id;新增rescue(id)闭包走AppDelegate.retranscribeEntry。真机验证
recognition error→ 红条目 →auto-rescue→retranscribe start全链路。未做(记录在案)
🤖 Generated with Claude Code