Skip to content
CAI
Software that uses CAICheck a score

ankane/pgsync

67.1

Adequate · 28 September 2026

1.5k

lines of production code

Ruby

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

PgSync is a command-line tool for synchronizing data and schema between PostgreSQL databases. It supports batched syncing with options to preserve or overwrite existing rows, handle schema-only updates, and defer constraints. The system features a modular architecture with robust error handling and configuration support for various frameworks.

Features

Added executable entry point with interrupt handling

A new executable script at exe/pgsync has been added to serve as the entry point for the application. It sets up a trap for the SIGINT signal to handle interrupts cleanly by aborting, and then requires and starts the PgSync::Client.

exe · high confidence

Removals

Removal of the pgsync executable entry point

The \bin/pgsync\ script, which previously served as the command-line entry point for the PgSync tool, has been removed from the repository. Users can no longer invoke the tool directly via this specific binary path.

bin · high confidence

Behavioural changes

Major codebase refactoring and dependency restructuring

The library has undergone a significant structural overhaul, replacing the monolithic \pgsync.rb\ implementation with a modular architecture consisting of separate classes for schema synchronization, table synchronization, tasks, and resolvers. This change introduces new dependencies (\tty-spinner\, \shellwords\, \tempfile\) and removes older ones (\multiprocessing\, \erb\), while also updating the parallel processing library. For users, this represents a foundational shift in how the tool is organized, likely improving maintainability and potentially altering internal behavior, though the primary user-facing impact is the restructuring of the core logic.

lib · medium confidence

pgsync v0.8.1: Initial release of the refactored sync engine

The pgsync tool has been released as version 0.8.1, marking the completion of a major codebase refactor. This update introduces a new modular architecture with dedicated classes for handling the CLI client, database connections, schema synchronization, and table data syncing. Users benefit from improved command-line argument parsing, better error handling for missing tables or invalid connection strings, and enhanced output with colorized messages and progress spinners. The sync process now supports advanced features such as syncing in batches, preserving or overwriting existing rows, and deferring constraints, all while maintaining compatibility with existing configuration files and command-line options.

lib/pgsync · high confidence

Test coverage

Added comprehensive test suite for PgSync CLI and sync operations; Added test support fixtures for schema and configuration validation.

Dependencies

Updated dependencies and dropped support for Ruby \< 2.7

The gemspec has been updated to require Ruby 2.7 or higher, dropping support for older versions. Several dependencies have been adjusted: 'slop' is now pinned to version 4.10.1 or greater, 'pg' requires version 0.18.2 or greater, and 'bigdecimal' and 'tty-spinner' have been added as runtime dependencies. Development dependencies 'rake' and 'minitest' have been moved from the gemspec to the Gemfile, and the executable directory has been changed from 'bin' to 'exe'.

(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

Score

  • CAI 67 → 67 (+0.0)
  • Rubric changed (rubric-2026.09.8 → rubric-2026.09.16) — scores are not directly comparable.

Lenses

  • Code Health 94 → 94 (+0.0)
  • Architecture 100 → 100 (+0.0)
  • Maturity 55 → 55 (+0.0)
  • Readiness 58 → 58 (+0.0)
  • Security 99 → 99 (+0.2)

Resolved (2)

  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)

New (2)

  • Ambiguous naming and potential overlap between quoting utilities. 'quote_ident_full' vs 'quote_ident' suggests a subset/superset relationship, but 'quote_string' is distinct. It is unclear if 'quote_ident' handles schema qualification or just the identifier, and whether 'quote_ident_full' is the canonical method for fully qualified identifiers.
  • Inconsistent parameter naming and ordering for initialization methods across similar entry-point classes. Some use 'args' and 'opts', others use 'arguments' and 'options'. The order of 'source', 'destination', 'tasks' varies or is absent depending on the class.

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

Survey your own repository

ankane/pgsync 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 28 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 57bdddf5db506d329b51cb3376379dc3a2559010 — the exact code this score is about.
  • Scored under rubric-2026.09.16 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-2d9048c36d26.