Skip to content

DOC-7267 Fix the remaining node_redis entries against the 6.3.1 source - #4501

Open
andy-stark-redis wants to merge 1 commit into
mainfrom
DOC-7267-node-redis-leftovers
Open

andy-stark-redis wants to merge 1 commit into
mainfrom
DOC-7267-node-redis-leftovers

Conversation

@andy-stark-redis

@andy-stark-redis andy-stark-redis commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The last node_redis items from DOC-7267, checked against the node-redis 6.3.1 sources and a tsc --strict compile of the method names. 38 command files change, only their node_redis lists, plus the status file and the merged data file.

  • Names and types that differ from the source:
    • CF.LOADCHUNK chunk, FT.ALTER schema, FT.CURSOR READ cursor, FT.DICTADD and FT.DICTDEL term, FT.SYNUPDATE groupId.
    • MIGRATE destinationDb, PEXPIRE ms, PEXPIREAT msTimestamp (number | Date), TDIGEST.TRIMMED_MEAN lowCutPercentile and highCutPercentile, TOUCH key.
    • TDIGEST.MERGE is (destination, source, options). It had a numKeys parameter the client doesn't take.
    • JSON.MGET gains reviver. CMS.INITBYDIM and CMS.INITBYPROB gain options.
  • 13 entries with ...args: Parameters<typeof helper> now list the parameters the helper declares: XADD, TS.INCRBY, TS.DECRBY, TS.RANGE, TS.REVRANGE, GEORADIUS, GEORADIUS_RO, GEORADIUSBYMEMBER_RO, XRANGE, XREVRANGE, BZMPOP, and the second ZRANGE and ZRANGEBYSCORE entries.
  • Not callable: FAILOVER, SAVE, SHUTDOWN and READWRITE have a source file but no client method, so their lists are empty and the status file marks node_redis as generic_only.
  • FT.PROFILE was a single PROFILE method that doesn't exist. It is now client.ft.profileSearch and client.ft.profileAggregate, returning ProfileReplyResp2. FT._LIST is client.ft._list.
  • DECR, DECRBY, INCR and INCRBY each held the neighbouring command's entry as well. Each file now keeps its own.

Review notes

  • No other client's key changes. The merged data/command-api-mapping.json equals a regeneration from the per-command files. Built with content/develop/clients ignored (the full site only builds in CI), and FT.PROFILE, FAILOVER, DECR, XADD and TOUCH render as expected.
  • The 44 Any returns are left. node-redis 6.3.1 itself types those replies as any (tsc reports Promise<any>), so there is no declared type to copy. Writing a type from the transformer's runtime shape would be my invention.
  • The 11 entries the generator could not resolve are select, quit, monitor, reset and the pub/sub methods, which are client-level methods outside the command map (I read each in client/index.ts), and clientTracking, which is in the command map but has a generic signature the generator mis-parses (tsc confirms it exists). I left them.
  • Not fixed:
    • EVALSHA and FCALL name their parameter sha1 and functionName, while the shared helper names it script. I kept the readable names.
    • HSET, AUTH and CONFIG SET take destructured or tuple parameters and were checked by reading the source, not by compile.
    • I did not recheck params or returns of other entries beyond the generator's comparison.

🤖 Generated with Claude Code


Note

Low Risk
Documentation-only JSON updates with no runtime code paths affected.

Overview
Summary

Brings the regenerated command-api-mapping blobs and merged command-api-mapping.json back in sync with node-redis 6.3.1: every affected node_redis signature now lists the concrete parameters returned by tsc --strict, including module helpers (JSON.MGET, CMS.INIT*, TDigest) and geo/timeseries/stream APIs that previously exposed ...args.

Call-site hygiene

DECR*, INCR*, failover/read-write lifecycle commands, and other mismatched entries no longer embed neighbouring helpers or phantom methods; FAILOVER, SAVE, SHUTDOWN, and READWRITE intentionally clear their client sections while command-api-mapping-status marks them generic_only.

Search stack fixes

FT commands pick up the renamed parameters/method casing (client.ft.profileSearch/profileAggregate, client.ft._list, updated dict/cursor helpers) so docs match the published TypeScript surface.

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

The last node_redis items from the DOC-7267 sweep, checked against the node-redis 6.3.1 sources
and a tsc --strict compile of the method names. 38 command files change, only their node_redis
lists, plus the status file.

Parameter names and types that differ from the source: CF.LOADCHUNK chunk (was data), FT.ALTER
schema, FT.CURSOR READ cursor, FT.DICTADD and FT.DICTDEL term, FT.SYNUPDATE groupId, MIGRATE
destinationDb with host and key typed as the source has them, PEXPIRE ms, PEXPIREAT msTimestamp
(number or Date), TDIGEST.TRIMMED_MEAN lowCutPercentile and highCutPercentile, TOUCH key, and
TDIGEST.MERGE (destination, source, options), which had a numKeys parameter the client does not
take. JSON.MGET gains reviver, CMS.INITBYDIM and CMS.INITBYPROB gain options.

Unreadable signatures: 13 entries gave their parameters as ...args: Parameters<typeof helper>.
XADD, TS.INCRBY, TS.DECRBY, TS.RANGE, TS.REVRANGE, GEORADIUS, GEORADIUS_RO,
GEORADIUSBYMEMBER_RO, XRANGE, XREVRANGE, BZMPOP, and the WithScores second entries of ZRANGE and
ZRANGEBYSCORE now list the parameters the helper declares.

Not callable: FAILOVER, SAVE, SHUTDOWN and READWRITE have a source file but no method on the
client (tsc: property does not exist), so their lists are empty and the status file marks
node_redis generic_only. FT.PROFILE was a single PROFILE method that does not exist, and is now
client.ft.profileSearch and client.ft.profileAggregate returning ProfileReplyResp2. FT._LIST is
client.ft._list. The DECR, DECRBY, INCR and INCRBY files each held the neighbouring command's
entry as well and now keep their own.

Learned: a node-redis command file that is not imported in commands/index.ts has no client method, and a parameter list written as Parameters<typeof helper> hides the real names, read the helper
Constraint: the 44 entries returning Any are left, node-redis 6.3.1 itself types those replies as any, so there is no declared type to copy
Directive: take parameter names from the declaration the client exposes, not from a name that reads better, and say so when a shared helper forces a generic one
Gaps: EVALSHA and FCALL entries use sha1 and functionName but the shared helper names the parameter script
Gaps: HSET, AUTH and CONFIG SET take destructured or tuple parameters and were checked by reading the source, not by compile
Gaps: params and returns of other entries were not rechecked beyond the generator's comparison
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>
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

DOC-7267

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🧠 Redis Memory

Found 5 related items from repository history (5 new this commit):

Memory updated at 7c5d484

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