Only update attachSerial for non-resumed attaches (RTL15c)#2276
Only update attachSerial for non-resumed attaches (RTL15c)#2276SimonWoolf wants to merge 1 commit into
Conversation
Implements ably/specification#503 (spec 6.1.1). attachSerial is used as the fromSerial bound for untilAttach history, which returns history contiguous with the realtime message stream. A resumed ATTACHED (resumed=true) indicates a brief disconnection that did not break message continuity, so it must not move the point up to which untilAttach history is contiguous. Previously the SDK updated attachSerial on every ATTACHED regardless of the RESUMED flag; now it only does so when resumed is false. RTL15a is superseded by RTL15c. Update the ported UTS channel_properties tests accordingly, including a new test asserting attachSerial is left unchanged by a resumed ATTACHED (while channelSerial still updates per RTL15b, confirming the message was processed). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Walkthrough
ChangesAttach serial resume handling
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Implements ably/specification#503 (spec 6.1.1).
attachSerialis used as thefromSerialbound foruntilAttachhistory, which returns history contiguous with the realtime message stream. A resumedATTACHED(resumed=true) indicates a brief disconnection that did not break message continuity, so it must not move the point up to whichuntilAttachhistory is contiguous.Previously the SDK updated
attachSerialon everyATTACHEDregardless of theRESUMEDflag; now it only does so whenresumedisfalse(RTL15a → RTL15c).Changes
realtimechannel.ts: guard theattachSerialupdate on!resumedin theATTACHEDhandler.channelSerialstill updates unconditionally per RTL15b.test/uts/.../channel_properties.test.ts): renamed the twoRTL15atests toRTL15c, and added a new test assertingattachSerialis left unchanged by a resumedATTACHED(whilechannelSerialstill updates, confirming the message was processed).attachSerialis not part of the publicably.d.ts(experimental/unstable per RTL15), so there's no public docstring to update.🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests