Skip to content

Default Resp3#3215

Open
nkaradzhov wants to merge 7 commits intoredis:masterfrom
nkaradzhov:resp3
Open

Default Resp3#3215
nkaradzhov wants to merge 7 commits intoredis:masterfrom
nkaradzhov:resp3

Conversation

@nkaradzhov
Copy link
Copy Markdown
Collaborator

@nkaradzhov nkaradzhov commented Mar 31, 2026

Description

Describe your pull request here


Checklist

  • Does npm test pass with this change (including linting)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?

Note

Medium Risk
Changes the library-wide default wire protocol and normalizes reply shapes/types across many commands, which can break consumers relying on RESP2 defaults or exact reply structures (e.g., null-prototype objects, geo/string doubles, module/search transforms).

Overview
Switches the default protocol across createClient/cluster/sentinel/pool (and related types/helpers) from RESP2 to RESP3, updating option validation/handshake logic to treat RESP as 3 when omitted and removing the unstableResp3 gating/flags from commands and configuration.

Normalizes reply handling for RESP3 by (a) decoding RESP3 maps into plain objects (no null-prototype), (b) aligning many transforms/tests to expect {}/Object.defineProperties({}, ...), and (c) stabilizing several previously-unstable RESP3 command transforms (notably HOTKEYS GET, XREAD/XREADGROUP, GEO* WITH double parsing, MODULE LIST, and multiple RediSearch FT.* replies including cursor/profile/hybrid/aggregate) to return consistent structured outputs.

Adds a v5v6 migration guide documenting RESP3-by-default, type changes (e.g., geo distances/coordinates as numbers, CF.INSERTNX boolean→number array), and the object-prototype normalization, plus expands test coverage with more “real data” and structural-shape assertions under RESP3 defaults.

Reviewed by Cursor Bugbot for commit f46fc60. Bugbot is set up for automated code reviews on this repo. Configure here.

@nkaradzhov nkaradzhov force-pushed the resp3 branch 5 times, most recently from e4d84b7 to 311595a Compare April 6, 2026 15:52
- Add RESP2 vs RESP3 structural assertions across command specs.
- Consolidate duplicate, renamed, and flaky test cases in one pass.
- Keep this commit spec-only to isolate test intent.
- Switch default RESP behavior to RESP3 across client entry points.
- Align cluster and sentinel command paths with RESP3 defaults.
- Keep compatibility normalization and module fixes for later commits.
- Normalize cross-module reply-shape handling for RESP2 and RESP3.
- Apply shared parser and transformer updates for stable compatibility.
- Leave targeted module bugfixes isolated for the next commit.
- Fix GEO float reply handling across geosearch-compatible paths.
- Fix Bloom CF.INSERTNX status handling and Search PROFILE parsing edge cases.
- Fix TimeSeries MRANGE selected-label/groupby compatibility behavior.
generic-transformers.spec.ts was newly uncommented and needed some assertion updates
@nkaradzhov nkaradzhov marked this pull request as ready for review April 16, 2026 15:32
@nkaradzhov nkaradzhov mentioned this pull request Apr 16, 2026
3 tasks
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit f46fc60. Configure here.

}

return compat;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Identical function duplicated across XREAD and XREADGROUP

Low Severity

transformStreamsMessagesReplyResp3Compat is copied verbatim (36 identical lines) across XREAD.ts and XREADGROUP.ts within the same package. Both import transformStreamsMessagesReplyResp3 from generic-transformers already — the shared compat wrapper belongs there too. This risks the two copies diverging if only one is updated in a future fix.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f46fc60. Configure here.

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.

1 participant