Skip to content
CAI
Software that uses CAICheck a score

charkost/prosopite

62.5

Adequate · 19 September 2026

270

lines of production code

Ruby

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

Prosopite is a Ruby library designed to detect N+1 query issues in Rails applications by scanning database access patterns. It provides thread-safe scanning capabilities with configurable allow lists and pause/resume controls to manage performance overhead. The system integrates seamlessly into web and background workloads via dedicated Rack and Sidekiq middleware, ensuring consistent tracing across requests and jobs.

Features

Added Rack and Sidekiq middleware for Prosopite scanning

Prosopite now provides dedicated middleware classes for integrating with Rack-based web applications and Sidekiq background job processing. The new Rack middleware automatically initiates a Prosopite scan before the application processes a request and ensures the scan is finalized afterward. Similarly, the Sidekiq middleware wraps job execution to start and finish a Prosopite scan for each background job, ensuring consistent tracing across both web and background workloads.

lib/prosopite/middleware · high confidence

Behavioural changes

Thread-safe scanning with pause/resume and configurable allow lists

Prosopite now stores scan state and query metrics in thread-local variables instead of instance variables, ensuring thread safety during concurrent scans. The library introduces \Prosopite.pause\ and \Prosopite.resume\ methods to temporarily suspend scanning within blocks, and adds configuration options like \ignore\_pauses\, \min\_n\_queries\, and \ignore\_queries\. The previous \whitelist\ configuration has been renamed to \allow\_stack\_paths\ (with a deprecation warning for the old name) and now supports regex matching against stack traces. Additionally, the \scan\ method now returns the result of the provided block, and fingerprinting uses \pg\_query\ for non-MySQL databases while supporting the Trilogy adapter.

lib · high confidence

Test coverage

Initial test suite for Prosopite N+1 detection

Added a comprehensive test suite covering the core N+1 query detection capabilities of Prosopite. The tests verify detection across various association access patterns (first, last, pluck), class inheritance changes, and preloading scenarios. They also validate configuration features including the ability to pause and resume scanning, ignore specific queries, and use block-based scanning with local raise overrides.

test · high confidence

Dependencies

Upgrade to Rails 8.0 and add development dependencies

The gemspec has been updated to version 2.2.0 and the license changed from MIT to Apache-2.0. The dependency manifest now includes Rails 8.0.1 (via activerecord and railties) and adds several development dependencies including pry, minitest, factory\_bot, sqlite3, and minitest-reporters. The pg\_query gem is also explicitly listed as a dependency.

(dependencies) · high confidence

Housekeeping

Prosopite version bumped to 2.2.0

The Prosopite library version has been updated from 0.1.0 to 2.2.0 in the version definition file.

lib/prosopite · 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 67
  • Readiness 51
  • Security 87

Changes since last survey

  • 143 commits — 131 feature/other, 12 fixes

By area

  • (root) — 83 commits
  • lib/prosopite.rb — 37 commits
  • lib/prosopite — 8 commits
  • .github/workflows — 6 commits
  • test/test_queries.rb — 3 commits
  • (repo) — 2 commits
  • test/test_helper.rb — 2 commits
  • test/test_force_raise.rb — 1 commit
  • test/test_mysql_fingerprint.rb — 1 commit

Notable commits

  • fix: Fix allow_list's infinite growing
  • fix: Fix connection deprecation warning
  • fix: Fix false negative when calling preloader in a loop
  • fix: Fix mysql fingerprint for ORDER BY FIELD()
  • fix: Fix ruby 3.4 string warning
  • fix: Fix style from recent contribution
  • fix: Fix subscription for puma
  • fix: Fix tests
  • fix: Fix uninitialized instance variable warnings
  • fix: Fix: sidekiq middleware
  • fix: Revert "Make Prosopite.resume an alias of Prosopite.scan"
  • fix: fix regexp warning
  • change: Bump version to 1.0.2
  • change: Add CI badge to README
  • change: Add README.md detail about the custom logger
  • change: Add Prosopite.pause and Prosopite.resume
  • change: Add a rack middleware
  • change: Add color output to tests
  • change: Add comment for context
  • change: Add custom-logger support
  • …and 123 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

charkost/prosopite 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 e5130979e18e2c46e0e797e27e7f9e5f263dcac1 — 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.