Repository navigation
fix(Stream): Resume an unfinished replay, ask again for an empty one and retry refused follow-ups - #33
Merged
Conversation
…and retry refused follow-ups - A drop while a replay is catching up resumes from the bar it reached, not from the newest live row, which arrives before `replayed`. - A truncated replay with no bars (`to` null) is asked for again from `from`; empty a second time from the same bar, that bar is larger than the server's cap, and stderr says so instead of "more to come". - A follow-up refused with limit_exceeded is sent again after a jittered pause, up to the busy retries, then the rest is left to REST with a warning. Running out of follow-ups now warns too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MoDcuxddwYnzAPetT7cR5r
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.
This PR is stacked on #31 and merges into its branch. It fixes review findings checked against the server in dream-faster/unravel-router#1149 and dream-faster/unravel-router#1199.
What changes
replayed, solastBarruns ahead of a replay that is still catching up. A reconnect used to resume from it and skip the rest of the gap.replayFromnow tracks each unfinished replay's bar, advanced by each replay frame'stime, and a reconnect resumes from there first.tonull) is asked for again fromfrom. If it comes back empty again from the same bar, that bar is larger than the server's cap. Stderr then says so instead of "more to come", and the stream stops asking.StreamReplay.FollowedUptells the CLI whether a follow-up was sent.limit_exceededis sent again after a jittered pause, up tostreamBusyRetriestimes, then the stream warns. Running out of the 50 follow-ups also warns now, instead of stopping without a word.streamMessageLimitcomment is updated (replayed bars now come in small frames), and so is the README's replay paragraph.Tests
go test -run 'TestStream_' ./...passes. New tests:from, then given up with a message;go vetandgofmtare clean. The fullgo test ./...has the same 8 failures as this PR's base branch: they are the*_live_test.gosuites, which needAPERIODIC_API_KEYand network access.https://claude.ai/code/session_01MoDcuxddwYnzAPetT7cR5r
Generated by Claude Code