Skip to content

fix(llc): regenerate the OpenAPI client at protocol v239.70.0 - #3064

Open
VelikovPetar wants to merge 1 commit into
v11from
fix/flu-929_regen_json_query_params
Open

VelikovPetar wants to merge 1 commit into
v11from
fix/flu-929_regen_json_query_params

Conversation

@VelikovPetar

@VelikovPetar VelikovPetar commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Submit a pull request

Linear: FLU-929
Github Issue: #

Warning

Defer merging until the backend v239.68.0 rollout reaches every cluster. That release (CHA-5968, CHA-3441) makes the server always send app.defaults, member user_id and own-user blocked_user_ids, and this spec marks those fields required. Against a server that predates it — the demo app's cluster on 2026-10-14 — the regenerated client fails to decode:

  • getApp, so getAppSettings returns a failure and the settings load on connect fails silently (connectUser itself still succeeds);
  • any ChannelMemberResponse, which includes channel.membership in a generated queryChannels response.

Released SDKs and the current queryChannels path are unaffected: they decode the hand-written models, and nothing in lib/src/ decodes the generated ChannelMemberResponse.

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

Description of the pull request

Regenerates lib/open_api/ at openapi-v239.70.0 with the generator fix from GetStream/chat#18085 (monolith v239.67.0-238-g8d6e1fa600). It is the first protocol release whose spec marks the sort query params of GetReplies and GetPinnedMessages as JSON.

Object-typed GET query params used to go out as plain retrofit @Querys, so Dio bracket-expanded the payload (payload[filter_conditions][id]=…) or toString()ed the sort list, and the server answered 400 invalid json data. Each of these params is now sent as one JSON-encoded query value. The typed public method on DefaultApi stays as it was and forwards to a private retrofit method:

  • payload: queryMembers, queryUsers, search, queryBannedUsers, queryFutureChannelBans, queryMessageFlags
  • sort: getReplies, getPinnedMessages

A DateTime inside the value is sent as UTC RFC3339 and a Set as a list. A value that can't be encoded (a hand-written enum, a Duration) returns a failure without sending a request.

Spec drift (v239.44.1 → v239.70.0)

  • New op: queryChannelBans, now listed in group 11.
  • Newly required: AppResponseFields.defaults, ChannelMemberResponse.userId and OwnUserResponse.blockedUserIds. See the warning above.
  • Removed: revokeTokensIssuedBefore from UserResponse and its siblings. No mapper read it.
  • New fields and models: additive, including scheduled messages, channel-ban scopes and the AI audio config.

Test fixtures are updated for defaults and revokeTokensIssuedBefore. generate_plan.py now lists an op under its public name rather than its private _name retrofit method.

Testing

  • dart analyze --fatal-infos clean; flutter test --exclude-tags live green, 1,896 tests.

  • New request-level tests in test/open_api/api/default_api_json_query_test.dart assert on the outgoing request:

    • payload and sort each go out as one JSON query value with no bracket keys;
    • a local DateTime is sent in UTC and a Set as a list;
    • an enum or Duration returns a failure without sending a request;
    • plain params are sent as they are.

    Six of the seven fail against the previous client.

  • Local live runs against the demo app:

    • All 8 ops returned 400 before. Now all 8 succeed.
    • A generated queryChannels probe fails on the missing membership user_id, which is the rollout issue above.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 046c50f1-1775-4a9e-aca1-ed04b7b5a1ca

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · 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.

@VelikovPetar
VelikovPetar requested a review from a team October 14, 2026 13:43
@VelikovPetar
VelikovPetar marked this pull request as ready for review October 14, 2026 13:43
@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (v11@e4533d9). Learn more about missing BASE report.

Additional details and impacted files
@@          Coverage Diff           @@
##             v11    #3064   +/-   ##
======================================
  Coverage       ?   77.94%           
======================================
  Files          ?      469           
  Lines          ?    29226           
  Branches       ?        0           
======================================
  Hits           ?    22779           
  Misses         ?     6447           
  Partials       ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants