Repository navigation
feat(cmds): add Start and Stop to ZRANGE and ZRANGESTORE builders - #1035
Open
AdamMagued wants to merge 1 commit into
Open
AdamMagued wants to merge 1 commit into
AdamMagued wants to merge 1 commit into
Conversation
rueian
approved these changes
Oct 12, 2026
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.
Resolves #1032.
Redis renamed range arguments for ZRANGE and ZRANGESTORE from min/max to start/stop in redis/redis#10097 and redis/redis-doc#1736 to avoid confusion when using the REV modifier. Under REV, the start argument represents the upper score bound and stop represents the lower score bound.
This change updates hack/cmds/commands.json to define a oneof grouping containing both min/max and start/stop argument blocks for ZRANGE and ZRANGESTORE commands, following the maintainer recommendation in #1032.
Changes made:
Note
Low Risk
Additive, backward-compatible builder API with tests proving wire-equivalence to Min/Max; no runtime or security-sensitive logic changes.
Overview
Adds
Start/Stopfluent builder paths forZRANGEandZRANGESTORE, matching Redis’s renamed range arguments (alongside existingMin/Max).hack/cmds/commands.jsonnow models the range as aoneof: eithermin/maxorstart/stop. Regenerated builders ininternal/cmds/gen_sorted_set.goexpose parallel chains (ZrangeKey.Start→Stop, same optional flags as the min/max path).Tests in
builder_test.goassertStart/StopandMin/Maxemit identical Redis argument lists (includingBYSCORE,BYLEX,REV,LIMIT,WITHSCORES, and cacheable builds). Smoke coverage for the new chains was added ingen_sorted_set_test.go.Reviewed by Cursor Bugbot for commit 7203aab. Bugbot is set up for automated code reviews on this repo. Configure here.