Conversation
For the 2.0 line, rename the client-facing "REST" identifiers to "HTTP", aligning .NET with the SDK-family convention: the java, php and python Pub/Sub SDKs all ship PubSubHttpClient/PubSubRealtimeClient, and ably-cocoa renamed ARTRest to ARTHttpClient. The class names describe the transport the client speaks, not the service it talks to. The rename map: - AblyRest -> PubSubHttpClient, AblyRealtime -> PubSubRealtimeClient (classes and files) - IRestClient -> IPubSubHttpClient, IRealtimeClient -> IPubSubRealtimeClient (interfaces and files) - RestChannel -> HttpChannel, RestChannels -> HttpChannels, IRestChannel -> IHttpChannel (and files) - the realtime client's RestClient property -> HttpClient (typed PubSubHttpClient) - the internal transport AblyHttpClient -> AblyHttpRequester (and IAblyHttpClient -> IAblyHttpRequester), so the transport no longer collides with the renamed public client concept - the Rest/ source and test folders fold into Http/, and the Rest*-prefixed test classes/files become Http* Deliberately NOT renamed, because they name Ably's REST API service or a wire option rather than our client layer: ClientOptions.RestHost / FullRestHost, ClientOptions.IdempotentRestPublishing, Defaults.RestHost, rest.ably.io literals, "Ably REST API" prose and spec-point comments. Namespaces (including the IO.Ably.Rest sub-namespace on the moved channel types), assembly names, NuGet IDs and InternalsVisibleTo identities are unchanged. The committed Unity plugin DLL still carries the old names; it is regenerated on the release pass. Docs updated in step: UPDATING.md gains a Renamed-types table, the CHANGELOG 2.0.0 entry states the renames and the internal-constructor model, README and the nuspec descriptions name the new types. PushNotifications.md is untouched: it documents the 1.x-only parked device push-receive flow, where the old names are correct. Validated with the Cake gates: Build.NetStandard (Release, StyleCop-as-error) 0 warnings / 0 errors; Build.NetFramework under mono green (the shared projitems carry every moved path); Package-mode signed builds of the core and both doors clean; the net6.0 unit leg 1231 passed / 19 skipped / 0 failed; the net46 unit leg green under mono with only the known mono-environment artifacts.
Two follow-through items on the REST-to-HTTP rename: PushRest -> PushHttp (class and file). The rename rule is "client-facing REST identifiers become HTTP", and PushRest - the type of PubSubHttpClient.Push, paired with PushRealtime exactly as the old AblyRest paired with AblyRealtime - had escaped it. With this, no public type violating the rule remains (verified by sweep; ClientOptions.RestHost, IdempotentRestPublishing and the "Ably REST API" prose stay, per the retained-REST rule). PushRealtime is untouched. UPDATING.md's rename table gains the row. ClientConstructors_AreNotPublic (new spec in PubSubPackageSpecs). The internal-constructor invariant is load-bearing: the door factories are the only way application code can construct a client, which is what guarantees every client carries the device/server classification that Ably's platform behaviour and MAU billing depend on. Nothing enforced that invariant, so an accidental future public constructor would ship silently; the spec reflection-asserts that PubSubRealtimeClient and PubSubHttpClient expose zero public instance constructors. Also rewords the stale "Interface for a rest client" summary on IPubSubHttpClient for the renamed type.
|
Important Review skippedToo many files! This PR contains 102 files, which is 2 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (102)
You can disable this status message by setting the 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 |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The checked-in Unity plugin still exposes the old API, preventing the updated Unity sources and tests from compiling.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 3
Open (5)
What changed in this PR
Renames the SDK’s client-facing REST terminology to HTTP across core code, tests, Unity sources, documentation, and package metadata.
Changes:
- Renames clients, interfaces, channels, push APIs, and internal requesters.
- Updates tests, samples, project inclusions, documentation, and package descriptions.
- Adds constructor-visibility coverage.
| File | Summary |
|---|---|
UPDATING.md |
Documents renamed types and factory usage. |
unity/README.md |
Updates Unity client naming. |
unity/Assets/Tests/PlayMode/AuthSpecs.cs |
Updates Unity authentication tests. |
unity/Assets/Tests/PlayMode/AblyRealtimeSpecs.cs |
Updates Unity requester references. |
unity/Assets/Tests/EditMode/AuthSpecs.cs |
Updates Unity authentication tests. |
unity/Assets/Tests/EditMode/AblyRealtimeSpecs.cs |
Updates Unity requester references. |
unity/Assets/Tests/AblySandbox/AblySandboxFixture.cs |
Updates sandbox client types. |
unity/Assets/Tests/AblySandbox/AblySandbox.cs |
Updates sandbox client types. |
unity/Assets/Tests/AblySandbox/AblyRealtimeExtensions.cs |
Updates extension targets. |
unity/Assets/Tests/AblySandbox/AblyCollectionFixture.cs |
Updates fixture references. |
unity/Assets/Ably/Examples/Dashboard/AblyPresence.cs |
Updates example client types. |
unity/Assets/Ably/Examples/Dashboard/AblyMain.cs |
Updates example client type. |
unity/Assets/Ably/Examples/Dashboard/AblyChannel.cs |
Updates example client types. |
src/Ably.PubSub.Tests.Shared/TestExtensions.cs |
Updates realtime extensions. |
src/Ably.PubSub.Tests.Shared/Samples/RealtimeSamples.cs |
Updates realtime samples. |
src/Ably.PubSub.Tests.Shared/Samples/DocumentationSamples.cs |
Updates documentation samples. |
src/Ably.PubSub.Tests.Shared/Realtime/RealtimeWorkflowSpecs.cs |
Updates workflow test types. |
src/Ably.PubSub.Tests.Shared/Realtime/RealtimeSpecs.cs |
Updates realtime client usage. |
src/Ably.PubSub.Tests.Shared/Realtime/RealtimeSandboxSpecs.cs |
Updates realtime sandbox usage. |
src/Ably.PubSub.Tests.Shared/Realtime/PresenceSandboxSpecs.cs |
Updates realtime and HTTP interfaces. |
src/Ably.PubSub.Tests.Shared/Realtime/MockHttpRealtimeSpecs.cs |
Updates mock client usage. |
src/Ably.PubSub.Tests.Shared/Realtime/ConnectionStateTests/DisconnectedStateSpecs.cs |
Updates client construction. |
src/Ably.PubSub.Tests.Shared/Realtime/ConnectionSpecs/GeneralConnectionSpecs.cs |
Updates HTTP client properties. |
src/Ably.PubSub.Tests.Shared/Realtime/ConnectionSpecs/ConnectionFallbackSpecs.cs |
Updates HTTP request usage. |
src/Ably.PubSub.Tests.Shared/Realtime/ConnectionSpecs/ConnectionFailureSpecs.cs |
Updates client and token usage. |
src/Ably.PubSub.Tests.Shared/Realtime/ConnectionSpecs/ConnectionFailuresOnceConnectedSpecs.cs |
Updates client types. |
src/Ably.PubSub.Tests.Shared/Realtime/ConnectionSpecs/AblyRealtimeTestExtensions.cs |
Updates extension targets. |
src/Ably.PubSub.Tests.Shared/Realtime/ConnectionSandBoxSpecs.cs |
Updates realtime and HTTP usage. |
src/Ably.PubSub.Tests.Shared/Realtime/ConnectionSandboxOperatingSystemEventsForNetworkSpecs.cs |
Updates HTTP client usage. |
src/Ably.PubSub.Tests.Shared/Realtime/ConnectionAttemptsInfoSpecs.cs |
Updates HTTP client usage. |
src/Ably.PubSub.Tests.Shared/Realtime/ChannelSpecs.cs |
Updates realtime client types. |
src/Ably.PubSub.Tests.Shared/Realtime/ChannelSandboxSpecs.cs |
Updates realtime interfaces. |
src/Ably.PubSub.Tests.Shared/Push/PushTestHelpers.cs |
Updates HTTP client types. |
src/Ably.PubSub.Tests.Shared/Push/PushChannelTests.cs |
Updates push client usage. |
src/Ably.PubSub.Tests.Shared/Push/PushAdminSandboxTests.cs |
Updates HTTP client types. |
src/Ably.PubSub.Tests.Shared/Push/LocalDeviceTests.cs |
Updates client and property usage. |
src/Ably.PubSub.Tests.Shared/Push/ActivationStateMachineTests.cs |
Updates HTTP client types. |
src/Ably.PubSub.Tests.Shared/MessageEncodes/MessageEncodersAcceptanceTests.cs |
Updates encoding test types. |
src/Ably.PubSub.Tests.Shared/Infrastructure/TestExtensions.cs |
Updates realtime interfaces. |
src/Ably.PubSub.Tests.Shared/Infrastructure/AblySandboxFixture.cs |
Updates requester and client types. |
src/Ably.PubSub.Tests.Shared/Infrastructure/AblyRealtimeSpecs.cs |
Updates realtime client types. |
src/Ably.PubSub.Tests.Shared/Infrastructure/AblyCollectionFixture.cs |
Updates fixture references. |
src/Ably.PubSub.Tests.Shared/ImplicitTokenAuthWithClientId.cs |
Updates HTTP client type. |
src/Ably.PubSub.Tests.Shared/HttpProtocolTests.cs |
Renames protocol tests. |
src/Ably.PubSub.Tests.Shared/Http/TM3Spec.cs |
Moves message encoding tests. |
src/Ably.PubSub.Tests.Shared/Http/StatsSpecs.cs |
Updates stats tests. |
src/Ably.PubSub.Tests.Shared/Http/StatsSandBoxSpecs.cs |
Updates stats sandbox tests. |
src/Ably.PubSub.Tests.Shared/Http/SandboxSpecs.cs |
Updates sandbox client types. |
src/Ably.PubSub.Tests.Shared/Http/SandboxSpecExtension.cs |
Updates sandbox extensions. |
src/Ably.PubSub.Tests.Shared/Http/RequestSandBoxSpecs.cs |
Updates requester and client types. |
src/Ably.PubSub.Tests.Shared/Http/PresenceSpecs.cs |
Updates HTTP channel types. |
src/Ably.PubSub.Tests.Shared/Http/PresenceSandboxSpecs.cs |
Updates collection naming. |
src/Ably.PubSub.Tests.Shared/Http/MockHttpRestSpecs.cs |
Updates HTTP client types. |
src/Ably.PubSub.Tests.Shared/Http/JwtSandboxSpec.cs |
Updates collection naming. |
src/Ably.PubSub.Tests.Shared/Http/HttpSpecs.cs |
Renames HTTP tests and clients. |
src/Ably.PubSub.Tests.Shared/Http/HttpSandBoxSpecs.cs |
Renames sandbox tests. |
src/Ably.PubSub.Tests.Shared/Http/HttpInitSpecs.cs |
Renames initialization tests. |
src/Ably.PubSub.Tests.Shared/Http/ChannelSpecs.cs |
Updates HTTP channel types. |
src/Ably.PubSub.Tests.Shared/Http/ChannelSandboxSpecs.cs |
Updates HTTP channel types. |
src/Ably.PubSub.Tests.Shared/Http/ChannelOptionsDefaultsTests.cs |
Moves channel option tests. |
src/Ably.PubSub.Tests.Shared/Http/AblyHttpRequesterSpecs.cs |
Renames requester tests. |
src/Ably.PubSub.Tests.Shared/AuthTests/TestAblyAuth.cs |
Updates authentication client types. |
src/Ably.PubSub.Tests.Shared/AuthTests/AuthSandboxSpecs.cs |
Updates client types and documentation. |
src/Ably.PubSub.Tests.Shared/AuthTests/AuthorizationTests.cs |
Updates HTTP and realtime clients. |
src/Ably.PubSub.Tests.Shared/Ably.PubSub.Tests.Shared.projitems |
Updates test source inclusions. |
src/Ably.PubSub.Tests.DotNET/PubSub/PubSubPackageSpecs.cs |
Adds constructor visibility coverage. |
src/Ably.PubSub.Tests.DotNET/PubSub/PubSubDoorSandboxSpecs.cs |
Updates door test types. |
src/Ably.PubSub.Side/Side.cs |
Updates constructor documentation. |
src/Ably.PubSub.Shared/Transport/ConnectionManager.cs |
Updates HTTP client references. |
src/Ably.PubSub.Shared/Realtime/Workflows/RealtimeWorkflow.cs |
Updates workflow client references. |
src/Ably.PubSub.Shared/Realtime/RealtimeChannels.cs |
Updates realtime client types. |
src/Ably.PubSub.Shared/Realtime/RealtimeChannel.cs |
Updates realtime and HTTP channel types. |
src/Ably.PubSub.Shared/Realtime/Presence.cs |
Updates HTTP channel usage. |
src/Ably.PubSub.Shared/Realtime/Connection.cs |
Updates connection client references. |
src/Ably.PubSub.Shared/Realtime/AttemptsHelpers.cs |
Updates HTTP client extensions. |
src/Ably.PubSub.Shared/Push/PushRealtime.cs |
Updates realtime client types. |
src/Ably.PubSub.Shared/Push/PushHttp.cs |
Renames push HTTP API. |
src/Ably.PubSub.Shared/Push/PushChannel.cs |
Updates HTTP client references. |
src/Ably.PubSub.Shared/Push/PushAdmin.cs |
Updates HTTP client types. |
src/Ably.PubSub.Shared/Push/ActivationStateMachine.cs |
Updates HTTP client types. |
src/Ably.PubSub.Shared/PubSubRealtimeClient.cs |
Renames the realtime client. |
src/Ably.PubSub.Shared/PubSubHttpClient.cs |
Renames the HTTP client. |
src/Ably.PubSub.Shared/IPubSubRealtimeClient.cs |
Renames the realtime interface. |
src/Ably.PubSub.Shared/IPubSubHttpClient.cs |
Renames the HTTP interface. |
src/Ably.PubSub.Shared/IChannels.cs |
Updates channel documentation. |
src/Ably.PubSub.Shared/IAblyHttpRequester.cs |
Renames the requester interface. |
src/Ably.PubSub.Shared/Http/IHttpChannel.cs |
Renames the HTTP channel interface. |
src/Ably.PubSub.Shared/Http/HttpChannels.cs |
Renames the HTTP channel collection. |
src/Ably.PubSub.Shared/Http/HttpChannel.cs |
Renames the HTTP channel. |
src/Ably.PubSub.Shared/Http/ChannelOptions.cs |
Moves channel options. |
src/Ably.PubSub.Shared/Http/ChannelDetails.cs |
Moves channel details. |
src/Ably.PubSub.Shared/Http/AblyRequest.cs |
Updates request documentation. |
src/Ably.PubSub.Shared/Http/AblyHttpRequester.cs |
Renames the internal requester. |
src/Ably.PubSub.Shared/AblyAuth.cs |
Updates HTTP client dependencies. |
src/Ably.PubSub.Shared/Ably.PubSub.Shared.projitems |
Updates source inclusions. |
src/Ably.PubSub.Server/PubSubServer.cs |
Updates server factory return types. |
src/Ably.PubSub.Device/PubSubDevice.cs |
Updates device factory return types. |
README.md |
Updates public client guidance. |
nuget/ably.pubsub.server.nuspec |
Updates package description. |
nuget/ably.pubsub.device.nuspec |
Updates package description. |
examples/NotificationsPublisher/Program.cs |
Updates realtime interface usage. |
CHANGELOG.md |
Records renames and constructor restrictions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| public class AblyMain : MonoBehaviour, IUiConsole | ||
| { | ||
| private AblyRealtime _ably; | ||
| private PubSubRealtimeClient _ably; |
| public class AblySandbox: IDisposable | ||
| { | ||
| private readonly List<AblyRealtime> _realtimeClients = new List<AblyRealtime>(); | ||
| private readonly List<PubSubRealtimeClient> _realtimeClients = new List<PubSubRealtimeClient>(); |
| var realtimeClient = await helper.GetRealTimeClientWithRequests(protocol, token, invalidateKey: true); | ||
| Assert.AreEqual(1, helper.Requests.Count); | ||
| await realtimeClient.RestClient.TimeAsync(); | ||
| await realtimeClient.HttpClient.TimeAsync(); |
|
|
||
| /// <summary> | ||
| /// A class representing the connection associated with an AblyRealtime instance. | ||
| /// A class representing the connection associated with an PubSubRealtimeClient instance. |
|
|
||
| /// <summary> | ||
| /// Helper methods that return an AblyRest or AblyRealtime instance and a list of AblyRequest that | ||
| /// Helper methods that return an PubSubHttpClient or PubSubRealtimeClient instance and a list of AblyRequest that |


What this PR does
Renames the client-facing REST identifiers to HTTP for the 2.0 line, aligning ably-pubsub-dotnet with the SDK-family convention, plus two hardening items (a constructor-encapsulation regression test and a doc fix). Two commits: the rename pass, then the follow-through fixes.
The rename map
AblyRestPubSubHttpClientAblyRealtimePubSubRealtimeClientIRestClientIPubSubHttpClientIRealtimeClientIPubSubRealtimeClientRestChannel/RestChannels/IRestChannelHttpChannel/HttpChannels/IHttpChannelAblyRealtime.RestClient(property)PubSubRealtimeClient.HttpClientPushRest(the.Pushtype on the HTTP client)PushHttpAblyHttpClient/IAblyHttpClient(wire transport)AblyHttpRequester/IAblyHttpRequesterRest/source and test foldersHttp/Rest*-prefixed test classes/files (RestSpecs,RestInitSpecs,RestSandBoxSpecs,RestProtocolTests)Http*The internal transport rename removes the name collision the public rename would otherwise create: the low-level HTTP requester no longer shares a name with the renamed public client concept.
All file renames are
git mvmoves, so rename detection holds (30 renames at 65–100% similarity). Docs are updated in step: UPDATING.md gains a Renamed-types table, the CHANGELOG 2.0.0 entry states the renames and the internal-constructor model, and README and the nuspec descriptions name the new types.Why these names
The SDK family has converged on HTTP-named clients, and these are the shipped names:
PubSubHttpClient/PubSubRealtimeClient)PubSubHttpClient/PubSubRealtimeClient)PubSubHttpClient/PubSubRealtimeClient)ARTResttoARTHttpClientWhat is deliberately NOT renamed
The rule: rename our client layer, keep references to Ably's REST API service and wire options. Unchanged on purpose:
ClientOptions.RestHost/FullRestHost()andDefaults.RestHost(they name the service host)ClientOptions.IdempotentRestPublishing(wire option)rest.ably.ioliteralsIO.Ably.Restsub-namespace on the moved channel types), assembly names, NuGet package IDs andInternalsVisibleToidentitiesHardening
ClientConstructors_AreNotPublic(new spec inPubSubPackageSpecs): reflection-asserts thatPubSubRealtimeClientandPubSubHttpClientexpose zero public instance constructors. The internal-constructor invariant is load-bearing — the door factories are the only way application code can construct a client, which is what guarantees every client carries the device/server classification that platform behaviour and MAU billing depend on. Nothing previously enforced it, so an accidental future public constructor would have shipped silently.IPubSubHttpClient.Validation
./build.sh --target=Build.NetStandard(Release, StyleCop-as-error): 0 warnings / 0 errors./build.sh --target=Build.NetFrameworkunder mono: green (the shared projitems carry every moved path, and the net46 heads compile the renamed shared sources)Package=True+PACKAGE) ofAbly.PubSub.Coreand both door packages: clean;InternalsVisibleTois unaffected because assembly identities are unchangedTimeSpanrounding difference), all of which reproduce identically at the pre-rename tipNotes for reviewers
IO.Ablynamespace move is under separate consideration; the transitionalIO.Ably.Restsub-namespace left on the moved channel types is acknowledged and would be resolved by that follow-up.new AblyRealtime(...)" migration framing) is unchanged by this PR — the old names there describe the 1.x API, which is what a migrating reader is coming from.PushNotifications.mdis likewise untouched, as it documents the 1.x-only parked device push-receive flow.