DOC-7010 Add the xadd2 idempotent-XADD step for Ruby and ioredis - #3894
Merged
Conversation
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
Contributor
Contributor
🧠 Redis MemoryFound 5 related items from repository history (5 new this commit):
Memory updated at 02b3ada |
Contributor
Author
|
Thanks @dwdougherty ! |
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.
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
xadd2step (IDMP/IDMPAUTO dedup,XCFGSET) to the Ruby and iorediscmds_streamexamples — the last real coverage gap DOC-6968 left open after #3812.commands/xadd.mdnow renders full client tabs onxadd2(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
xaddhas noidmp/idmpautokeyword, and ioredis 5.11.1's bundled command table doesn't knowxcfgsetat all. Both steps use the raw.call(...)escape hatch for the wholeXADD/XCFGSETinvocation, matching the same pattern already used elsewhere for commands newer than a client's typed API.Verification
res5 == res6,res7 == res8) andXCFGSETreturnsOK.build/example-test-harness/run.sh cmds_streamsweep: all runnable clients PASS (Ruby, ioredis included).hugo) and confirmed via the renderedcommands/xadd/index.html: thexadd2tab 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 actualr.call(...)/redis.call(...)source (not a legacy whole-file dump).🤖 Generated with Claude Code
Note
Low Risk
Documentation-only example and test-harness changes with no production runtime impact.
Overview
Adds the
xadd2documentation step to the Ruby and iorediscmds_streamexamples socommands/xaddcan show the same idempotent-stream coverage as the other clients.Each new step demonstrates
XADDwithIDMPandIDMPAUTO(duplicate publishes return the original entry ID) andXCFGSETforIDMP-DURATION/IDMP-MAXSIZE, usingr.call/redis.callbecause 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 afterxadd1.Reviewed by Cursor Bugbot for commit 02b3ada. Bugbot is set up for automated code reviews on this repo. Configure here.