Repository navigation
test: series key named like an option keyword is not parsed as that option in TS.RANGE (MOD-15893) - #2069
Merged
gabsow merged 3 commits intoNov 2, 2026
Conversation
TalBarYakar
approved these changes
Jun 17, 2026
TalBarYakar
reviewed
Jun 17, 2026
TalBarYakar
left a comment
Contributor
There was a problem hiding this comment.
just change the commit message name so it will be clear what is being tested
…ption A series key whose name equals an option keyword (ALIGN, COUNT, LATEST, AGGREGATION, FILTER_BY_VALUE, FILTER_BY_TS) used to be matched as that option in single-key TS.RANGE/TS.REVRANGE, with the next token consumed as the option's value -- e.g. a key named 'align' matched ALIGN and ate the fromTimestamp as the alignment value. PR #2052 (MOD-15893) scoped option parsing past the key to fix it. This test asserts a series keyed by an option keyword returns exactly what an identically populated control series returns, across TS.RANGE/TS.REVRANGE and the affected options, plus explicit post-fix values for the 'align'-named key (the scenario the Jedis #align test hit). Co-Authored-By: Claude Opus 4.8 <[email protected]>
gabsow
force-pushed
the
tom.gabsow/MOD-15893-range-keyword-key-regression-test
branch
from
June 17, 2026 08:39
89c6757 to
ef70245
Compare
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2069 +/- ##
=======================================
Coverage 70.18% 70.18%
=======================================
Files 41 41
Lines 8619 8619
=======================================
Hits 6049 6049
Misses 2570 2570
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
gabsow
deleted the
tom.gabsow/MOD-15893-range-keyword-key-regression-test
branch
November 2, 2026 10:03
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.



What
Adds a regression test (
test_keyword_named_key_not_misparsedintests/flow/test_ts_range.py) guarding the parsing fix from #2052 (MOD-15893, "Scope TS.RANGE/NRANGE option parsing past the key block").Why
Before #2052, the single-key range option sub-parsers located keywords by scanning the entire
argv. BecauseRMUtil_ArgIndexmatches case-insensitively, aTS.RANGE/TS.REVRANGEwhose series key was named like an option keyword (ALIGN,COUNT,LATEST,AGGREGATION,FILTER_BY_VALUE,FILTER_BY_TS) had its key matched as that option, and the following token was consumed as the option's value — e.g. a key literally namedalignmatched theALIGNkeyword and ate thefromTimestampas the alignment value.#2052 fixed this by scoping option scanning to
argv + start_index(after the key). The fix had no regression test, which is why the latent bug only surfaced in the external Jedis suite (TimeSeriesCommandsTestBase#align, which named its keyalign). Per product this is a bug fix, not a breaking change.How it's tested
Equivalence guard: a series keyed by an option keyword must return exactly what an identically populated control series returns, across
TS.RANGE/TS.REVRANGEand the affected options. Plus explicit post-fix values locked in for thealign-named key:align,AGGREGATION COUNT 10)ALIGN(0,2),(10,1),(20,1)ALIGN start(1,2),(11,1),(21,1)ALIGN end(0,2),(10,1),(20,1)ALIGN 5(0,2),(5,1),(25,1)Passes on all topologies (standalone, slaves, AOF, AOF+slaves, OSS cluster).
🤖 Generated with Claude Code
Note
Low Risk
Adds flow tests only; no runtime or parsing logic changes in this diff.
Overview
Adds
test_keyword_named_key_not_misparsedintests/flow/test_ts_range.pyso the #2052 / MOD-15893 fix stays covered: series keys named likeTS.RANGE/TS.REVRANGEoptions (align,count,latest, etc.) must not be parsed as those options.The test compares a
controlseries to copies keyed by each risky name acrossTS.RANGEandTS.REVRANGE, with queries that exercise aggregation, ALIGN, COUNT, FILTER_BY_*, and LATEST. It also pins expected aggregated results for a key namedalign, matching the Jedis scenario where a key namedalignwas mistaken forALIGN.Test-only change — no module or parser edits in this PR.
Reviewed by Cursor Bugbot for commit 0407498. Bugbot is set up for automated code reviews on this repo. Configure here.