Skip to content

pubsub: raise 90011 when releasing a realtime channel that isn't detached - #729

Open
SimonWoolf wants to merge 1 commit into
integration/v4from
release-throw-unless-detached
Open

SimonWoolf wants to merge 1 commit into
integration/v4from
release-throw-unless-detached

Conversation

@SimonWoolf

Copy link
Copy Markdown
Member

Implements RTS4c–e from specification 6.3.0 (ably/specification#557).

Breaking change: channels.release(name) on a realtime client now raises an AblyException with code 90011 and status code 400 if the channel isn't INITIALIZED, DETACHED or FAILED, and leaves the channel attached and in the collection. Previously it removed the channel whatever its state, which could leave it attached in the Ably service. Releasing a name that isn't in the collection is still a no-op. Releasing a channel in one of those three states still removes it. release() stays synchronous.

Migration: detach the channel and wait for the detach to complete before releasing it:

await client.channels.get('my-channel').detach()
client.channels.release('my-channel')

UPDATING.md documents this.

  • Rederives the channels collection UTS tests for RTS4c–e, all passing, and removes the RTS4a release deviation from deviations.md.

90011 is registered in ably/ably-common#367. 3.x logs a deprecation warning for this case (#728). Reference ably-js PRs: ably/ably-pubsub-js#2322 (deprecation) and ably/ably-pubsub-js#2323 (next major).

🤖 Generated with Claude Code

…ched

Specification 6.3.0 replaces RTS4a with RTS4c-e. Channels.release used to
remove a channel whatever its state, so an attached channel was dropped
from the collection while still attached in the Ably service. It now
raises an AblyException with code 90011 and status 400 for a channel that
is not INITIALIZED, DETACHED or FAILED, and leaves the channel as it was
(RTS4e); it still returns quietly for an unknown name (RTS4c) and removes
a channel in one of those states (RTS4d).

This is a breaking change: callers must await channel.detach() before
releasing. 3.x logs a deprecation warning in this case (RTS4b). The
channels collection UTS tests are rederived for RTS4c-e, which closes the
RTS4a release deviation.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 59aa0498-7822-4049-b209-8f3e17ad0982
📥 Commits

Reviewing files that changed from the base of the PR and between 4a869cf and 857c97d.

📒 Files selected for processing (4)
  • UPDATING.md
  • ably/pubsub/realtime/channel.py
  • test/uts/deviations.md
  • test/uts/realtime/unit/channels/channels_collection_test.py
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

This branch was successfully deployed

1 active deployment
staging/pull/729/features — 857c97da Deployed Oct 9, 2026 by github-actions[bot]
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