Conversation
json 3.0.0 removed the 2nd POSITIONAL argument to `JSON.parse` (options are keyword-only now), but activesupport 8.1.3 still calls `JSON.parse(json, options)` in `ActiveSupport::JSON.decode`. Action Cable's `Connection::Base#decode` runs that on every incoming frame, so under json 3.0.0 it raises `wrong number of arguments (given 2, expected 1)` — the subscribe is never processed and the self-contained cable spec's `connected()` callback never fires. The gitignored Gemfile.lock let CI re-resolve to json 3.0.0 the day it shipped, reddening the whole matrix on a dependency change unrelated to any code (main included). Pin json to < 3 for dev/CI, next to the actioncable dep that surfaces it and mirroring the existing flatware pin's rationale. The gemspec stays unconstrained: csim's own JSON usage is json-3-clean (the other 11k specs pass on 3.0.0); only the Rails test stack isn't ready. Drop the pin once activesupport ships a json-3 fix. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DYNGgfDAteLVXeaMaDmjJ4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The failure
Every branch's CI (main included) went red on the self-contained Action Cable spec:
Root cause
json 3.0.0 dropped the 2nd positional argument to
JSON.parse(options are keyword-only now), but activesupport 8.1.3 still callsJSON.parse(json, options). Action Cable'sConnection::Base#decoderuns that on every incoming websocket frame, so under json 3.0.0 it raises — thesubscribecommand is never processed and the spec'sconnected()callback never fires (a silent, timing-shaped failure).Gemfile.lockis gitignored, so CI re-resolved to json 3.0.0 the day it shipped — reddening the whole matrix on a dependency change unrelated to any code. Confirmed with a local A/B: json 2.19.5/2.21.2 pass, json 3.0.0 fails.Fix
Pin
json < 3for dev/CI, next to theactioncabledep that surfaces it, mirroring the existingflatwarepin's rationale (an unconstrained major hitting CI unbisectably). The gemspec stays unconstrained — csim's own JSON usage is json-3-clean (the other ~11k specs pass on 3.0.0); only the Rails test stack isn't ready. Drop the pin once activesupport ships a json-3 fix.Note
This unblocks main and the two open PRs (#233 perf gate, #234 native removal), whose red CI was entirely this dependency issue, not their own changes.
🤖 Generated with Claude Code