Skip to content
CAI
Software that uses CAICheck a score

petergoldstein/dalli

69.9

Adequate · 5 November 2026

5.8k

lines of production code

Ruby

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add benchmarking, profiling, and development utility scripts

New executable scripts are added to the bin directory to support development and performance analysis. bin/benchmark and bin/profile allow developers to measure and profile Dalli performance using benchmark-ips and Vernier, respectively. bin/benchmark\_branch enables comparing performance between the current branch and a base branch, while bin/compare\_versions facilitates cross-version regression testing by installing specific gem versions. Additionally, bin/console provides an interactive IRB environment for experimenting with the library, and bin/setup automates initial project setup.

bin · high confidence

Add development container configuration for Ruby 4.0 and Memcached

Developers can now use a pre-configured VS Code dev container to work on Dalli. The setup provides a consistent environment running Ruby 4.0 on Debian 13 (trixie) and includes Memcached 1.6.45 with TLS support. The configuration integrates the Shopify Ruby LSP extension with RuboCop formatting and automates the installation of dependencies and Memcached via a post-creation script.

.devcontainer · high confidence

Add memcached-backed session store using Dalli

Introduces Rack::Session::Dalli, a new session store implementation that persists session data to memcached via the Dalli client. This allows applications to use memcached for session management, supporting both direct client connections and connection pooling for multithreaded environments through the connection\_pool gem.

lib/rack · high confidence

Automated changelog extraction and updated CI build scripts

This change introduces a new Ruby script, scripts/changelog\_section.rb, which extracts the release notes for a specific version from the CHANGELOG.md file to be used as GitHub release notes, ensuring the workflow fails if a section is missing or empty. Additionally, the CI environment is updated with scripts/install\_memcached.sh to install a specific Memcached version with TLS support, applying a patch (scripts/memcached\_1.5.22.patch) that fixes compilation issues in version 1.5.22 by correcting signal handling and variable declarations.

scripts · high confidence

Dalli 5.2.0 introduces structured metadata results and OpenTelemetry alignment

Dalli 5.2.0 adds a new \Dalli::CacheResult\ class that wraps the hash returned by \get\_with\_metadata\ and \get\_multi\_with\_metadata\, providing a typed interface with methods like \miss?\, \hit?\, and \stale?\ to help users distinguish between cache misses and stored nil values. The release also aligns OpenTelemetry instrumentation with stable semantic conventions, ensuring consistent span attributes for database operations. Additionally, it includes a new \GzipCompressor\ for alternative compression strategies, refactors key management into a dedicated \KeyManager\ class, and updates the supported Memcached version floor to 1.6.27.

lib/dalli · high confidence

Introduce Meta protocol support with new protocol architecture

Dalli now supports Memcached's Meta protocol (available in Memcached 1.6+) alongside the existing binary protocol. This change introduces a new \Dalli::Protocol::Meta\ class and a shared \Dalli::Protocol::Base\ infrastructure to manage connections, serialization, and response parsing. Users can now access advanced Memcached features such as thundering herd protection (vivify/recache), item metadata retrieval (hit status, last access, TTL remaining), and tombstone-based stale invalidation. The update also adds a \:raw\ client option to bypass serialization and compression for pre-serialized values, and improves connection resilience by retrying transient network errors during liveness checks and handling various IO and SSL exceptions more robustly.

lib/dalli/protocol · high confidence

Behavioural changes

1 commit (0 fixes) modifying .clusterfuzzlite

A change to existing behaviour in .clusterfuzzlite — 1 commit, 3 files: “Fuzz the reply parsers with Ruzzy and ClusterFuzzLite (\#1284)” (refs \#1284).

.clusterfuzzlite · medium confidence · unverified

2 commits (0 fixes) modifying fuzz

A change to existing behaviour in fuzz — 2 commits, 19 files: “Finish zlib streams that a signal interrupts (\#1300)”; “Fuzz the reply parsers with Ruzzy and ClusterFuzzLite (\#1284)” (refs \#1300, \#1284).

fuzz · medium confidence · unverified

Dalli 5.0.0 release: removal of binary protocol and SASL authentication

This release updates the Dalli library to version 5.0.0, which removes the legacy binary protocol and SASL authentication support. The change simplifies the codebase by relying on the standard memcached protocol, requiring users to ensure their memcached servers are configured without SASL or to upgrade to a version that supports the default protocol. The library now uses a meta protocol for communication and includes updated error handling classes such as \UnmarshalError\ and \ValueOverMaxSize\.

lib · high confidence

Dalli CAS client module deprecated

The \lib/dalli/cas/client.rb\ file has been replaced with a deprecation notice instructing users to remove the \require 'dalli/cas/client'\ statement, as the CAS functionality has been rolled into the standard \dalli/client\ module.

lib/dalli/cas · high confidence

Test coverage

Added integration tests for Dalli 5.0 changes; Added test helper for Memcached server management; Added test utilities for local Memcached and TLS certificate management; Added unit tests for the new Meta protocol implementation; Expanded test coverage for Dalli internals and integration points.

Dependencies

Dalli 5.0.0: Ruby 3.3+ requirement and dependency cleanup

This release raises the minimum supported Ruby version to 3.3 and drops the binary protocol and SASL authentication. The gem now depends on Rack 3 and requires the \logger\ gem, while removing the unmaintained OpenSSL extensions and base64 dependencies. Development tooling has been updated to use RuboCop 1.91+ and Minitest 6 for Ruby 3.2+.

(dependencies) · high confidence

Housekeeping

Add RuboCop and Standard configuration files

The project now includes \.rubocop.yml\ and \.standard.yml\ to enforce code style and formatting. RuboCop is configured to use plugins for Minitest, Performance, Rake, and Thread Safety, with a target Ruby version of 3.3. Standard is configured for Ruby 3.1 with parallel execution enabled. These files establish the linting and formatting standards for the codebase.

(repo-wide) · 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

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 68 → 70 (+2.0)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 67 → 68 (+0.3)
  • Architecture 98 → 98 (+0.2)
  • Maturity 59 → 63 (+4.1)
  • Readiness 79 → 81 (+2.2)
  • Security 83 → 80 (-2.6)
  • Performance 90 → 90 (+0.0)

Resolved (8)

  • Duplicate intent. Two methods on the Ring class perform the same lookup operation (finding a server for a key) with identical signatures. This is a clear duplication.
  • Duplicated block (10 lines × 2) (lib/dalli/pipelined_deleter.rb)
  • Further sole-owners (lower concentration)
  • Low IaC: WD-DOCKER-0003 (.devcontainer/Dockerfile)
  • Medium: security finding (details withheld)
  • Off-boarding risk: anonymized user #1
  • Redundant methods with unclear distinction. Both methods appear to retrieve a key with metadata. The difference between returning a raw result vs a structured result is not obvious from the signature alone, and having two parallel entry points for the same logical operation creates confusion.
  • Redundant methods with unclear distinction. Similar to the single-key case, having both a block-based and a result-returning version for multi-get with metadata is inconsistent with the rest of the API (where get_multi returns a hash and get returns a value/result). It forces the user to choose between two similar APIs for the same data retrieval.

New (9)

  • Base.pipeline_next_responses (cognitive 19) (lib/dalli/protocol/base.rb)
  • FileTooLong: dalli/client.rb (lib/dalli/client.rb)
  • Job token omits the contents scope its checkout needs
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Off-boarding risk: anonymized user #1
  • ResponseProcessor.va_response_from_buffer (cognitive 18) (lib/dalli/protocol/response_processor.rb)

Changes since last survey

  • 76 commits — 61 feature/other, 15 fixes

By area

  • (repo) — 25 commits
  • lib/dalli — 19 commits
  • (root) — 17 commits
  • .github/workflows — 3 commits
  • docs/security-hardening-plan.md — 3 commits
  • test/integration — 3 commits
  • test/helper.rb — 2 commits
  • .claude/skills — 1 commit
  • .github/dependabot.yml — 1 commit
  • fuzz/corpus — 1 commit
  • test/test_socket.rb — 1 commit

Notable commits

  • fix: Describe memcached's status without a fixed version
  • fix: Fix flaky delete_cas test
  • fix: Merge pull request #1238 from petergoldstein/fix/flaky-delete-cas-test
  • fix: Merge pull request #1251 from petergoldstein/fix/validate-ttl-cas-delta
  • fix: Merge pull request #1252 from petergoldstein/fix/multi-get-unmarshal-error
  • fix: Merge pull request #1253 from petergoldstein/fix/multi-get-caller-keys
  • fix: Merge pull request #1262 from petergoldstein/fix/no-retry-after-send
  • fix: Merge pull request #1266 from petergoldstein/fix/multi-key-terminal-failures
  • fix: Merge pull request #1267 from petergoldstein/fix/5.3.0-review-followups
  • fix: Merge pull request #1268 from petergoldstein/fix/idle-connection-check
  • fix: Merge pull request #1269 from petergoldstein/fix/value-encodings
  • fix: Merge pull request #1270 from petergoldstein/fix/rack-session-undecodable
  • fix: Merge pull request #1280 from petergoldstein/fix/check-value-terminator
  • fix: Merge remote-tracking branch 'origin/main' into fix/value-encodings
  • fix: Wait for TTL expiry instead of sleeping a fixed time
  • change: Add OpenSSF Scorecard workflow
  • change: Add a throughput comparison script and maintainer skills
  • change: Add enforce_read_timeout for JRuby and TruffleRuby (#1281)
  • change: Add the 5.2.6 section to the CHANGELOG
  • change: Bump github/codeql-action to 4.39.1 and group its Dependabot updates
  • …and 56 more

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

petergoldstein/dalli 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 5 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 cba8746ace7829a91957b6c5b92d703b50304242 — 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.2+preprod-5c4e66d9318b.