Skip to content
CAI
Software that uses CAICheck a score

ankane/dexter

64.2

Adequate · 6 November 2026

1.3k

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

New structured log parsers for CSV, JSON, SQL, and stderr formats

The library now includes dedicated parsers for CSV logs, JSON logs, SQL files, and stderr output, replacing or supplementing the previous monolithic parsing logic. Users can now process structured log files (CSV and JSON) where query details and parameters are extracted from specific columns or fields, parse raw SQL files by splitting on semicolons, and handle stderr-style logs that aggregate multi-line statements and parameters. This change improves parsing accuracy for these specific log formats and ensures empty SQL statements are skipped.

lib/dexter/parsers · high confidence

Architecture

Library code reorganized into modular components

The library has been refactored from a single monolithic file into separate classes and modules. The main entry point now requires a dedicated 'dexter' module, and the previous large Client class has been split into distinct components including a Connection class, a LogParser (renamed SqlLogParser), and separate indexers and resolvers. This change improves code maintainability and separation of concerns without altering the external API.

lib · high confidence

Behavioural changes

Dexter v0.6.3: Complete internal rewrite with modular architecture and Postgres 13+ requirement

Dexter has been rewritten from the ground up to use a modular, class-based architecture (Client, Connection, Collector, Indexer, Processor, etc.) replacing the previous monolithic structure. The tool now strictly requires Postgres 13+ and enforces this at startup. Key behavioral changes include the removal of support for \pg\_stat\_monitor\ and the experimental \--log-table\ option, while adding support for multiple \--statement\ inputs, \--non-concurrently\ index creation, and \--enable-hypopg\. The internal query processing pipeline has been restructured to use a \Collector\ for batching and a \Processor\ for orchestration, improving how queries are collected, filtered, and analyzed for index suggestions.

lib/dexter · high confidence

New modular source architecture for PostgreSQL and log data

The library now uses a dedicated \lib/dexter/sources\ directory to manage data collection, introducing four new source classes: \LogSource\ for parsing CSV, JSON, SQL, or standard error logs; \PgStatActivitySource\ for polling active and completed PostgreSQL queries; \PgStatStatementsSource\ for retrieving aggregated query statistics from \pg\_stat\_statements\; and \StatementSource\ for processing pre-defined SQL statements. This refactoring separates source-specific logic from the main initializer, allowing for more flexible and maintainable data ingestion.

lib/dexter/sources · high confidence

Simplified CLI execution and interrupt handling

The executable entry point has been refactored to use the new \Dexter::Client.start\ method, replacing the previous manual instantiation and rescue block. Additionally, explicit handling for SIGINT (Ctrl+C) interrupts has been added via a trap, ensuring the application exits cleanly with an error status when interrupted, rather than silently ignoring the signal.

exe · high confidence

Test coverage

Added comprehensive test suite for query analysis and index creation; Added test support fixtures for SQL query logs and database schema.

Dependencies

Update dependencies and drop support for Ruby versions below 3

The gem now requires Ruby 3 or higher, dropping support for earlier versions. Key dependencies have been updated: pg\_query is now constrained to version 6, pg to version 1 or higher, and slop to version 4.10.1 or higher. Additionally, csv has been added as a runtime dependency, and development dependencies like rake and minitest have been moved to the Gemfile.

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

Lenses

  • Code Health 63 → 63 (-0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 62 → 62 (+0.0)
  • Readiness 63 → 63 (+0.0)
  • Security 98 → 98 (-0.8)
  • Performance 75 → 75 (+0.0)

Resolved (4)

  • Ambiguous lifecycle methods: 'initialize' is typically a constructor or setup phase, while 'start' implies beginning execution. However, 'Client' also has 'perform()', which suggests 'start' might be redundant or misnamed if it just prepares the client, or if 'perform' is the actual execution. In many fluent APIs, 'initialize' is the constructor, and 'perform'/'run' is the action. Having both 'initialize' and 'start' on the same object without clear distinction (e.g., one for config, one for async start) is confusing.
  • Generic 'perform' method used across different domains: While consistent in name, 'perform' is used for both resolution (ColumnResolver, TableResolver) and creation (IndexCreator) and processing (Processor). This is acceptable if 'perform' is the standard execution verb, but 'resolve' or 'create' might be more descriptive. However, since the question asks for inconsistencies, and all use 'perform', this is consistent.
  • Inconsistent initialization pattern: 'LogParser' has an 'initialize' method, but its subclasses (CsvLogParser, etc.) do not expose an 'initialize' method in the signature list, yet they have a 'perform' method. This suggests either the subclasses inherit initialization from a base class not shown, or the subclasses are missing their own initialization signatures. If they inherit, the base class 'LogParser' should be the only one with 'initialize'. If they don't, they are inconsistent with the base class pattern.
  • Redundant 'perform' method across multiple source types: All source types (LogSource, PgStatActivitySource, PgStatStatementsSource, StatementSource) have a 'perform(collector)' method. This is consistent, but the naming 'perform' is generic. However, since they all do the same thing (populate a collector), this is actually consistent. No inconsistency here.

Changes since last survey

  • 3 commits — 2 feature/other, 1 fixes

By area

  • (root) — 2 commits
  • lib/dexter — 1 commit

Notable commits

  • fix: Fixed synchronization for top queries - resolves #65
  • change: Updated HypoPG on CI
  • change: Updated HypoPG on CI

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

Survey your own repository

ankane/dexter 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 7d7ebcc3cce66d14f33c39fef5089db71e6aa95e — 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.