Repository navigation
DOC-7267 Write the last Ruby entries from the method bodies and a live check - #4516
Merged
Merged
Conversation
Contributor
Contributor
dwdougherty
approved these changes
Nov 9, 2026
Contributor
Author
|
Awesome - thanks @dwdougherty for your patience in reviewing these very dull PRs :-) |
andy-stark-redis
force-pushed
the
DOC-7267-ruby-undocumented
branch
from
November 9, 2026 15:26
4ac0db5 to
32099ac
Compare
andy-stark-redis
added a commit
that referenced
this pull request
Nov 9, 2026
The Ruby entries were added to the API Methods tab dropdown in #4498, but 310 of the 527 commands had no redis_rb list. Each is now accounted for against the redis-rb v6.0.0 source. 89 command files get an entry and 203 commands are recorded as generic_only in the status file, so the tab says to use call. 23 commands name a method with complete YARD docs (BITCOUNT, BITOP, GETBIT, GEOSEARCH, INFO, PING, TIME and others) and take its signature, @PARAM types and descriptions, and @return. 66 container subcommands go through the container method that forwards the subcommand to the server, as XGROUP CREATE already does: client(:kill, *args), cluster, script and config with the same shape, slowlog(:get, length = nil), and xinfo for stream, groups and consumers with the return type that belongs to the subcommand. The 203 generic_only commands have no method in redis-rb 6.0.0, among them the array AR* commands, the V* vector commands, the module commands, the HOTKEYS family and the hash field-expiry commands, each searched for by name and by command symbol. The 18 methods without YARD parameter docs are covered by #4516 and the literal subcommand symbol is shown by #4514. Learned: redis-rb container commands are one method each that passes the subcommand through, so a subcommand entry shows the container call with the symbol in the signature Constraint: only emit an entry from YARD when every parameter has a @PARAM and the method has a @return, otherwise the type would be invented Directive: do not list a command redis-rb 6.0.0 lacks, send it with call, and check the source for the method before marking generic_only Recheck: when redis-rb ships a release after 6.0.0, search the new source for the generic_only commands Ticket: DOC-7267 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
andy-stark-redis
force-pushed
the
DOC-7267-ruby-undocumented
branch
from
November 10, 2026 09:37
32099ac to
cf8c9e1
Compare
…e check The 18 Ruby commands that #4513 left have a redis-rb 6.0.0 method with no YARD @PARAM tags, or a container with no docs. 15 get an entry written from the method body and from what the released gem returns against a throwaway Redis, and 3 are recorded as generic_only. Entries: DEBUG, EVAL and EVALSHA take *args as their methods do, and the EVAL entries list the accepted forms (script, keys and argv arrays, or a Hash with :keys and :argv). SLAVEOF takes host and port and returns "OK", also with NO and ONE. SHUTDOWN and MONITOR have no params to document, SHUTDOWN returns nil because the server closes the connection and MONITOR yields each line to a block and never returns. SYNC is the internal replication command. The six PUBSUB subcommands are pubsub(:channels, *args) and the like with the observed return types, SLOWLOG HELP is slowlog(:help), and XGROUP CREATECONSUMER is xgroup(:createconsumer, key, group, consumer) returning 1 when the consumer was created and 0 when it already existed. generic_only: bare CLIENT, CLUSTER and CONFIG, which raise ArgumentError without a subcommand, so the commands are only sent through the container entries. Checked against redis-rb 6.0.0 and a temporary redis-server: return classes for EVAL, EVALSHA, XGROUP CREATECONSUMER, SLOWLOG HELP, SLAVEOF and the PUBSUB subcommands, SHUTDOWN returning nil, and MONITOR yielding Strings. After this change and #4513 every Ruby command has an entry or a status. Learned: a redis-rb method with no YARD docs can still be documented from its body and a run against the released gem, check the return class before writing the type Constraint: the return types and descriptions come from observed replies, DEBUG is the exception because it depends on the subcommand and only OBJECT and SLEEP were run Gaps: SYNC returned nothing within three seconds on a local server, so its return type is Object and is not verified Gaps: the descriptions and the &block entry for MONITOR are written by hand, redis-rb has no @PARAM or @yield tags for them Gaps: DEBUG needs enable-debug-command, which was set on the test server only Ticket: DOC-7267 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
andy-stark-redis
force-pushed
the
DOC-7267-ruby-undocumented
branch
from
November 10, 2026 09:57
cf8c9e1 to
4e86181
Compare
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
The 18 Ruby commands #4513 left. Each has a redis-rb 6.0.0 method with no YARD
@paramtags, or a container with no docs. 15 get an entry written from the method body and from what the released gem returns against a throwaway Redis, and 3 aregeneric_only.*args, as their methods do. The EVAL entries list the accepted forms: the script, keys and argv arrays, or a Hash with:keysand:argv.hostandportand returns"OK", also withNOandONE.nilbecause the server closes the connection. MONITOR yields each line to a block and never returns.pubsub(:channels, *args)and the like, with the observed return types. SLOWLOG HELP isslowlog(:help). XGROUP CREATECONSUMER isxgroup(:createconsumer, key, group, consumer)and returns 1 when the consumer was created and 0 when it already existed.generic_only(3): bare CLIENT, CLUSTER and CONFIG, which raiseArgumentErrorwithout a subcommand, so the commands are only sent through the container entries.Review notes
redis-serveron port 6399, which I stopped afterwards, and not your dev Redis on 6379. It confirmed the return classes for EVAL, EVALSHA, XGROUP CREATECONSUMER, SLOWLOG HELP, SLAVEOF and the PUBSUB subcommands, that SHUTDOWN returnsnil, and that MONITOR yields Strings.Objectand isn't confirmed.enable-debug-command, and I only ran OBJECT and SLEEP, so its return type isObjectwith a note.&blockparam, because redis-rb has no@paramor@yieldtags for them.redis_rbkey changes in the 15 files, which the script asserted. Built withcontent/develop/clientsignored (the full site only builds in CI), and the pages render. The:channels-style subcommand literals show only once DOC-7267 Show a literal first argument in the API Methods tab signatures #4514 is merged.mainand doesn't depend on DOC-7267 Fill the missing Ruby entries from the redis-rb 6.0.0 source #4513, but the full "every Ruby command is accounted for" result needs both.🤖 Generated with Claude Code
Note
Low Risk
Documentation-only JSON updates to client command mappings; no runtime code paths change.
Overview
Completes the redis_rb side of the command-to-client API map by documenting the last Ruby commands that lacked entries after the earlier bulk update.
Fifteen commands get new
redis_rbblocks in per-command JSON (and the mergedcommand-api-mapping.json): signatures, params, and return types derived from redis-rb 6.0.0 method bodies and live checks. Examples include variadiceval(*args)/evalsha(*args),pubsub(:channels, *args)and the other PUBSUB subcommands, block-basedmonitor,shutdownreturningnil,slaveof(host, port),slowlog(:help),xgroup(:createconsumer, ...), plusdebug, andsync.Three container commands—CLIENT, CLUSTER, and CONFIG—are recorded only in
command-api-mapping-status.jsonasgeneric_onlyforredis_rb, because the bare methods raise without a subcommand.Reviewed by Cursor Bugbot for commit 4e86181. Bugbot is set up for automated code reviews on this repo. Configure here.