Skip to content

Commit b151f67

Browse files
DOC-7263 Fill missing client signatures in the command-API mapping
Classified all 1,495 empty signature lists across 14 client IDs against the released clients, then filled the 448 that were real gaps: redis_py 35, node_redis 63, go-redis 23, jedis 20, php 20, lettuce 47 per variant, nredisstack 46 per variant, redis_rs 26 sync and 28 async. 1,047 stay empty on purpose: 782 are reachable only through a generic call, 180 are unsupported or client-managed, 77 were skipped deliberately (bare container rows and 35 ioredis gaps the tab never renders), and 8 are other cases found while authoring. The skill and its client-quirks reference now record the classification rules and the non-obvious receivers. DOC-7266 adds the per-client reason for the generic-only and unsupported rows. Every filled signature was checked against the released artifact: inspect.signature for redis-py 8.1.0, javac against Lettuce 7.9.0 and Jedis 8.0.2, go vet against go-redis v9.23.0 and v9.22.0, dotnet build against StackExchange.Redis 3.3.1 and 3.4.31, cargo check against redis 1.8.1 and 1.6.0, PHP reflection on Predis v3.7.1 and v3.5.1. node-redis was checked by loading the installed 6.3.1 package and running each command's parseCommand; tsc was not available. The classification pass first used name matching and was wrong often enough to matter: it called SSUBSCRIBE unsupported in NRedisStack (it works through RedisChannel.Sharded), treated SlaveOf and ReplicaOf as callable (both are obsolete errors in StackExchange.Redis), and put CLIENT SETINFO on go-redis Cmdable (it is on StatefulCmdable). Reading the method, not the name, is what caught these. A missing client key and an empty list render the same "No method signature available" text, so deleting keys would change nothing. The tab also lists a fixed set of clients: ioredis, RedisVL and Ruby never render, so their 97 empties were not filled. Fragments were applied by script that only replaced lists that were already [], refused any file that did not round-trip through json.dumps(indent=2), and kept each file's trailing whitespace, so the diff is the 448 new lists and nothing else. Judgment calls kept: Jedis UNSUBSCRIBE, PUNSUBSCRIBE and SUNSUBSCRIBE are authored on the callback objects where they live, Lettuce clusterSlaves and ftTagvals are deprecated in 7.9.0 but included, NRedisStack SAVE uses an obsolete SaveType member (a warning), and Predis QUIT is authored although quit() only disconnects. Learned: name matching misclassifies; read the method and its receiver before calling a gap Constraint: only replace lists that are currently [], so existing entries are never overwritten Directive: do not delete empty client keys to tidy the tab, it renders identically and loses the record Gaps: generic-only and unsupported verdicts rest on finding no method, none were run against a server Gaps: node-redis signatures were not type-checked with tsc Ticket: DOC-7263 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent e5ee195 commit b151f67

157 files changed

Lines changed: 20444 additions & 1319 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.claude/skills/command-api-mapping/SKILL.md‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,35 @@ For each command in the set you're mapping:
7676
```
7777
Spot-check one command in the rendered table if you can run the site.
7878

79+
## Sweeping empty lists (DOC-7263)
80+
81+
An empty list (`"redis_py": []`) renders "No method signature available for this client."
82+
A missing key renders the same text, so removing a key changes nothing on the page. The tab
83+
only lists the clients in `$clientOrder` in `api-methods-tab.html`: ioredis, RedisVL and
84+
Ruby never render, so filling them has no visible effect.
85+
86+
Classify each empty (command, client) against the **released** client, not the file:
87+
88+
- `real_gap`: a typed method exists but the mapping has no signature. Fill it.
89+
- `generic_only`: reachable only through `execute_command`, `call`, `Do`, `sendCommand`,
90+
`executeRaw`, `redis::cmd` or container magic dispatch with no typed `@method`. Leave empty.
91+
- `unsupported`: no way to call it, the method throws or panics (`Quit`/`Sync` in go-redis,
92+
`memory_doctor` in redis-py), it is `[Obsolete(error: true)]` (SE.Redis `SlaveOf`), or it
93+
is client-side and sends no command (`SELECT` as `GetDatabase`, `CLUSTER KEYSLOT`).
94+
- Bare container rows (`ACL`, `CLIENT`, `CLUSTER`, `CONFIG`, `LATENCY`, `MEMORY`, `MODULE`,
95+
`SLOWLOG`, `FUNCTION`, `SCRIPT`, `PUBSUB`) stay empty: the subcommand rows carry the
96+
signatures. `HOTKEYS` is not one: check whether its subcommand files already exist.
97+
98+
A name match is a hypothesis. Read the method, and check a sample of hits before trusting a
99+
count. Typed methods on a non-obvious receiver (`StatefulCmdable`, `IServer`, a `PubSub`
100+
object, a callback object) still count as `real_gap`: cite the receiver in your report.
101+
102+
To fill many at once, write one fragment per client (`{command: [signatures]}`) outside the
103+
repo, verify every signature by compiling or reflecting against the released artifact, then
104+
apply with a script that replaces only lists that are currently `[]`, refuses any file that
105+
does not round-trip through `json.dumps(indent=2, ensure_ascii=False)`, and keeps each
106+
file's trailing whitespace. Assert the before and after empty counts.
107+
79108
## Guardrails
80109

81110
- **Match the live client IDs exactly**, including `go-redis` (hyphen) and `node_redis`,

‎.claude/skills/command-api-mapping/reference/client-quirks.md‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,32 @@ Translation rules:
151151
- Return type is generally `RedisResult<T>` (sync) / a future of it (async).
152152
- `///` doc comments → descriptions when present.
153153

154+
## Receivers that aren't the obvious client (DOC-7263)
155+
- **redis_py:** `cluster_*` methods exist only on `RedisCluster`; subscribe methods are on the
156+
`PubSub` object (`r.pubsub()`); FT.HYBRID is `r.ft(...).hybrid_search`. Some methods are
157+
stubs that raise `NotImplementedError`. Read the body, not the name.
158+
- **node_redis:** `select`, `quit`, `reset`, `monitor` and the subscribe family are methods on
159+
`RedisClient`, not command files, and are `undefined` on a cluster client. `LOLWUT` is
160+
registered uppercase only. Commands in `@redis/search` and similar need that package.
161+
- **go-redis:** `CLIENT SETINFO` and `HELLO` are on `StatefulCmdable`/`*Conn`, not `Cmdable`.
162+
`HotKeys*` is on `*Client` only. `Monitor` is on the `cmdable` struct but not the
163+
`Cmdable` interface. Subscribe methods return `*PubSub`; unsubscribe is on `*PubSub`.
164+
- **jedis:** `cluster*` methods are on `Jedis` only (not `UnifiedJedis` or `RedisClient`).
165+
`unsubscribe`/`punsubscribe`/`sunsubscribe` are on the callback objects
166+
(`JedisPubSubBase`, `JedisShardedPubSubBase`), `ssubscribe`/`spublish` on the cluster clients.
167+
- **lettuce:** subscribe methods are on the pub/sub connection interfaces. `RediSearchCommands`
168+
takes only `K` (no `V`).
169+
- **nredisstack:** server commands are on `IServer` (`FooAsync` twins), subscribe on
170+
`ISubscriber`, sharded pub/sub through `RedisChannel.Sharded(...)`. `Save(SaveType)` covers
171+
SAVE, BGSAVE and BGREWRITEAOF.
172+
- **php (predis):** a container subcommand reached only through `__call` (no `@method` in
173+
`src/Command/Container/*.php`) is `generic_only`, not a typed method. Consumer methods
174+
(`pubSubLoop()`) are the typed home for PSUBSCRIBE/PUNSUBSCRIBE.
175+
- **redis_rs:** methods come from `implement_commands!` and are generated for four traits.
176+
`HotkeysCommands`/`AsyncHotkeysCommands` are separate traits. Some methods need a feature
177+
(`acl`, `script` default on; `search_unfinished` is not stable). Async cluster connections
178+
carry SSUBSCRIBE/SUNSUBSCRIBE.
179+
154180
## General
155181
- **Never invent descriptions.** Empty string beats a plausible-but-unverified sentence.
156182
- **Confirm the command exists** in the client before adding it; preview commands may be

0 commit comments

Comments
 (0)