Skip to content

[AIT-322] Support the protocol v6 ObjectMessage structure#114

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

[AIT-322] Support the protocol v6 ObjectMessage structure#114
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 #118, 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

Implements the ObjectOperation field changes specified in ably/specification#426. See commit message for more details.

Related PRs

Summary by CodeRabbit

  • Chores

    • Updated Swift Package Manager dependencies to latest versions.
  • Bug Fixes

    • Added protocol version validation to ensure compatibility with LiveObjects Protocol V6.
  • Refactor

    • Restructured internal protocol message handling for improved object creation, map, and counter operations.

@coderabbitai
Copy link

coderabbitai bot commented Feb 24, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6961613a-e940-4bd2-b20a-9d5d6d7de9bb

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

Walkthrough

This pull request restructures the object operation protocol and wire message format by replacing granular operation fields (mapOp, counterOp, map, counter, nonce, initialValue) with semantic operation types (MapSet, MapCreate, MapCreateWithObjectId, CounterInc, CounterCreate, etc.), updates internal implementations to use the new types, and refreshes test fixtures accordingly. Swift package dependencies are also updated.

Changes

Cohort / File(s) Summary
Package Management
AblyLiveObjects.xcworkspace/xcshareddata/swiftpm/Package.resolved, Package.resolved, Package.swift
Updated ably-cocoa and ably-cocoa-plugin-support revisions; originHash values regenerated.
Protocol Version & Initialization
Sources/AblyLiveObjects/Internal/DefaultInternalPlugin.swift
Added compatibleWithProtocolV6 computed property and precondition validation to require LiveObjects protocol v6 support.
Wire Protocol Restructuring
Sources/AblyLiveObjects/Protocol/ObjectMessage.swift, Sources/AblyLiveObjects/Protocol/WireObjectMessage.swift
Replaced legacy operation fields (mapOp, counterOp, map, counter, nonce, initialValue) with semantic types (MapSet, MapCreate, MapCreateWithObjectId, CounterInc, CounterCreate, WireObjectDelete). Updated encoding/decoding and added CustomDebugStringConvertible extensions for new types.
Internal Counter & Map Implementations
Sources/AblyLiveObjects/Internal/InternalDefaultLiveCounter.swift, Sources/AblyLiveObjects/Internal/InternalDefaultLiveMap.swift, Sources/AblyLiveObjects/Internal/ObjectCreationHelpers.swift
Refactored to use new operation types (WireCounterInc, WireCounterCreate, MapSet, MapCreate, MapRemove) and updated spec references from RTLC10/RTLM17 to RTLC16/RTLM23; initial value logic now derives from dedicated wire-encodable objects.
Documentation Updates
Sources/AblyLiveObjects/Internal/InternalDefaultRealtimeObjects.swift, Sources/AblyLiveObjects/Internal/InternalLiveMapValue.swift
Minor comment/spec reference updates; no functional changes.
Test Factory & Fixture Updates
Tests/AblyLiveObjectsTests/Helpers/TestFactories.swift, Tests/AblyLiveObjectsTests/JS Integration Tests/ObjectsHelper.swift
Updated factory methods to construct new operation types; renamed parameters (amount → number for counter operations); removed legacy operation builders.
Core Test Suite Updates
Tests/AblyLiveObjectsTests/AblyLiveObjectsTests.swift, Tests/AblyLiveObjectsTests/InternalDefaultLiveCounterTests.swift, Tests/AblyLiveObjectsTests/InternalDefaultLiveMapTests.swift, Tests/AblyLiveObjectsTests/InternalDefaultRealtimeObjectsTests.swift, Tests/AblyLiveObjectsTests/ObjectCreationHelpersTests.swift, Tests/AblyLiveObjectsTests/WireObjectMessageTests.swift, Tests/AblyLiveObjectsTests/JS Integration Tests/ObjectsIntegrationTests.swift
Updated test expectations to validate new operation types, renamed spec references (RTLC10→RTLC16, RTLM17→RTLM23), refactored assertions for mapCreateWithObjectId/counterCreateWithObjectId flows, and adjusted factory usage.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

🐰 Protocol packets now take clearer forms,
With MapSet and CounterInc breaking old norms,
The wire speaks truer, semantics aligned,
While tests march along, new patterns to find,
Creation and change in structures refined!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 69.42% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: implementing support for protocol v6 ObjectMessage structure, which is the primary focus of all file modifications.

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

✨ Finishing Touches
🧪 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.

@github-actions github-actions bot temporarily deployed to staging/pull/114/AblyLiveObjects February 24, 2026 14:18 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/114/AblyLiveObjects February 24, 2026 14:21 Inactive
@lawrence-forooghian lawrence-forooghian changed the base branch from main to integration/protocol-v6 February 25, 2026 11:59
@github-actions github-actions bot temporarily deployed to staging/pull/114/AblyLiveObjects February 25, 2026 12:49 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/114/AblyLiveObjects February 25, 2026 12:53 Inactive
@lawrence-forooghian lawrence-forooghian changed the title Add protocol v6 compatibility and precondition [WIP Add protocol v6 compatibility and precondition Feb 25, 2026
@lawrence-forooghian lawrence-forooghian changed the title [WIP Add protocol v6 compatibility and precondition [WIP, AIT-322] Add protocol v6 compatibility and precondition Feb 25, 2026
@lawrence-forooghian lawrence-forooghian changed the title [WIP, AIT-322] Add protocol v6 compatibility and precondition [WIP, AIT-322] Support the protocol v6 ObjectMessage structure Feb 25, 2026
@github-actions github-actions bot temporarily deployed to staging/pull/114/AblyLiveObjects February 25, 2026 14:01 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/114/AblyLiveObjects February 25, 2026 14:18 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/114/AblyLiveObjects February 25, 2026 14:23 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/114/AblyLiveObjects February 25, 2026 14:26 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/114/AblyLiveObjects February 25, 2026 14:31 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/114/AblyLiveObjects February 25, 2026 14:38 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/114/AblyLiveObjects February 25, 2026 14:40 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/114/AblyLiveObjects February 25, 2026 17:31 Inactive
@lawrence-forooghian
Copy link
Collaborator Author

lawrence-forooghian commented Feb 25, 2026

There seem to be some intermittent failures in the smoke test; need to investigate

@lawrence-forooghian lawrence-forooghian force-pushed the AIT-324-apply-on-ACK branch 6 times, most recently from a77505b to cbb49fd Compare March 4, 2026 01:24
@lawrence-forooghian lawrence-forooghian force-pushed the AIT-322-v6-ProtocolMessage branch from 7689879 to dadaade Compare March 4, 2026 11:56
@github-actions github-actions bot temporarily deployed to staging/pull/114/AblyLiveObjects March 4, 2026 11:57 Inactive
@lawrence-forooghian lawrence-forooghian force-pushed the AIT-322-v6-ProtocolMessage branch from dadaade to ee5b2f9 Compare March 4, 2026 13:34
@github-actions github-actions bot temporarily deployed to staging/pull/114/AblyLiveObjects March 4, 2026 13:36 Inactive
@lawrence-forooghian lawrence-forooghian force-pushed the AIT-322-v6-ProtocolMessage branch from ee5b2f9 to dff72b2 Compare March 4, 2026 14:30
@github-actions github-actions bot temporarily deployed to staging/pull/114/AblyLiveObjects March 4, 2026 14:31 Inactive
@lawrence-forooghian lawrence-forooghian force-pushed the AIT-322-v6-ProtocolMessage branch from dff72b2 to ffc512f Compare March 4, 2026 14:57
@github-actions github-actions bot temporarily deployed to staging/pull/114/AblyLiveObjects March 4, 2026 14:58 Inactive
@lawrence-forooghian lawrence-forooghian force-pushed the AIT-322-v6-ProtocolMessage branch from ffc512f to 02bfedb Compare March 4, 2026 16:19
@github-actions github-actions bot temporarily deployed to staging/pull/114/AblyLiveObjects March 4, 2026 16:21 Inactive
@lawrence-forooghian lawrence-forooghian force-pushed the AIT-322-v6-ProtocolMessage branch from 02bfedb to 3a18180 Compare March 4, 2026 16:45
@github-actions github-actions bot temporarily deployed to staging/pull/114/AblyLiveObjects March 4, 2026 16:47 Inactive
@lawrence-forooghian lawrence-forooghian force-pushed the AIT-322-v6-ProtocolMessage branch from 3a18180 to 7ec81af Compare March 4, 2026 18:55
@lawrence-forooghian lawrence-forooghian marked this pull request as ready for review March 4, 2026 18:56
@lawrence-forooghian lawrence-forooghian changed the title [WIP, AIT-322] Support the protocol v6 ObjectMessage structure [AIT-322] Support the protocol v6 ObjectMessage structure Mar 4, 2026
@lawrence-forooghian
Copy link
Collaborator Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Mar 4, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions github-actions bot temporarily deployed to staging/pull/114/AblyLiveObjects March 4, 2026 18:56 Inactive
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: 2

🧹 Nitpick comments (6)
Package.swift (1)

24-24: Consider using full commit hash for consistency and stability.

The ably-cocoa dependency uses a short 7-character commit hash while ably-cocoa-plugin-support (line 29) uses a full 40-character hash. Short hashes can become ambiguous as repositories grow. Additionally, the Package.resolved shows this was resolved as a branch named "154b6cd" rather than a revision—verify this is the intended behavior.

Suggested fix for consistency
         .package(
             url: "https://github.com/ably/ably-cocoa.git",
-            revision: "154b6cd",
+            revision: "154b6cd796185a04985c06ed85aa12c7b0462755",
         ),
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Package.swift` at line 24, The ably-cocoa dependency in Package.swift
currently pins revision: "154b6cd" (a short 7-char hash); replace it with the
full 40-character commit SHA for consistency with ably-cocoa-plugin-support and
to avoid ambiguity, and ensure the package dependency is specified as a revision
(not a branch name) so Package.resolved records the exact commit; update the
revision value for the ably-cocoa entry to the repository's full commit hash and
re-resolve packages to verify it records a revision.
Tests/AblyLiveObjectsTests/Helpers/TestFactories.swift (1)

390-392: Use Double for counter-inc test factories to match runtime semantics.

These helpers are currently Int-only, which reduces test coverage for fractional increments.

Suggested tweak
-    static func counterInc(number: Int = 10) -> WireCounterInc {
+    static func counterInc(number: Double = 10) -> WireCounterInc {
         WireCounterInc(number: NSNumber(value: number))
     }

     static func counterIncOperationMessage(
         objectId: String = "counter:test@123",
-        number: Int = 10,
+        number: Double = 10,
         serial: String = "ts1",
         siteCode: String = "site1",
     ) -> InboundObjectMessage {

Also applies to: 635-646

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Tests/AblyLiveObjectsTests/Helpers/TestFactories.swift` around lines 390 -
392, Update the counter-inc test factory(s) to use Double to match runtime
semantics: change the signature of functions like counterInc to accept a Double
(e.g., number: Double = 10.0) and construct the WireCounterInc using
NSNumber(value: number) with a Double value; apply the same change to any other
counter-inc helpers in this file (the other factory functions that create
WireCounterInc instances) so tests cover fractional increments while still
defaulting to a sensible double value.
Sources/AblyLiveObjects/Protocol/WireObjectMessage.swift (1)

353-533: Place access control on extension declarations for new wire/debug extensions.

These new extensions should carry the ACL on the extension (internal extension ...) and omit per-member internal modifiers.

Example pattern to apply
-extension WireMapSet: WireObjectCodable {
-    internal enum WireKey: String {
+internal extension WireMapSet: WireObjectCodable {
+    enum WireKey: String {
         case key
         case value
     }

-    internal init(wireObject: [String: WireValue]) throws(ARTErrorInfo) {
+    init(wireObject: [String: WireValue]) throws(ARTErrorInfo) {
         ...
     }

-    internal var toWireObject: [String: WireValue] {
+    var toWireObject: [String: WireValue] {
         ...
     }
}
As per coding guidelines, `When extending a type, put the access level on the extension declaration rather than on each member (tests are exempt)`.

Also applies to: 704-771

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Sources/AblyLiveObjects/Protocol/WireObjectMessage.swift` around lines 353 -
533, The extensions for the new wire/debug types should have the access control
on the extension declaration instead of on each member: change extension
WireMapSet, WireMapRemove, WireMapCreate, WireCounterCreate, WireCounterInc,
WireObjectDelete, WireMapCreateWithObjectId, and WireCounterCreateWithObjectId
to be declared as internal extension ... and remove the per-member 'internal'
modifiers from their nested enum WireKey, init(wireObject:), and toWireObject
properties so members use the extension's access level.
Sources/AblyLiveObjects/Protocol/ObjectMessage.swift (1)

589-640: Apply ACL on extension declarations in new debug extensions.

Please move internal to the extension declaration and drop member-level internal inside these newly added extensions.

As per coding guidelines, When extending a type, put the access level on the extension declaration rather than on each member (tests are exempt).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Sources/AblyLiveObjects/Protocol/ObjectMessage.swift` around lines 589 - 640,
The debug extensions declare members as "internal" instead of applying the
access control on the extension; update each extension declaration for MapSet,
MapCreate, MapCreateWithObjectId, and CounterCreateWithObjectId to include
"internal" (e.g., "internal extension MapSet") and remove the "internal"
modifier from the debugDescription property inside each extension so the access
level is applied at the extension level rather than per-member.
Tests/AblyLiveObjectsTests/InternalDefaultLiveMapTests.swift (1)

663-666: Consider extracting the repeated delegate/pool sync snippet into a small helper.

The same setup appears in both MAP_SET test groups; a helper would reduce drift and keep intent-focused test bodies.

Also applies to: 731-734

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Tests/AblyLiveObjectsTests/InternalDefaultLiveMapTests.swift` around lines
663 - 666, Extract the repeated sync logic that updates the delegate's objects
from the pool into a small helper function (e.g.,
syncDelegateWithPool(delegate:pool:expectedCreatedObjectID:)) and replace the
duplicated blocks inside the MAP_SET test groups with calls to that helper; the
helper should check for a non-nil expectedCreatedObjectID and, if present,
perform delegate.objects[expectedCreatedObjectID] =
pool.entries[expectedCreatedObjectID] so both occurrences (current use of
delegate, pool, expectedCreatedObjectID) are centralized and the tests remain
intent-focused.
Tests/AblyLiveObjectsTests/WireObjectMessageTests.swift (1)

215-236: Consider extending WireObjectOperation.encodesAllFields to include all newly supported optional fields.

You already cover sub-struct encoding separately, but adding mapRemove, objectDelete, and mapCreateWithObjectId/counterCreateWithObjectId at operation-level encoding would catch wiring regressions earlier.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Tests/AblyLiveObjectsTests/WireObjectMessageTests.swift` around lines 215 -
236, The test encodesAllFields in WireObjectMessageTests should be extended to
include the newly supported optional operation-level fields so wiring
regressions are caught: update the WireObjectOperation instance in
encodesAllFields to set mapRemove, objectDelete, mapCreateWithObjectId and
counterCreateWithObjectId (in addition to the existing
mapCreate/mapSet/counterCreate/counterInc), then expand the expected wire
dictionary used with `#expect`(wire == [...]) to include the corresponding keys
("mapRemove", "objectDelete", "mapCreateWithObjectId",
"counterCreateWithObjectId") and their encoded shapes; keep using
op.toWireObject to produce wire and mirror the exact nested structures used by
the existing entries to validate encoding.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Sources/AblyLiveObjects/Internal/DefaultInternalPlugin.swift`:
- Around line 12-18: The initializer DefaultInternalPlugin.init currently uses a
process-terminating precondition to check pluginAPI.usesLiveObjectsProtocolV6;
change this to a non-crashing failure path by making the initializer throw (or
failable) and validating pluginAPI.usesLiveObjectsProtocolV6 with a guard that
returns a descriptive error (or nil) instead of calling precondition, so the
host can reject the plugin cleanly; update callers to handle the thrown error
(or nil) and include a clear error message mentioning LiveObjects protocol v6
compatibility.

In `@Tests/AblyLiveObjectsTests/JS` Integration Tests/ObjectsHelper.swift:
- Around line 180-193: counterCreateOp currently omits the "counterCreate" field
when count is nil, causing wire fixtures to differ from REST which sends
counterCreate: {}; update the counterCreateOp function to always set
operation["counterCreate"] to an object (either ["count": .number(...)] when
count is provided or an empty object when count is nil) so the "operation"
payload shape matches the REST helper; locate the counterCreateOp function and
the construction of the operation dictionary (types WireValue /
Actions.counterCreate) and replace conditional omission with always-emitted
counterCreate object.

---

Nitpick comments:
In `@Package.swift`:
- Line 24: The ably-cocoa dependency in Package.swift currently pins revision:
"154b6cd" (a short 7-char hash); replace it with the full 40-character commit
SHA for consistency with ably-cocoa-plugin-support and to avoid ambiguity, and
ensure the package dependency is specified as a revision (not a branch name) so
Package.resolved records the exact commit; update the revision value for the
ably-cocoa entry to the repository's full commit hash and re-resolve packages to
verify it records a revision.

In `@Sources/AblyLiveObjects/Protocol/ObjectMessage.swift`:
- Around line 589-640: The debug extensions declare members as "internal"
instead of applying the access control on the extension; update each extension
declaration for MapSet, MapCreate, MapCreateWithObjectId, and
CounterCreateWithObjectId to include "internal" (e.g., "internal extension
MapSet") and remove the "internal" modifier from the debugDescription property
inside each extension so the access level is applied at the extension level
rather than per-member.

In `@Sources/AblyLiveObjects/Protocol/WireObjectMessage.swift`:
- Around line 353-533: The extensions for the new wire/debug types should have
the access control on the extension declaration instead of on each member:
change extension WireMapSet, WireMapRemove, WireMapCreate, WireCounterCreate,
WireCounterInc, WireObjectDelete, WireMapCreateWithObjectId, and
WireCounterCreateWithObjectId to be declared as internal extension ... and
remove the per-member 'internal' modifiers from their nested enum WireKey,
init(wireObject:), and toWireObject properties so members use the extension's
access level.

In `@Tests/AblyLiveObjectsTests/Helpers/TestFactories.swift`:
- Around line 390-392: Update the counter-inc test factory(s) to use Double to
match runtime semantics: change the signature of functions like counterInc to
accept a Double (e.g., number: Double = 10.0) and construct the WireCounterInc
using NSNumber(value: number) with a Double value; apply the same change to any
other counter-inc helpers in this file (the other factory functions that create
WireCounterInc instances) so tests cover fractional increments while still
defaulting to a sensible double value.

In `@Tests/AblyLiveObjectsTests/InternalDefaultLiveMapTests.swift`:
- Around line 663-666: Extract the repeated sync logic that updates the
delegate's objects from the pool into a small helper function (e.g.,
syncDelegateWithPool(delegate:pool:expectedCreatedObjectID:)) and replace the
duplicated blocks inside the MAP_SET test groups with calls to that helper; the
helper should check for a non-nil expectedCreatedObjectID and, if present,
perform delegate.objects[expectedCreatedObjectID] =
pool.entries[expectedCreatedObjectID] so both occurrences (current use of
delegate, pool, expectedCreatedObjectID) are centralized and the tests remain
intent-focused.

In `@Tests/AblyLiveObjectsTests/WireObjectMessageTests.swift`:
- Around line 215-236: The test encodesAllFields in WireObjectMessageTests
should be extended to include the newly supported optional operation-level
fields so wiring regressions are caught: update the WireObjectOperation instance
in encodesAllFields to set mapRemove, objectDelete, mapCreateWithObjectId and
counterCreateWithObjectId (in addition to the existing
mapCreate/mapSet/counterCreate/counterInc), then expand the expected wire
dictionary used with `#expect`(wire == [...]) to include the corresponding keys
("mapRemove", "objectDelete", "mapCreateWithObjectId",
"counterCreateWithObjectId") and their encoded shapes; keep using
op.toWireObject to produce wire and mirror the exact nested structures used by
the existing entries to validate encoding.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e2e08c09-b3dd-4959-90db-131a2fbca941

📥 Commits

Reviewing files that changed from the base of the PR and between cbb49fd and 7ec81af.

📒 Files selected for processing (20)
  • AblyLiveObjects.xcworkspace/xcshareddata/swiftpm/Package.resolved
  • Package.resolved
  • Package.swift
  • Sources/AblyLiveObjects/Internal/DefaultInternalPlugin.swift
  • Sources/AblyLiveObjects/Internal/InternalDefaultLiveCounter.swift
  • Sources/AblyLiveObjects/Internal/InternalDefaultLiveMap.swift
  • Sources/AblyLiveObjects/Internal/InternalDefaultRealtimeObjects.swift
  • Sources/AblyLiveObjects/Internal/InternalLiveMapValue.swift
  • Sources/AblyLiveObjects/Internal/ObjectCreationHelpers.swift
  • Sources/AblyLiveObjects/Protocol/ObjectMessage.swift
  • Sources/AblyLiveObjects/Protocol/WireObjectMessage.swift
  • Tests/AblyLiveObjectsTests/AblyLiveObjectsTests.swift
  • Tests/AblyLiveObjectsTests/Helpers/TestFactories.swift
  • Tests/AblyLiveObjectsTests/InternalDefaultLiveCounterTests.swift
  • Tests/AblyLiveObjectsTests/InternalDefaultLiveMapTests.swift
  • Tests/AblyLiveObjectsTests/InternalDefaultRealtimeObjectsTests.swift
  • Tests/AblyLiveObjectsTests/JS Integration Tests/ObjectsHelper.swift
  • Tests/AblyLiveObjectsTests/JS Integration Tests/ObjectsIntegrationTests.swift
  • Tests/AblyLiveObjectsTests/ObjectCreationHelpersTests.swift
  • Tests/AblyLiveObjectsTests/WireObjectMessageTests.swift

Implements the ObjectOperation field changes specified in spec commit
47a9d51. Integration test updates ported from JS commit fdc33cb
(excluding the public API changes, since we don't yet expose any sort of
ObjectOperation, nor does the spec).

Note that this is the first time that we've had to bump the protocol
version in a way that affects LiveObjects, and here we're following the
process documented in the pinned plugin-support commit.

Also note that this spec change formalises the then-unspecified change
that we made in ec37cca.

The downside of getting Claude to do this sort of enormous mechanical
change is that for a human to review its changes with 100% confidence —
in particular, all the spec point reference updates — would require
almost as much work as just doing it by hand. So I haven't reviewed it
with 100% confidence. I've:

- glanced over the whole diff a few times
- spot-checked that the most interesting behaviours are implemented and
  tested (specifically, the creation of the initial value JSON, the
  retention of the derivedFrom op and its usage when applying the create
  op)
- prompted Claude to review its own work from scratch a few times

Beyond that, I'm relying on the fact that the barely-changed integration
tests continue to pass.

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