Repository navigation
DOC-7267 Make node_redis entries callable and typed, and add ctx to go-redis HOTKEYS - #4486
Merged
Merged
Conversation
…o-redis HOTKEYS node_redis: 344 of 474 entries change, all checked against node-redis 6.3.1. 325 signatures were not the call a reader would make. 312 used the uppercase command as the method (APPEND, and the dotted BF.ADD, JSON.SET and TS.ADD, which cannot be called as written), and 13 were the internal parseCommand(parser, ...) form. They are now the camelCase method from the package's own index.ts, and module commands are client.<namespace>.<method> (client.bf.add, client.json.set, client.ft.search, client.ts.add), matching the one entry that already used client.ft.hybrid. The parser parameter is dropped from the 13. 226 return types changed: 182 of the 226 Any returns now carry the transformReply type read from the source (RESP2 form where a command declares both), and 44 Promise-wrapped types lose the wrapper and keep their inner type. Parameter text and descriptions are untouched. Checked two ways: all 458 resolved entries name a member in the 6.3.1 declarations, and a tsc --strict compile of typeof client.<name> succeeds for all 448 distinct names (the remaining ones are client-level methods such as quit and select that are not in the command map). This closes the DOC-7263 gap that tsc was not available. go-redis: the four HOTKEYS entries now list ctx in params like the other 548. Left alone and flagged: 44 Any returns whose source has no readable reply type, 16 entries that do not map to a command-map member, 43 entries whose parameters disagree with the source (some real, such as CF.LOADCHUNK data versus chunk, some generator limits), and two swapped pairs, DECR with DECRBY and INCR with INCRBY, where each file holds the other's entry. Learned: node-redis lists every command under an uppercase and a camelCase key, so the uppercase entries were valid API but unreadable and, for modules, not callable as written Constraint: a module command is client.<namespace>.<method>, namespaces are bf cf cms tDigest topK json ft ts Directive: take the reply type from transformReply in source, not the d.ts, which expands aliases into unreadable types Gaps: 43 parameter disagreements and 44 Any returns are not fixed Recheck: when node-redis ships a release after 6.3.1, rerun the declaration check Ticket: DOC-7267 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
dwdougherty
approved these changes
Nov 5, 2026
Contributor
🧠 Redis MemoryFound 5 related items from repository history (5 new this commit):
Memory updated at 95e83a0 |
Contributor
This was referenced Nov 6, 2026
andy-stark-redis
added a commit
that referenced
this pull request
Nov 6, 2026
…lient-quirks The DOC-7267 cleanup PRs (#4482, #4484, #4486) left their durable findings only in commit bodies, where a future sweep would not see them before authoring. They now sit in the per-client sections of the command-api-mapping skill's quirks reference: node-redis lists every command under an uppercase and a camelCase key and modules are client.<namespace>.<method>; reply types come from source, not the .d.ts; ten redis-py methods raise NotImplementedError; an NRedisStack async entry is never a copy of the sync one, and the scan overloads return IAsyncEnumerable. Directive: when a sweep finds a client convention that is not in client-quirks.md, add it there in the same PR Ticket: DOC-7267 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Summary
DOC-7267 items 4 and 6. Everything is checked against node-redis 6.3.1.
node_redis: 344 of 474 entries change.
APPEND, and for modules the dottedBF.ADD,JSON.SET,TS.ADD, which can't be called as written). 13 were the internalparseCommand(parser, ...)form. They are now the camelCase method from the package's ownindex.ts(append,aclCat), and module commands areclient.<namespace>.<method>(client.bf.add,client.json.set,client.ft.search,client.ts.add), matching the one entry that already usedclient.ft.hybrid. Theparserparameter is dropped from the 13, in the signature and inparams.Anyreturns now carry thetransformReplytype from the source (the RESP2 form where a command declares both). 44Promise<...>types lose the wrapper and keep their inner type.go-redis: 4 entries. The
HOTKEYSentries now listctxinparams, like the other 548. (The ticket overstated this; only these four were inconsistent.)The merged
data/command-api-mapping.jsonis regenerated and equals the per-command data. Its only semantic changes are those node_redis and go-redis entries; no other client changed.How to review
tsc --strictcompile oftypeof client.<name>succeeds for all 448 distinct names. This closes the DOC-7263 gap thattscwasn't available. The remaining names are client-level methods (quit,select, ...) that aren't in the command map..d.ts, which expands aliases into unreadable types (ArrayReply<BlobStringReply<string>>, a 400-characterAclUser).signatureorreturns.type, except the 13 removedparserparams.Left for the rest of DOC-7267
Anyreturns whose source has no readable reply type (arrow functions with an inferred return):BZMPOP,BZPOPMAX,BZPOPMIN,GEODIST,GEOPOS,HSCAN,SCAN,SSCAN,ZSCAN,JSON.GET,JSON.MGET,JSON.ARRPOP,TS.GET,TS.INFO,TS.MGET,TS.MRANGE,TS.MREVRANGE,TS.RANGE,TS.REVRANGE,TS.DECRBY, theV*vector set commands, theX*stream commands,ZADD,ZINCRBY,ZMPOP,ZPOPMAX,ZPOPMIN,ZRANGE,ZRANGEBYSCORE,ZSCORE,SORT_RO,GEORADIUS_ROandGEORADIUSBYMEMBER_RO.CF.LOADCHUNKcalls a parameterdatawhere the source sayschunk;CMS.INITBYDIMandCMS.INITBYPROBomitoptions;TDIGEST.*rank commands), some are my reader's limits on rest or overloaded parameters (ARGREP,EVAL*,ZRANGE). Listed:ARGREP,CF.INSERT,CF.INSERTNX,CF.LOADCHUNK,CMS.INITBYDIM,CMS.INITBYPROB,CONFIG SET,EVAL,EVAL_RO,EVALSHA,EVALSHA_RO,FCALL,FCALL_RO,FT.ALTER,FT.CURSOR READ,FT.DICTADD,FT.DICTDEL,FT.SYNUPDATE,GEORADIUS,GEORADIUS_RO,GEORADIUSBYMEMBER_RO,HSET,JSON.MGET,MIGRATE,PEXPIRE,PEXPIREAT,SORT_RO,TDIGEST.BYRANK,TDIGEST.BYREVRANK,TDIGEST.MERGE,TDIGEST.RANK,TDIGEST.REVRANK,TDIGEST.TRIMMED_MEAN,TOUCH,TS.DECRBY,TS.INCRBY,TS.RANGE,TS.REVRANGE,XADD,ZRANGE,ZRANGEBYSCORE.FAILOVER,MONITOR,QUIT,RESET,SELECT,SAVE,SHUTDOWN,READWRITE,FT.PROFILE, and the pub/sub commands (SUBSCRIBE,PSUBSCRIBE,SSUBSCRIBE,UNSUBSCRIBE,PUNSUBSCRIBE,SUNSUBSCRIBE) plusCLIENT TRACKING, whose names are generic type fragments (false>,boolean>).DECR.jsonholds theDECRBYentry andDECRBY.jsonholdsDECR, and the same forINCRandINCRBY. They now readdecrBy/decr/incrBy/incrbut still sit in each other's files. Swapping them is a data move, so I left it for a decision.🤖 Generated with Claude Code
Note
Low Risk
Documentation and JSON mapping metadata only; no runtime code or security-sensitive paths.
Overview
Updates the command API mapping metadata so node_redis entries reflect how callers actually invoke node-redis 6.3.1, not internal parser shapes or uppercase command literals.
Signatures move to camelCase client methods (e.g.
append,clusterAddSlots) and module commands useclient.<module>.<method>(e.g.client.bf.add,client.ft.search). Entries that previously documentedparseCommand(parser, …)now show the public API and drop theparserparameter. Return types replace broadAnyandPromise<…>wrappers with reply types taken from the client source (NumberReply,BlobStringReply,ReplyUnion, etc.).Separately, go-redis HOTKEYS mappings add the missing
ctx context.Contextparameter so they match the rest of that client’s entries.These are documentation/data-only changes to
data/command-api-mapping/; no Redis client libraries or server behavior change.Reviewed by Cursor Bugbot for commit 95e83a0. Bugbot is set up for automated code reviews on this repo. Configure here.