Skip to content

[AIT-322] Support protocol version bump to v6#10

Open
lawrence-forooghian wants to merge 1 commit intoAIT-324-apply-on-ACKfrom
AIT-322-v6-ProtocolMessage
Open

[AIT-322] Support protocol version bump to v6#10
lawrence-forooghian wants to merge 1 commit intoAIT-324-apply-on-ACKfrom
AIT-322-v6-ProtocolMessage

Conversation

@lawrence-forooghian
Copy link
Collaborator

@lawrence-forooghian lawrence-forooghian commented Feb 24, 2026

Note: This is currently based on top of #11, but once that's merged, I'll create an integration/protocol-v6 branch from main and change this PR to target the integration branch.

Summary

We need to start using protocol version 6 as it introduces new LiveObjects functionality.

The main problem to solve is: how do we make sure that ably-cocoa doesn't force a protocol version on a plugin that can't handle that version?

Here we propose a simple solution. It's a bit clunky, but to be honest our whole plugin mechanism is a bit clunky so I think we can live with this additional clunkiness.

One other problem of the solution given here — that is, doing major plugin-api releases — is that if, in the future, we have further plugins, then we'll have to do new releases of all the plugins just because we needed to bump plugin-support for one of them. I hope that by the time we need to do further plugins we'll have moved to ably-swift (with plugins in-repo) and we won't have to worry about this!

Resolves ably/ably-liveobjects-swift-plugin#107.

Related PRs

Summary by CodeRabbit

  • Documentation

    • Added comprehensive guidance on dependency relationships, compatibility versioning, and release workflows for plugin developers.
  • New Features

    • Introduced protocol compatibility indicators to support version management for Live Objects plugins.

@coderabbitai
Copy link

coderabbitai bot commented Feb 24, 2026

Caution

Review failed

Failed to post review comments

Walkthrough

Adds protocol-version flags and publish-result types to the plugin API, adjusts LiveObjects plugin protocol methods, introduces an optional connection siteCode, and expands README with dependency, protocol-breaking, and release-playbook documentation.

Changes

Cohort / File(s) Summary
Documentation & Release Workflow
README.md
Added "Dependency setup", "Playbook for making changes", breaking Realtime protocol guidance (properties to use/replace), and a multi-step "Release process" to coordinate breaking plugin-support changes.
Plugin API — Protocol Version Flag & Send API
Sources/_AblyPluginSupportPrivate/include/APPluginAPI.h
Added usesLiveObjectsProtocolV6 readonly property, forward-declared APPublishResultProtocol, and introduced optional nosync_sendObjectWithObjectMessages:channel:completionWithResult: providing publish-result info; adjusted @optional/@required markers.
LiveObjects Plugin Protocol
Sources/_AblyPluginSupportPrivate/include/APLiveObjectsPlugin.h
Added compatibleWithProtocolV6 readonly property and internalPlugin accessor; removed nosync_prepareChannel:client: and added optional nosync_onChannelStateChanged:toState:reason:. Also imported APRealtimeChannelState.h.
Connection Details
Sources/_AblyPluginSupportPrivate/include/APConnectionDetails.h
Added optional - (nullable NSString *)siteCode; to APConnectionDetailsProtocol.
Publish Result Types
Sources/_AblyPluginSupportPrivate/include/APPublishResult.h
New header defining APPublishResultSerialProtocol (value) and APPublishResultProtocol (serials) with Swift bridging names.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped through headers, flags in paw,
New protocols snug, no tug or gnaw.
Serials tucked in a tidy row,
Site codes whispered soft and low.
Docs aligned — release bells go! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'AIT-322 Support protocol version bump to v6' clearly summarizes the main change: adding support for Realtime protocol version 6.
Linked Issues check ✅ Passed The changes comprehensively address the core objective from #107 by introducing a mechanism to handle protocol version differences and prevent ably-cocoa from enforcing unsupported protocol versions on plugins.
Out of Scope Changes check ✅ Passed All changes are directly related to supporting protocol version 6: new properties and methods for protocol compatibility detection, publish result structures, and documentation on protocol handling—all within scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch AIT-322-v6-ProtocolMessage

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.

@lawrence-forooghian lawrence-forooghian changed the base branch from main to integration/protocol-v6 February 25, 2026 11:58
@lawrence-forooghian lawrence-forooghian force-pushed the AIT-322-v6-ProtocolMessage branch 2 times, most recently from ecbf903 to c20f969 Compare February 25, 2026 13:51
@lawrence-forooghian lawrence-forooghian marked this pull request as ready for review February 25, 2026 13:55
@lawrence-forooghian lawrence-forooghian changed the title Add protocol v6 compatibility properties [AIT-322] Support protocol version bump to v6 Feb 25, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@README.md`:
- Around line 54-66: The fenced code blocks containing Objective-C declarations
(the blocks showing the usesLiveObjectsProtocolV6 and compatibleWithProtocolV6
`@property` docs) are missing language identifiers and trigger markdownlint MD040;
update each triple-backtick fence to include the objc language tag (e.g.,
```objc) for the blocks that contain the usesLiveObjectsProtocolV6 and
compatibleWithProtocolV6 snippets so the README code blocks are properly
labeled.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between dd11843 and c20f969.

📒 Files selected for processing (3)
  • README.md
  • Sources/_AblyPluginSupportPrivate/include/APLiveObjectsPlugin.h
  • Sources/_AblyPluginSupportPrivate/include/APPluginAPI.h

We need to start using protocol version 6 as it introduces new
LiveObjects functionality.

The main problem to solve is: how do we make sure that ably-cocoa
doesn't force a protocol version on a plugin that can't handle that
version?

Here we propose a simple solution. It's a bit clunky, but to be honest
our whole plugin mechanism is a bit clunky so I think we can live with
this additional clunkiness.

One other problem of the solution given here — that is, doing major
plugin-api releases — is that if, in the future, we have further
plugins, then we'll have to do new releases of _all_ the plugins just
because we needed to bump plugin-support for one of them. I hope that by
the time we need to do further plugins we'll have moved to ably-swift
(with plugins in-repo) and we won't have to worry about this!

Resolves ably/ably-liveobjects-swift-plugin#107.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lawrence-forooghian lawrence-forooghian force-pushed the AIT-322-v6-ProtocolMessage branch from e015e70 to b0ac0e1 Compare March 2, 2026 20:42
@lawrence-forooghian lawrence-forooghian changed the base branch from integration/protocol-v6 to AIT-324-apply-on-ACK March 2, 2026 20:43
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