Skip to content
CAI
Software that uses CAICheck a score

brandonhilkert/sucker_punch

59.4

Adequate · 5 November 2026

494

lines of production code

Ruby

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Sucker Punch is a lightweight background job processing library for Ruby applications, designed to execute asynchronous tasks without requiring external infrastructure. It provides a core API for defining job classes, configuring thread pools, and managing queue lifecycles, while integrating with Rails for logging and generation. The system supports synchronous execution for deterministic testing and tracks job metrics such as processed and failed counts.

Features

Add job generator for SuckerPunch

Users can now generate SuckerPunch job classes using the Rails generator. Running the generator creates a new job file in app/jobs with the standard SuckerPunch::Job module included and a perform method that raises NotImplementedError, providing a starting point for background job implementation.

lib/generators · high confidence

Behavioural changes

Core library initialization and configuration API

The SuckerPunch library has been initialized with a new core structure, introducing a global configuration API for exception handling, logging, and shutdown behavior. Users can now customize the exception handler to receive job class and arguments, set a custom logger (defaulting to STDOUT), and configure the shutdown timeout. The library also integrates with concurrent-ruby for thread management and automatically shuts down all queues on application exit.

lib · high confidence

Sucker Punch 3.3.0: Complete rewrite using concurrent-ruby

Sucker Punch has been upgraded to version 3.3.0, replacing the previous Celluloid-based implementation with the concurrent-ruby library. This change introduces a new architecture where job queues are backed by Concurrent::ThreadPoolExecutor instances, allowing users to configure worker counts and maximum queue sizes directly on job classes via the \workers\ and \max\_jobs\ methods. The update also adds a new \async\ syntax for triggering jobs, integrates with Rails logging through a Railtie, and provides a testing stub to simulate job queues without executing them in threads. Additionally, the library now tracks busy, processed, and failed job counts per queue and implements configurable shutdown modes to ensure jobs finish or are killed within a specified timeout.

_lib/sucker\punch · high confidence

Test coverage

Added inline testing mode for synchronous job execution; Added test suite for Sucker Punch job execution, queuing, and metrics; Initial test suite for Sucker Punch core functionality.

Dependencies

Update gemspec with metadata, Ruby version requirement, and concurrent-ruby dependency

The gemspec has been updated to explicitly require Ruby version 2.0.0 or higher and to declare a dependency on concurrent-ruby (version \~\> 1.0). Additionally, the specification now includes an MIT license, descriptive summary and description text, and metadata links for changelog, source code, and bug tracking. Development dependencies for rake, minitest (with version logic for Ruby 3.1+), and pry have also been added.

(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 59 → 59 (+0.0)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 76 → 76 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 44 → 44 (+0.0)
  • Readiness 71 → 71 (+0.0)
  • Security 100 → 100 (+0.0)

Resolved (5)

  • Ambiguous distinction between logger and default_logger. It is unclear if logger returns the configured logger or the default, and how logger= interacts with default_logger.
  • Documentation: no architecture or design documentation (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicate method definition for find_or_create with different parameter names, indicating a copy-paste error or incomplete refactoring.
  • Redundant and conflicting job submission methods. Job.async() appears to be a legacy or instance-level wrapper, while ClassMethods exposes perform_async and perform_in. Furthermore, perform_in is defined twice with different signatures (interval vs _), suggesting an incomplete refactoring or copy-paste error.

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

Survey your own repository

brandonhilkert/sucker_punch 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 98fefa21c06fb40460dafc59f50753069818187a — 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.