Skip to content

Prefer modern Redis patterns in core and security guidance - #62

Open
alberttwong wants to merge 10 commits into
redis:mainfrom
alberttwong:codex/prefer-modern-redis-patterns
Open

alberttwong wants to merge 10 commits into
redis:mainfrom
alberttwong:codex/prefer-modern-redis-patterns

Conversation

@alberttwong

@alberttwong alberttwong commented Nov 22, 2026 •

Copy link
Copy Markdown

Existing guidance discourages large blocking reads and mentions ACLs, but it does not consistently guide agents toward modern defaults: the primary security example still leads with requirepass, and Functions and explicit compatibility decisions are not covered together.

This change adds capability-aware modern defaults to redis-core, moves redis-security examples to named ACL users with TLS, and regenerates the matching plugin copies. It covers SCAN semantics, Functions deployment, durable Streams queues, atomic command options, and structured document updates. Valid bounded reads, Lists, Pub/Sub, opaque Strings, and explicitly required older-server compatibility remain supported. A project’s modern-only contract must not be silently weakened, and an unknown write outcome must not be replayed.

Closes #61.

Validation

  • npm run validate: passed, 0 errors; 3 advisory warnings in unchanged skills.
  • Host skill validation: both changed skills passed.
  • npm run eval -- --skill redis-core --suite modern-patterns --concurrency 2 --force: four cases, one model (claude-sonnet-5), one repetition per configuration; with skill 100%, without skill 95% (+5 percentage points). Average delta +25 tokens and +0.8 seconds; total cost $3.5997. The framework verdict is neutral. This is focused initial evidence, not a cross-model or statistical claim.
  • npm run eval -- --skill redis-security --suite security --only-model claude-sonnet-5 --only-eval acl-users-over-requirepass --smoke --concurrency 1 --iteration modern-guidance-review: focused ACL case 100% with skill versus 83% without; +103 average tokens, +7 seconds; total cost $0.9056. This does not represent the full security suite.
  • Promoted the new core suite with npm run eval:baseline -- --skill redis-core --suite modern-patterns --iteration iteration-1 --include-html. This is its initial baseline, so there is no historical Against Baseline comparison. The committed report includes summary, model table, per-case results, and a screenshot.
  • Published branch tree verified identical to the locally validated commit.

Evaluation summary and model table


Note

Low Risk
Documentation and eval artifacts only; security wording changes agent recommendations but does not alter runtime services.

Overview
Adds a Prefer modern patterns in new code section to redis-core (host and plugin copies), links a new references/modern-patterns.md reference, and tightens data-structure guidance so Lists are scoped to simple queues and Streams cover work queues with acknowledgments/replay.

redis-security examples now lead with named ACL users, aclfile, and TLS; requirepass is framed as an explicit legacy compatibility path. Matching updates land in auth.md.

Introduces the modern-patterns eval suite (evals.json, model matrix) plus an initial baseline snapshot (JSON, Markdown, HTML) from iteration-1 so future skill changes can be compared against this accepted behavior.

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

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit d3813a9. Configure here.

```text
user default off
user app_cache on >replace-with-a-strong-password ~cache:* +get +set +del
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ACL file omits operator user

Medium Severity

The new aclfile snippet turns default off and only defines app_cache with get/set/del on cache:*. Redis loads aclfile as the full user set, so an operator created elsewhere is discarded on startup. The instance then has no admin identity for ACL, CONFIG, replication, or recovery.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit d3813a9. Configure here.

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.

Prefer modern Redis patterns and make legacy compatibility explicit

1 participant