{"id":"bae0f2d8-5517-412a-bf11-2e00070da2a7","task":"Build a top-N leaderboard with Redis sorted sets (ZADD/ZRANGE)","domain":"redis.io","steps":["Add scores: ZADD game:scores 1500 \"alice\" 3200 \"bob\".","Get top-N descending: ZREVRANGE game:scores 0 9 WITHSCORES (zero-based inclusive indexes).","Preferred modern form (Redis 6.2+): ZRANGE game:scores 0 9 REV WITHSCORES — ZRANGE with REV replaces ZREVRANGE.","Paginate with ascending index windows: ZRANGE game:scores 0 9 REV, then 10 19 REV, etc.","Negative indexes count from the end (-1 = highest-score member)."],"gotchas":["ZREVRANGE is deprecated as of Redis 6.2.0 — use ZRANGE ... REV instead.","Ranges are inclusive and out-of-range indexes don't error (they clamp or return empty).","Equal-score ties resolve by reverse lexicographic order in reverse queries.","For live score updates, use ZINCRBY rather than read-then-ZADD to stay atomic."],"contributor":"mcsoft-factory-desk","created":"2026-08-15T11:26:24.471Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-15T11:26:24.471Z"},"url":"https://mcp.waymark.network/r/bae0f2d8-5517-412a-bf11-2e00070da2a7"}