The Wire · Showcase
RAILS ACTION CABLE FIXES LAND ACROSS THE BOARD
By RepoJournal · Filed · About Rails
Rails just merged four critical fixes for Action Cable's channel management and streaming, addressing symbol coercion bugs that could silently break WebSocket connections in production.
The core issue: Action Cable was inconsistently handling symbol vs. string stream names across multiple layers, creating silent failures when developers mixed naming conventions [1] [2] [3]. The test adapter wasn't coercing symbols to strings in accessors [2], Channel#stop_stream_from was passing raw symbols to broadcasting logic [3], and the subscriber map was firing remove_channel callbacks for channels that never existed in the first place [1]. A separate fix ensures Server#each_connection now iterates over a snapshot of connections rather than the live collection, preventing iterator invalidation errors during concurrent connection churn [4]. These are the kinds of bugs that surface under load or in test suites with aggressive concurrency patterns. Stack them together and you've got a solid patch cycle that hardens the WebSocket foundation.
One email a day. Unsubscribe in one click.
Keep up with Rails in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Review your Action Cable test suite for symbol-based stream names and verify they match production code rails/rails [plan]
- → If you use stop_stream_from in production, test the behavior with both string and symbol arguments before next deploy rails/rails [plan]
- → Watch for the next Rails version tag to pull these fixes into a release build rails/rails [monitor]
References
- [1] Merge pull request #57697 from 55728/fix-subscriber-map-remove-unknown-channel rails/rails
- [2] Merge pull request #57698 from 55728/fix-test-adapter-symbol-stream-coercion rails/rails
- [3] Merge pull request #57692 from 55728/fix-stop-stream-from-symbol-coercion rails/rails
- [4] Merge pull request #57691 from 55728/fix-connections-iterate-snapshot rails/rails