Skip to content

fix: fractional timeouts, jwt and json 3, hash-style StreamResponse - #177

Merged
mogita merged 3 commits into
masterfrom
fix/cha-7711-eval-defects
Dec 4, 2026
Merged

mogita merged 3 commits into
masterfrom
fix/cha-7711-eval-defects

Conversation

@mogita

@mogita mogita commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

Ticket

https://linear.app/stream/issue/CHA-7711/generated-server-sdks-defects-found-by-the-migration-skill-eval

Problem

Timeouts went through to_i, so 2.5 s became 2 and 0.5 became 0. The gem pinned jwt ~> 2.0 and json ~> 2.0, which forced customer apps to downgrade. StreamResponse answered [], key?, dig and fetch with nil, because method_missing read them as field names.

Solution

  • request_timeout, connect_timeout and idle_timeout keep fractions (to_f).
  • jwt and json accept >= 2.0, < 4. The unit suite passes on jwt 3.3.2 and json 3.2.0.
  • StreamResponse implements [], key?, fetch and dig. A call with arguments, a block or a ?, ! or = suffix now raises NoMethodError. An unknown plain name still reads as nil, because the API omits empty optional fields.

How to verify

  1. bundle exec rspec spec/stream_response_spec.rb spec/connection_pooling_spec.rb

BEGIN_COMMIT_OVERRIDE
fix: keep fractional request, connect and idle timeouts
fix: allow jwt 3 and json 3
fix: support [], key?, fetch and dig on StreamResponse
END_COMMIT_OVERRIDE

…esponse like a hash

Timeouts went through to_i, so 2.5 s became 2 and 0.5 became 0. The gem pinned jwt and json to 2.x. StreamResponse answered [], key?, dig and fetch with nil because method_missing read them as field names.
@getstream-metis

getstream-metis Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

👋 Thanks, 🌵! I'm on it.

How to work with me

  • 💬 Disagree with a finding? Reply in its thread and tell me why. I'll withdraw it, or answer with evidence.
  • 🔁 Fixed it? Just push. The next round checks your fix and resolves the thread.
  • 👍 👎 Rate my findings. I learn what your team doesn't want flagged.
  • ✅ I approve once nothing blocking is left: must-fix always blocks; should-fix blocks in the first two rounds, and after that until you fix it or reply in its thread. CI isn't part of that; branch protection still holds the merge until it's green. On repos that require a human approval, a teammate still has to approve too.
Commands

Comment any of these on the PR:

  • /jeffery review · start a review
  • /jeffery next-round · start the next round now
  • /jeffery pause · /jeffery resume · stop or restart reviews on this PR
  • /jeffery status · where things stand
  • /jeffery help · all commands

@getstream-metis getstream-metis Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 1 · 🆕 3 new · 1 should-fix to go

Finding Where
🟡 Should Fix Field reads on non-Hash response bodies now raise NoMethodError stream_response.rb:14

➡️ Round 2 started on 2eb5355.

Comment thread lib/getstream_ruby/stream_response.rb Resolved
Comment thread lib/getstream_ruby/stream_response.rb Resolved
Comment thread lib/getstream_ruby/stream_response.rb Resolved

@getstream-metis getstream-metis Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 2 · ✅ 3 fixed · 🎉 Approved

Nice work, 🌵! Nothing blocking is left on 2eb535582cda. Ship it 🚀

@mogita
mogita merged commit a13e9d2 into master Dec 4, 2026
9 checks passed
@mogita
mogita deleted the fix/cha-7711-eval-defects branch December 4, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant