Loading
refactor(rate_limit): atomic SADD_SCRIPT for count_distinct rules
Mirrors INCR_SCRIPT's shape and atomicity. Closes the pre-existing crash-window between SADD and the separate EXPIRE, returns the real post-EXPIRE TTL (no -1 sentinel), and self-heals orphan keys whose TTL is -1 — all matching the behavior INCR adopted in !291. Spec rewrite for SET-mode #check / #peek to real Redis (TestRedis), matching the style master adopted for the rest of the file. Addresses @reprazent's ttl-on-first-write nit on !292. Co-Authored-By:Claude Opus 4.7 (1M context) <noreply@anthropic.com>