Skip to content

[WIP, AIT-287] Implement new rules for discarding buffered object operations#112

Draft
lawrence-forooghian wants to merge 1 commit intomainfrom
AIT-287-new-rules-for-discarding-buffered-events
Draft

[WIP, AIT-287] Implement new rules for discarding buffered object operations#112
lawrence-forooghian wants to merge 1 commit intomainfrom
AIT-287-new-rules-for-discarding-buffered-events

Conversation

@lawrence-forooghian
Copy link
Collaborator

@lawrence-forooghian lawrence-forooghian commented Jan 21, 2026

Note: This is currently a draft since ably/specification#416 and ably/ably-js#2150 are still in review.

That is, do it when we get a discontinuity, not when a new sync sequence starts, per spec changes in ably/specification#416.

Related PRs:

@coderabbitai
Copy link

coderabbitai bot commented Jan 21, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch AIT-287-new-rules-for-discarding-buffered-events

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot temporarily deployed to staging/pull/112/AblyLiveObjects January 21, 2026 14:49 Inactive
@lawrence-forooghian lawrence-forooghian force-pushed the AIT-287-new-rules-for-discarding-buffered-events branch from 11de235 to 5e0c796 Compare January 21, 2026 17:06
@github-actions github-actions bot temporarily deployed to staging/pull/112/AblyLiveObjects January 21, 2026 17:08 Inactive
@lawrence-forooghian lawrence-forooghian force-pushed the AIT-287-new-rules-for-discarding-buffered-events branch from 5e0c796 to 45e17cd Compare January 21, 2026 17:15
@github-actions github-actions bot temporarily deployed to staging/pull/112/AblyLiveObjects January 21, 2026 17:16 Inactive
@lawrence-forooghian lawrence-forooghian force-pushed the AIT-287-new-rules-for-discarding-buffered-events branch from 45e17cd to 18a9f76 Compare January 21, 2026 17:47
@github-actions github-actions bot temporarily deployed to staging/pull/112/AblyLiveObjects January 21, 2026 17:48 Inactive
@lawrence-forooghian lawrence-forooghian force-pushed the AIT-287-new-rules-for-discarding-buffered-events branch 2 times, most recently from a9c8eef to 83643ca Compare January 21, 2026 17:56
@github-actions github-actions bot temporarily deployed to staging/pull/112/AblyLiveObjects January 21, 2026 17:57 Inactive
@lawrence-forooghian lawrence-forooghian force-pushed the AIT-287-new-rules-for-discarding-buffered-events branch from 83643ca to 6125bf0 Compare January 21, 2026 18:34
@github-actions github-actions bot temporarily deployed to staging/pull/112/AblyLiveObjects January 21, 2026 18:35 Inactive
@lawrence-forooghian lawrence-forooghian force-pushed the AIT-287-new-rules-for-discarding-buffered-events branch from 6125bf0 to 4942c24 Compare January 21, 2026 19:15
@github-actions github-actions bot temporarily deployed to staging/pull/112/AblyLiveObjects January 21, 2026 19:17 Inactive
@lawrence-forooghian lawrence-forooghian force-pushed the AIT-287-new-rules-for-discarding-buffered-events branch from 4942c24 to b8a86e8 Compare January 21, 2026 20:31
@github-actions github-actions bot temporarily deployed to staging/pull/112/AblyLiveObjects January 21, 2026 20:33 Inactive
@lawrence-forooghian lawrence-forooghian changed the title [AIT-287] Implement new rules for discarding buffered object operations [WIP, AIT-287] Implement new rules for discarding buffered object operations Feb 26, 2026
The specification changed how bufferedObjectOperations is cleared
during the objects sync lifecycle. Previously, the buffer was cleared
in two places: when a new OBJECT_SYNC sequence starts (RTO5a2b), and
as part of the no-HAS_OBJECTS path on ATTACHED (RTO4b5). The new spec
replaces both with a single unconditional clear on every ATTACHED
message (RTO4d), performed after the RTO4c state transition.

Source changes:
- Add RTO4d: clear bufferedObjectOperations on every ATTACHED
- Remove RTO5a2b: no longer clear buffer on new sync sequence start
- Remove RTO4b5: redundant with RTO4d

Test changes:
- Add clearsBufferedOperationsOnAttached test for RTO4d
- Update newSequenceIdDiscardsInFlightSync: buffered operations are
  now retained across new sync sequences and applied at completion
- Remove RTO4b5 from handlesHasObjectsFalse spec annotations

TODO: Port across the ably-js integration tests for this change.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant