Skip to content

Eight container commands refuse HELP, three of them by telling the client to run HELP #698

Description

@TinDang97

The gap

Redis gives every container command a HELP subcommand. Moon serves it on five
containers and refuses it on eight, each with a different error — including two
that report an arity problem, which reads to a client as "the subcommand
exists but you called it wrong".

Measured (moon @ c5395188, --shards 1, vs redis-server 8.6.1)

container moon <C> HELP redis
CLIENT -ERR unknown subcommand 'HELP' help array
COMMAND -ERR Unknown subcommand 'HELP'. Try COMMAND HELP. help array
CONFIG -ERR unknown subcommand 'HELP'. Try CONFIG HELP. help array
FUNCTION -ERR unknown subcommand 'HELP'. Try FUNCTION HELP. help array
PUBSUB -ERR unknown subcommand or wrong number of arguments for 'pubsub' command help array
SCRIPT -ERR unknown subcommand 'HELP' for 'script' command help array
XGROUP -ERR 'XGROUP' command 'UNKNOWN' not recognized help array
XINFO -ERR wrong number of arguments for 'xinfo' command help array

Already correct: ACL, MEMORY, MODULE, OBJECT, SLOWLOG.

Three of these are self-contradicting: CONFIG HELP, COMMAND HELP and
FUNCTION HELP refuse the request with a message that tells the client to run
the exact command it just refused.

Why it matters

HELP is how redis-cli and several driver test suites discover a container's
surface. It is also the fallback a user reaches for after a typo — which is
precisely the moment Moon's own error text points them at it.

Scope

Purely additive: a static help array per container, in the same shape the five
working containers already use. HELP is arity 2 and carries loading +
stale in COMMAND INFO, so the eight new names also belong in
SUBCOMMAND_META once they dispatch — the table's contract is that a published
name must dispatch, and tests/command_list_subcommands.rs::cl3 enforces it.

Note XINFO HELP and XGROUP HELP need care: both currently answer an ARITY
error for an unknown subcommand, so a probe that reads "arity error" as
"exists" will mis-measure them. Send a bogus subcommand WITH arguments as the
control.

Found

Sweeping all 14 containers × valid and bogus subcommands, top-level and inside
MULTI, against a live redis-server 8.6.1 while implementing moon#670.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingredis-parityMissing Redis commands / parity gaps

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions