Skip to content

DOC-7010 Add the xadd2 idempotent-XADD step for Ruby and ioredis - #3894

Merged
andy-stark-redis merged 1 commit into
mainfrom
DOC-7010-cmds-stream-xadd2
Aug 28, 2026
Merged

DOC-7010 Add the xadd2 idempotent-XADD step for Ruby and ioredis#3894
andy-stark-redis merged 1 commit into
mainfrom
DOC-7010-cmds-stream-xadd2

Conversation

@andy-stark-redis

@andy-stark-redis andy-stark-redis commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Note: this reduces the number of recently-introduced warnings about missing TCEs. There are still a few more that will be addressed separately - I haven't forgotten about them!

DOC-7010

What

Adds the xadd2 step (IDMP/IDMPAUTO dedup, XCFGSET) to the Ruby and ioredis cmds_stream examples — the last real coverage gap DOC-6968 left open after #3812. commands/xadd.md now renders full client tabs on xadd2 (Ruby and ioredis were previously omitted).

Implementation note

Neither client's pinned version has typed support for this Redis 8.6+ feature yet: redis-rb 6.0.0's xadd has no idmp/idmpauto keyword, and ioredis 5.11.1's bundled command table doesn't know xcfgset at all. Both steps use the raw .call(...) escape hatch for the whole XADD/XCFGSET invocation, matching the same pattern already used elsewhere for commands newer than a client's typed API.

Verification

  • Ran both example files directly against Redis 8.8.0 (Docker) — confirmed dedup (res5 == res6, res7 == res8) and XCFGSET returns OK.
  • Full build/example-test-harness/run.sh cmds_stream sweep: all runnable clients PASS (Ruby, ioredis included).
  • Rebuilt the site (hugo) and confirmed via the rendered commands/xadd/index.html: the xadd2 tab group now lists all 12 client tabs (previously omitted Ruby/ioredis), the Hugo build warning for this pane is gone, and the client-specific code panes contain the actual r.call(...) / redis.call(...) source (not a legacy whole-file dump).
  • The Redis 7.2.7 used ambiently for other local dev work was restored after testing — it's untouched by this change.

🤖 Generated with Claude Code


Note

Low Risk
Documentation-only example and test-harness changes with no production runtime impact.

Overview
Adds the xadd2 documentation step to the Ruby and ioredis cmds_stream examples so commands/xadd can show the same idempotent-stream coverage as the other clients.

Each new step demonstrates XADD with IDMP and IDMPAUTO (duplicate publishes return the original entry ID) and XCFGSET for IDMP-DURATION / IDMP-MAXSIZE, using r.call / redis.call because pinned client libraries lack typed support for Redis 8.6+ flags. Hidden assertions check dedup (res5 == res6, res7 == res8) and cleanup, matching the existing example harness pattern after xadd1.

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

Adds the `xadd2` step (IDMP/IDMPAUTO dedup, XCFGSET) to the Ruby and ioredis
cmds_stream examples, closing the last real Cause-B gap DOC-6968 left behind.
commands/xadd.md regains full client tabs on xadd2.

Neither client's harness-pinned version has typed support for this yet:
redis-rb 6.0.0's `xadd` has no `idmp`/`idmpauto` keyword, and ioredis 5.11.1's
bundled command table doesn't even list `xcfgset` (it's a brand-new Redis 8.6
command). Both steps use the raw `.call(...)` escape hatch for the whole
XADD/XCFGSET call instead of a typed wrapper. Verified against Redis 8.8.0 in
a throwaway Docker container, since the ambient local Redis was 7.2.7 —
IDMP/XCFGSET don't exist there and would fail silently different (unknown
command) rather than behave differently.

Learned: redis-rb 6.0.0 and ioredis 5.11.1 have no typed IDMP/IDMPAUTO/XCFGSET support — both are call()'d raw instead of via a typed method
Constraint: don't rewrite these two steps to use r.xadd(..., idmp: ...) or redis.xcfgset(...) — those methods/kwargs don't exist in the pinned client versions and would raise
Gaps: if redis-rb or ioredis ship typed IDMP/XCFGSET support later, this can be revisited to use idiomatic calls instead of raw .call()
Ticket: DOC-7010
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

DOC-7010

@github-actions

Copy link
Copy Markdown
Contributor

🧠 Redis Memory

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

Memory updated at 02b3ada

@andy-stark-redis andy-stark-redis self-assigned this Aug 28, 2026
@andy-stark-redis andy-stark-redis added the clients Client library docs label Aug 28, 2026

@dwdougherty dwdougherty left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@andy-stark-redis

Copy link
Copy Markdown
Contributor Author

Thanks @dwdougherty !

@andy-stark-redis
andy-stark-redis merged commit 4da91a3 into main Aug 28, 2026
93 checks passed
@andy-stark-redis
andy-stark-redis deleted the DOC-7010-cmds-stream-xadd2 branch August 28, 2026 13:45
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