Repository navigation
feat(chat): resumable turns survive deploys (durable runs, takeover + continue) (v0.3.59) - #353
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ThreatCrush Security Scan16 finding(s) HIGH/CRITICAL: 1 | MEDIUM: 11 | LOW: 4
Snippets are redacted; ThreatCrush never prints matched credential material. |
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.
With this PR, resumable chat turns survive a deploy. Until now, an answer still streaming when c0mpute.com redeployed was lost. The process that generated it was killed (after Docker's 10 s stop grace), and so was the standby container that served the deploy window.
How it works
chat_runsandchat_run_chunkstables (SQLite Cloud) hold each run's request, its output and a heartbeat.instrumentation.ts→runManager()) and every 15 s, each server claims runs whose owner hasn't written for 20 s. The claim is a conditional UPDATE on the old owner, so only one server wins.{assistant: partial}+ a "continue exactly where it stopped" instruction.Tests
Web
src/lib/chat: 119 pass. The only failure ischat music > node progress…, which fails on master too.New durable tests, run with two simulated servers on one SQLite database and a shared clock:
tscis clean in every touched file, includinginstrumentation.ts. Version bumped to v0.3.59.🤖 Generated with Claude Code