Skip to content

DOC-7267 Write the last Ruby entries from the method bodies and a live check - #4516

Merged
andy-stark-redis merged 1 commit into
mainfrom
DOC-7267-ruby-undocumented
Nov 10, 2026
Merged

andy-stark-redis merged 1 commit into
mainfrom
DOC-7267-ruby-undocumented

Conversation

@andy-stark-redis

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

Copy link
Copy Markdown
Contributor

Summary

The 18 Ruby commands #4513 left. Each has 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 generic_only.

  • Entries (15):
    • DEBUG, EVAL and EVALSHA take *args, as their methods do. The EVAL entries list the accepted forms: the 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. 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). XGROUP CREATECONSUMER is xgroup(: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 raise ArgumentError without a subcommand, so the commands are only sent through the container entries.

Review notes

  • Live check: I ran redis 6.0.0 against a temporary redis-server on 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 returns nil, and that MONITOR yields Strings.
  • Not verified:
    • SYNC returned nothing within three seconds, so its return type is Object and isn't confirmed.
    • DEBUG needs enable-debug-command, and I only ran OBJECT and SLEEP, so its return type is Object with a note.
  • My text: the descriptions are mine, and so is MONITOR's &block param, because redis-rb has no @param or @yield tags for them.
  • Merge check: merged on top of DOC-7267 Fill the missing Ruby entries from the redis-rb 6.0.0 source #4513 in a throwaway worktree, there were no conflicts, every Ruby command has an entry or a status, and the merged data file equals a regeneration. Only the redis_rb key changes in the 15 files, which the script asserted. Built with content/develop/clients ignored (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.
  • This branch is based on main and 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_rb blocks in per-command JSON (and the merged command-api-mapping.json): signatures, params, and return types derived from redis-rb 6.0.0 method bodies and live checks. Examples include variadic eval(*args) / evalsha(*args), pubsub(:channels, *args) and the other PUBSUB subcommands, block-based monitor, shutdown returning nil, slaveof(host, port), slowlog(:help), xgroup(:createconsumer, ...), plus debug, and sync.

Three container commands—CLIENT, CLUSTER, and CONFIG—are recorded only in command-api-mapping-status.json as generic_only for redis_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.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

DOC-7267

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Redis Memory

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

Memory updated at 4e86181

@andy-stark-redis
andy-stark-redis requested a review from a team November 9, 2026 11:46
@andy-stark-redis andy-stark-redis self-assigned this Nov 9, 2026
@andy-stark-redis andy-stark-redis added the clients Client library docs label Nov 9, 2026
@andy-stark-redis

Copy link
Copy Markdown
Contributor Author

Awesome - thanks @dwdougherty for your patience in reviewing these very dull PRs :-)

@andy-stark-redis
andy-stark-redis force-pushed the DOC-7267-ruby-undocumented branch from 4ac0db5 to 32099ac Compare November 9, 2026 15:26
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
andy-stark-redis force-pushed the DOC-7267-ruby-undocumented branch from 32099ac to cf8c9e1 Compare November 10, 2026 09:37
…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
andy-stark-redis force-pushed the DOC-7267-ruby-undocumented branch from cf8c9e1 to 4e86181 Compare November 10, 2026 09:57
@andy-stark-redis
andy-stark-redis merged commit 298dc9f into main Nov 10, 2026
110 checks passed
@andy-stark-redis
andy-stark-redis deleted the DOC-7267-ruby-undocumented branch November 10, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clients Client library docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants