profunktor/redis4cats
59.9
Adequate · 6 November 2026
9.6k
lines of production code
Scala
primary language
4
measurements over time
What this system is
Features
Add ACL user management and decoding support
The library now exposes Redis ACL capabilities, including the \AclCommands\ trait integrated into the main \RedisCommands\ interface. This change introduces new data types in \effects.scala\ such as \AclUser\ and \AclSelector\ to represent ACL state, and adds \AclDecoder.scala\ to safely parse raw Lettuce replies into these typed structures. Users can now interact with ACL user configurations and logs through the standard command interface.
modules/effects/src/main/scala/dev/profunktor/redis4cats · high confidence
Add Log4cats logging integration
Users can now integrate redis4cats with the Log4cats logging library. A new \log4cats.scala\ module provides an implicit \Log\[F\]\ instance that delegates debug, info, and error logging to the Log4cats \Logger\ available in the scope, enabling structured logging for Redis operations when Log4cats is used.
modules/log4cats · high confidence
Added script to detect uncommitted changes
A new shell script, \scripts/check\_dirty.sh\, has been added to the repository. This utility checks for uncommitted changes in the Git working directory and exits with an error if any modifications are detected, which can be useful for CI/CD pipelines or pre-commit hooks to ensure a clean state.
scripts · high confidence
Comprehensive Redis command algebra for Redis 7 features
The algebra module now defines traits for a wide range of Redis commands, significantly expanding the library's coverage. New capabilities include JSON manipulation (JsonCommands), Access Control Lists (AclCommands), and Bitmaps (BitCommands). The Hash, List, Set, and Sorted Set APIs have been redesigned to support variadic operations, new multi-pop commands, and Redis 7-specific features like HSETEX, LMPOP, and ZRANGESTORE. Additionally, the module introduces support for HyperLogLog, Pub/Sub statistics, and Scripting/Functions, providing a unified interface for these previously missing or partial command sets.
modules/effects/src/main/scala/dev/profunktor/redis4cats/algebra · high confidence
Convenience extensions for Lua scripting
Added a new \luaScripting\ extension module that simplifies working with Redis Lua scripts. Users can now load scripts from classpath resources via \LuaScript.loadFromResources\ and evaluate them using \evalLua\, which automatically handles script caching by attempting to execute via SHA and falling back to direct evaluation if the script is not yet cached on the server.
modules/effects/src/main/scala/dev/profunktor/redis4cats/extensions · high confidence
New codec derivation utilities and type-splitting primitives
The \redis4cats.codecs\ module now includes \Codecs.scala\, which provides \derive\ methods to transform existing Redis codecs by applying split epimorphisms to keys and values. Supporting this are new \SplitEpi\ and \SplitMono\ case classes in the \splits\ sub-package, enabling reversible type conversions, along with pre-defined string-to-primitive conversions (Int, Long, Double) in the package object.
modules/core/src/main/scala/dev/profunktor/redis4cats/codecs · high confidence
New demo applications for Redis4cats features
Added a comprehensive suite of example applications in the \modules/examples\ module, demonstrating how to use Redis4cats for various use cases. These include basic string operations, key management, hashes, lists, sets, sorted sets, and geo-commands. The examples also cover advanced features such as JSON codec derivation, pub/sub messaging, streaming (XADD/XREAD), Lua scripting, pipelining, and transactions (including cluster-aware transactions). Additionally, demos are provided for connection strategies like master-replica setups, cluster connections from underlying clients, and connection pooling.
modules/examples/src/main/scala · high confidence
Removals
Removal of empty Fs2Redis object
The empty Fs2Redis object in the core module has been removed. This cleanup eliminates a placeholder class that contained no functionality, reducing code clutter without affecting any user-facing features.
core · high confidence
Behavioural changes
New internal transaction execution and logging infrastructure
The library introduces a new internal architecture for Redis transactions and logging. A dedicated single-threaded execution context (TxExecutor) now ensures that transaction commands run sequentially, preventing race conditions. A new capability trait (MkRedis) centralizes the creation of Redis clients and exposes internal components like the transaction runner and logger. Additionally, a pluggable logging typeclass (Log) is added, providing built-in no-op and standard output implementations to help users debug transaction and pipeline operations without forcing external logging dependencies.
modules/core/src/main/scala/dev/profunktor/redis4cats/effect · high confidence
Project renamed to redis4cats with updated documentation and CI automation
The library has been renamed from fs2-redis to redis4cats, reflected in the README, package structure, and Maven coordinates. To support this transition, a Scala Steward configuration was added to automate dependency updates, and a Mergify configuration was introduced to automatically label and merge Scala Steward pull requests upon successful CI builds. The project also adopted a new Code of Conduct and updated its contribution guidelines.
(repo-wide) · high confidence
Redesigned connection API with explicit configuration and master-replica support
The connection layer has been restructured to provide a more explicit and type-safe API for establishing Redis connections. Users can now configure connections using a dedicated \RedisUriConfig\ DSL that supports standalone, socket, and Sentinel endpoints, along with TLS, credentials (including Redis 6 ACL username/password), and timeout settings. The new \RedisClient\ and \RedisClusterClient\ objects replace previous creation patterns, offering methods like \from\, \fromUri\, and \withOptions\ that return \Resource\ instances for safe lifecycle management. Additionally, a new \RedisMasterReplica\ connection type is introduced to support master-replica topologies with configurable read preferences (e.g., \MasterPreferred\). Cluster clients now include built-in topology refresh strategies (periodic, adaptive, or both) and node filtering capabilities.
modules/core/src/main/scala/dev/profunktor/redis4cats/connection · high confidence
Redis4Cats core library restructured with new configuration, codec, and syntax APIs
The core library has been refactored to introduce a builder-style \Redis4CatsConfig\ that allows users to control shutdown timeouts, customize cluster node filters, and configure topology view refresh strategies (periodic, adaptive, or both). New capabilities include data compression (DEFLATE, GZIP) and encryption (AES/CBC) via updated \RedisCodec\ helpers, as well as compile-time validated \redis\ string interpolators for safer URI construction. The API also standardizes read-from strategies (e.g., \LowestLatency\), provides safe null-handling for Java boxed types, and adds support for Pub/Sub pattern subscriptions (PSUBSCRIBE/PUNSUBSCRIBE).
modules/core/src/main/scala/dev/profunktor/redis4cats · high confidence
Refactored PubSub API to separate connection types and add timeout restart logic
The PubSub module now provides distinct connection factories—mkPubSubConnection for combined publishing and subscribing, mkPublisherConnection for publishing/stats only, and mkSubscriberConnection for subscribing only—replacing the previous single connection model. The API also introduces a new RestartOnTimeout mechanism to automatically retry operations that time out, addressing issues where reading from a silent stream would fail with RedisCommandTimeoutException. Additionally, the PubSubStats trait now requires NonEmptyList for multi-channel queries like numSub to prevent invalid commands, and the SubscribeCommands trait exposes internal subscription tracking via internalChannelSubscriptions and internalPatternSubscriptions.
modules/streams/src/main/scala/dev/profunktor/redis4cats/pubsub · high confidence
Refactored Redis Streams API to use FS2-native types and improve read stability
The streaming module has been rewritten to use FS2-native data structures, replacing the previous implementation with a new \Streaming\ trait and \RedisStream\ class that operate directly on \Stream\[F, \*\]\. This change introduces a new \XAddMessage\ data type for appending entries and refines the \read\ operation to automatically resolve and pin \Latest\ offsets to the stream's actual last ID, preventing message skips when streams are empty between polls. The API now explicitly maps to Redis \XADD\ and \XREAD\ commands, providing a more robust and idiomatic FS2-based streaming experience.
modules/streams/src/main/scala/dev/profunktor/redis4cats/streams · high confidence
Refactored internal PubSub implementation with dedicated stats and listener components
The internal PubSub subsystem has been restructured into distinct components: \LivePubSubCommands\ and \Publisher\ now handle command execution and statistics via a new \LivePubSubStats\ class, while \PubSubInternals\ provides dedicated channel and pattern listeners that route messages through an fs2 \Topic\ and a parallel \Dispatcher\. Subscription lifecycle and state are managed by \PubSubState\ using \AtomicCell\ for thread-safe locking and \Redis4CatsSubscription\ to track subscriber counts and trigger cleanup, ensuring that listeners are correctly removed and resources are released when subscriptions are no longer needed.
modules/streams/src/main/scala/dev/profunktor/redis4cats/pubsub/internals · high confidence
Test coverage
Added property-based tests for codec split morphisms; Added test coverage for Redis connection configuration and encryption; Added test suite for Redis ACL decoder and integration tests for streams, pub/sub, and transactions; Added tests for FutureLift behavior and CancellationException handling.
Dependencies
Migration to Scala 3.9.0 and project rebranding to redis4cats
The build configuration has been updated to target Scala 3.9.0, replacing the previous cross-build support for Scala 2.11 and 2.12. The project has been rebranded from 'fs2-redis' to 'redis4cats', with the organization changed to 'dev.profunktor' and the GitHub repository updated to 'profunktor/redis4cats'. The module structure has been reorganized into distinct subprojects including 'redis4cats-core', 'redis4cats-effects', 'redis4cats-streams', and 'redis4cats-log4cats'. Additionally, the build now uses Munit for testing instead of ScalaTest/ScalaCheck, enables MiMa for binary compatibility checking against base version 3.0.0, and configures the compiler to use Scala 3 migration mode.
(dependencies) · high confidence
Upgrade to Scala 3, Cats Effect 3, and Lettuce 7 with modernized build tooling
This change upgrades the project to Scala 3, replacing the previous Scala 2.x support. It updates the core runtime dependencies to Cats Effect 3.7.1, FS2 3.14.0, and Lettuce 7.7.0, while switching the logging implementation from Logback/Scribe to Log4cats. The build infrastructure is modernized by upgrading sbt to 1.13.0, replacing ScalaTest with Munit for testing, and adding the sbt-mima-plugin for binary compatibility checks. Additionally, the build now uses Mdoc for documentation and removes older plugins like scoverage and coveralls.
project · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 53 → 60 (+6.9)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 74 → 74 (+0.0)
- Architecture 90 → 90 (+0.0)
- Maturity 34 → 51 (+16.9)
- Readiness 58 → 57 (-1.1)
- Security 81 → 74 (-7.5)
- Performance 85 → 85 (+0.0)
Resolved (2)
- Off-boarding risk: anonymized user #1
- Outdated: io.lettuce:lettuce-core
New (2)
- Dependency hygiene PARTLY measured — sbt declarations read, dependency currency not (Maven Central unreachable)
- Off-boarding risk: anonymized user #1
Changes since last survey
- 4 commits — 4 feature/other, 0 fixes
By area
- (repo) — 2 commits
- project/Dependencies.scala — 1 commit
- project/build.properties — 1 commit
Notable commits
- change: Merge pull request #1218 from profunktor/update/logback-classic-1.6.6
- change: Merge pull request #1219 from profunktor/update/sbt-1.13.1
- change: Update logback-classic to 1.6.6
- change: Update sbt, scripted-plugin to 1.13.1
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
profunktor/redis4cats was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit e38a81fbe2c180fed79364690b7aa64d8964d1b7 — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-60d1b390edf0.