Skip to content

MOD-21358: Reject out-of-range numeric configuration at module load - #1708

Merged
gabsow merged 1 commit into
masterfrom
codex/mod-21358-json-sdk
Nov 22, 2026
Merged

gabsow merged 1 commit into
masterfrom
codex/mod-21358-json-sdk

Conversation

@gabsow

@gabsow gabsow commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

RedisJSON currently accepts out-of-range json-rdb-dictionary-max-memory-percent module arguments at startup. Adopt the merged SDK fix from RedisLabsModules/redismodule-rs#492 (019f2a0bb240cab7fd41f8735f242202225e0d9c) so invalid numeric values are rejected at load.

Updates only the two workspace SDK pins and their four lockfile entries. Liran's regression tests remain owned by #1705; they were copied unchanged from its head b5ba16adc6311b32d2ec553b846e066949b66532 for local validation and are not duplicated here.

Validation on Redis 8.10.0, macOS arm64:

  • Old SDK: 3/4 of Liran's tests pass; the range test fails because both -1 and 101 load successfully.
  • Merged SDK: all 4/4 pass, including budget changes across saves and dictionary reset/budget coverage.
  • Six startup cases additionally asserted: default remains 20; 0 and 100 load unchanged; -5, 150 and abc are rejected.
  • Locked build and diff checks pass.

Linux x86_64 verification also completed on Redis unstable b540ca49 with jemalloc 5.3.0 and an optimized build of this PR head (fb052f1): all four unchanged tests passed. An external Python trace observer verified both COW assertions executed (the test file itself was unchanged). Observed COW bytes: dictionary disabled 2,646,016; 100% budget 6,946,816; 1% budget 2,494,464. The 1% budget was 68,685 bytes, with the test's existing 1 MiB slack. Both memory bounds passed. This completes the previously missing Linux/jemalloc assertion coverage; hosted CI remains a separate merge requirement. The local test container was removed and cleanup verified.

Tracks MOD-21358.


Note

Low Risk
Dependency-only pin update with no application code changes; behavior tightens startup validation for one existing config knob.

Overview
Bumps the workspace redis-module and redis-module-macros git pins (and matching Cargo.lock entries) to 019f2a0 from redismodule-rs#492, adopting SDK-side validation for numeric module configuration.

With this revision, out-of-range startup values for json-rdb-dictionary-max-memory-percent (already declared with 0–100 in the module macro) are rejected at load instead of being accepted; valid values like the default and 0 / 100 still load as before.

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

@codecov

codecov Bot commented Nov 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.83%. Comparing base (9ca1c88) to head (fb052f1).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1708   +/-   ##
=======================================
  Coverage   87.83%   87.83%           
=======================================
  Files          18       18           
  Lines        6723     6723           
=======================================
  Hits         5905     5905           
  Misses        818      818           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gabsow
gabsow merged commit d40db47 into master Nov 22, 2026
67 checks passed
@gabsow
gabsow deleted the codex/mod-21358-json-sdk branch November 22, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants