Skip to content

fix(client): correct XINFO GROUPS last-delivered-id reply type - #3410

Open
abhijeet117 wants to merge 1 commit into
redis:masterfrom
abhijeet117:fix/xinfo-groups-reply-type
Open

fix(client): correct XINFO GROUPS last-delivered-id reply type#3410
abhijeet117 wants to merge 1 commit into
redis:masterfrom
abhijeet117:fix/xinfo-groups-reply-type

Conversation

@abhijeet117

@abhijeet117 abhijeet117 commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

The XINFO GROUPS reply type declared last-delivered-id as a number, but Redis sends a stream entry ID string (for example "0-0"), so TypeScript consumers saw the wrong primitive type and could hit runtime errors treating it as numeric. This labels it BlobStringReply, matching XINFO STREAM's last-generated-id and the runtime value already asserted by the XINFO GROUPS integration spec.

Testing

Reproduced at compile time: with the old declaration, groups[0]['last-delivered-id'] resolves to number and assigning it to string fails tsc. Added packages/client/types-tests/xinfo-groups.types-test.ts which fails before the fix and passes after. Ran test:types, lint and the client package build locally; full suites run in CI.

Checklist

  • bug reproduced before fix
  • root cause identified
  • bug fixed
  • tests passed

Note

Low Risk
Type-only correction plus a compile-time test; no runtime or protocol behavior changes.

Overview
Fixes the XINFO GROUPS reply type so last-delivered-id is a stream ID string (BlobStringReply), not a number. Redis returns values like "0-0"; the old NumberReply declaration made TypeScript treat it as number.

Adds a compile-time types test that asserts the field is assignable to string and not to number.

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

@PavelPashov

Copy link
Copy Markdown
Contributor

@abhijeet117 Thanks for the PR. We’ll review it when we have capacity.

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