Skip to content
CAI
Software that uses CAICheck a score

brandonhilkert/sucker_punch

62.5

Adequate · 19 September 2026

494

lines of production code

Ruby

primary language

1

measurement over time

CAI band scale
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 watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 63.

Lenses

  • Code Health 100
  • Architecture 69
  • Maturity 47
  • Readiness 70
  • Security 100

Changes since last survey

  • 300 commits — 286 feature/other, 14 fixes

By area

  • (root) — 126 commits
  • lib/sucker_punch — 80 commits
  • (repo) — 51 commits
  • test/sucker_punch — 11 commits
  • spec/sucker_punch — 9 commits
  • .github/workflows — 7 commits
  • web/assets — 5 commits
  • lib/sucker_punch.rb — 3 commits
  • lib/generators — 2 commits
  • rails_app_example/config — 2 commits
  • bin/load — 1 commit
  • myapp/config — 1 commit
  • rails_app_example/app — 1 commit
  • test/test_helper.rb — 1 commit

Notable commits

  • fix: Fix bug in worker count when Jobs are subclassed. Fixes #28.
  • fix: Fix changelog link in sucker_punch.gemspec file
  • fix: Fix conflict
  • fix: Fix docs on location of active_job config (#179)
  • fix: Fix indent
  • fix: Fix inheritance monkey patch
  • fix: Fix up tests and solidify API
  • fix: Fixed some bugs in the README
  • fix: Fixes a small timing bug during shutdown.
  • fix: Merge pull request #14 from r38y/fix-readme
  • fix: Merge pull request #77 from gpjonesii/fix-readme
  • fix: Revert "Call kill directly b/c running will be false and won't make it there"
  • fix: Revert "Update Celluloid dependency"
  • fix: fix: rename singleton_class? to sucker_punch_is_singleton_class? to avoid naming class with core ruby method (#253)
  • change: Accurately track busy workers
  • change: Add #find to queue
  • change: Add 'workers' as replacement for 'size' in config.
  • change: Add 'workers' stat method in replacement of size
  • change: Add Generator to create Job
  • change: Add Queues API to list out registered queues
  • …and 280 more

Written by watchdog.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 19 September 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.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-13a154b7f5d1.