mperham/connection_pool
61.0
Adequate · 6 November 2026
463
lines of production code
Ruby
primary language
4
measurements over time
What this system is
Behavioural changes
Connection pool API overhaul with discard and wrapper support
The connection pool library has been significantly refactored, changing the initialization signature to use keyword arguments (timeout, size, auto\_reload\_after\_fork) and introducing a new Wrapper class accessible via ConnectionPool.wrap. A key behavioral change is the addition of discard\_current\_connection, allowing threads to mark invalid connections for disposal rather than returning them to the pool. The API also now supports per-invocation timeout overrides via the with method and automatically reloads connections after a fork by default.
lib · high confidence
Connection pool major version bump to 3.0.2 with fork safety and lazy stack
The connection pool library has been updated to version 3.0.2, introducing significant behavioral changes to resource management and process safety. A new \lib/connection\_pool/fork.rb\ module ensures that checked-out connections are properly checked in and closed after a process fork, preventing stale resource usage in multi-process environments. The internal \TimedStack\ implementation has been refactored to support lazy connection creation and includes a new \shutdown\ method for graceful teardown, while the legacy \TimedQueue\ class has been removed in favor of the new stack-based approach. Additionally, a \Wrapper\ class is now available to provide a simplified interface for common pool operations like \with\, \pool\_size\, and \pool\_available\.
_lib/connection\pool · high confidence
Test coverage
Added comprehensive test suite and benchmarking infrastructure
Added a new test suite covering the ConnectionPool and TimedStack components, including tests for multithreaded usage, timeout handling, stack operations (push, pop, shutdown, reload), and subclassing overrides. Also added a benchmark script to measure ConnectionPool\#with performance and a test helper to manage instance reset and warning suppression.
test · high confidence
Dependencies
Update Ruby version requirement and add development dependencies
The gem now requires Ruby 3.2.0 or higher, dropping support for older versions. Development dependencies have been added to the gemspec, including bundler, maxitest, minitest-mock, and rake, while the Gemfile has been updated to include standard, benchmark-ips, maxitest, and simplecov for local development and testing.
(dependencies) · 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 61 → 61 (-0.0)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 61 → 61 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 52 → 52 (+0.0)
- Readiness 77 → 77 (+0.0)
- Security 97 → 95 (-2.1)
- Performance 80 → 80 (+0.0)
Resolved (2)
- Inconsistent shutdown semantics: ConnectionPool.shutdown takes a block, while TimedStack.shutdown takes a reload boolean and a block. This suggests different lifecycle management strategies for the pool vs its underlying stack.
- Semantic overlap with divergent signatures: checkout and pop both retrieve an item from the pool/stack. However, checkout returns the item directly (implied by context), while pop takes an exception argument to raise on timeout, suggesting different error-handling contracts.
Changes since last survey
- 1 commits — 1 feature/other, 0 fixes
By area
- lib/connection_pool.rb — 1 commit
Notable commits
- change: Reuse constant interrupt masks in #with (#225)
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
mperham/connection_pool 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 17c1eefdacebead60c5ac706b4c1088094e3b86b — 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.