Skip to content

Add Redis support - #140

Open
mfauzaan wants to merge 1 commit into
mainfrom
codex/redis-support
Open

Add Redis support#140
mfauzaan wants to merge 1 commit into
mainfrom
codex/redis-support

Conversation

@mfauzaan

Copy link
Copy Markdown
Member

Summary

  • add redis:// and rediss:// connections with optional password/ACL authentication, logical database selection, Keychain-backed credentials, and Redis/Valkey Docker discovery
  • add a binary-safe Redis driver using valkey-swift 1.5.0, a bounded cursor-based key browser, type-aware value inspection/editing, TTL/rename/delete operations, and a dedicated command workspace
  • add command confirmation, pooled-connection safety rules, credential-aware history redaction, capability gates for non-relational UI, Redis assets, documentation, and focused unit/live tests

Library choice

This pins valkey-swift 1.5.0. It is the maintained Swift 6, structured-concurrency Redis/Valkey client that fits Pluk's existing SwiftNIO and actor boundaries. The release also includes command-cancellation and connection-close fixes relevant to a long-lived desktop client.

The client uses RESP3, so Pluk requires Redis 6.0+ or a compatible Valkey server. Upstream guarantees Redis compatibility through 7.2.4; newer releases may work but are documented as requiring validation.

Safety and performance

  • key discovery uses bounded SCAN pages only; no production path sends KEYS
  • keys, values, and unsigned 64-bit cursors remain binary/representation safe
  • destructive writes require explicit confirmation, while commands that can monopolize or poison pooled connections are denied
  • authentication/configuration secrets are excluded or redacted before history persistence, and sanitized commands cannot be replayed
  • rediss:// performs normal certificate and hostname verification

Verification

  • full hosted PlukTests suite passed
  • macOS Release build passed, and the exact built binary was launched to verify the Redis connection UI
  • Redis 7.2.6 live matrix passed for plain, password-only, and ACL authentication, reconnect behavior, DB 0/1 isolation, core data structures, TTLs, and command execution
  • 101,000-key mixed dataset completed a deliberately small-COUNT traversal in 10.785s (11.075s repeat), with 42,360 SCAN calls and exactly zero KEYS calls
  • self-signed TLS was correctly rejected by Pluk's normal trust validation

Known MVP limitations are documented: no Cluster, Sentinel, or Redis-over-SSH support; RedisJSON is optional; streams are read-only and bounded to their first page.

Closes #139

@mfauzaan
mfauzaan requested a review from a team August 17, 2026 15:16
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.

[FEATURE] Add Redis support

1 participant