bitcrowd/carbonite
69.7
Adequate · 18 September 2026
3k
lines of production code
Elixir
primary language
1
measurement over time
What this system is
Carbonite is an Elixir library that captures database changes via PostgreSQL triggers and manages them through explicit transaction records. It provides an outbox mechanism for reliable asynchronous processing of audit logs and integrates with Ecto.Multi for robust transaction handling. The system supports schema isolation, flexible querying, and automatic cleanup of empty transactions.
Features
Carbonite v0.17.0: Outbox start ID, Ecto dynamic filters, and empty transaction cleanup
Carbonite v0.17.0 introduces three key capabilities: you can now specify \last\_transaction\_id: :max\ when creating an outbox to easily resume processing after existing transactions; \Carbonite.process/4\ accepts Ecto \dynamic/2\ expressions for the \:filter\ option, allowing more flexible query construction; and a new \Carbonite.delete\_transaction\_if\_empty/2\ function allows you to remove the current transaction record if no changes were recorded during it. This release also includes multi-step naming improvements for custom prefixes (v0.16.1) and support for Elixir 1.18's built-in JSON module (v0.15.2).
(repo-wide) · high confidence
New mix task to generate initial Carbonite migration
A new Mix task, \carbonite.gen.initial\_migration\, has been added to automatically generate the initial Ecto migration file for installing Carbonite. This generated migration includes calls to \Carbonite.Migrations.up\ and \down\ to handle the library's internal schema changes, and provides commented-out examples for configuring triggers and outboxes, simplifying the setup process for new users.
lib/mix · high confidence
Behavioural changes
Added placeholder directory for PLTs
A new .gitkeep file was added to the \_plts directory, ensuring the directory is tracked by version control. This change supports the addition of CircleCI configuration by providing a persistent location for Pluggable Language Tooling (PLT) artifacts or related files.
_\plts · low confidence
Carbonite database migrations refactored and modernized
The migration system has been significantly restructured, replacing the legacy V01 schema with a new versioned series (V1–V12) that introduces a \carbonite\_prefix\ option for schema isolation. Key behavioral changes include the introduction of a \changed\_from\ column to optionally store the previous state of updated records, the removal of the \override\_xact\_id\ column in favor of runtime settings, and the addition of a helper module for SQL execution. The migration logic also now handles null trigger rows explicitly and drops legacy helper functions, ensuring compatibility with modern PostgreSQL versions.
lib/carbonite/migrations · high confidence
Carbonite v0.3.1: Outbox, Multi integration, and schema restructuring
This release introduces a new Carbonite.Outbox schema and query functions to track processed transactions, enabling reliable asynchronous audit log consumption. It adds Carbonite.Multi helpers (insert\_transaction, delete\_transaction\_if\_empty, fetch\_changes, override\_mode) for seamless integration with Ecto.Multi workflows. The underlying schema is restructured: the 'carbonite\_changes' and 'carbonite\_transactions' tables are renamed to 'changes' and 'transactions' respectively, and the Change model now uses 'data', 'changed', and 'changed\_from' fields instead of 'row\_data' and 'changes'. Triggers are now deferrable and can be configured as immediately deferred. Migration support is upgraded to a patch-based system (up to patch 12) with explicit 'up' and 'down' functions, and the 'carbonite\_prefix' option is standardized across APIs.
lib/carbonite · high confidence
Major API overhaul and new transaction management capabilities
The Carbonite library has been significantly refactored, replacing the previous \build\ and \insert\ functions with a new, more explicit API for managing audit transactions. Users can now use \insert\_transaction/3\ to record a transaction, which handles conflicts by ignoring subsequent calls within the same database transaction. A new \delete\_transaction\_if\_empty/2\ function allows for the cleanup of orphaned transactions that have no associated changes. Additionally, \fetch\_changes/2\ provides a way to retrieve all changes recorded in the current transaction, and \override\_mode/2\ now supports a \:to\ option to explicitly set the override mode. The module also introduces support for Ecto dynamic expressions in the \:filter\ option for outbox queries.
lib · high confidence
Removal of legacy test migration for Carbonite installation
The test repository migration file that previously installed Carbonite on the :rabbits table (excluding the :age column) has been removed. This change eliminates the legacy setup script from the test environment, likely as part of a broader refactoring or migration versioning update.
priv · medium confidence
Removal of xid8 type support
The custom xid8 type handler has been removed from the Postgrex library, meaning the system no longer supports encoding or decoding the xid8 data type for PostgreSQL.
lib/carbonite/postgrex · high confidence
Test environment configuration updates
The test environment now uses a database name that includes the current config environment (e.g., carbonite\_test) to better isolate test data. The test repository's private directory is explicitly set to test/support/test\_repo. Additionally, SQL logging is disabled by default in tests (set to :info level), and the Ecto repository pool is configured to use Ecto.Adapters.SQL.Sandbox for concurrent test support.
config · high confidence
Test coverage
Added tests for Carbonite core modules; Expanded test coverage for change capture and transaction management; Expanded test fixtures for Carbonite migration scenarios; Updated test support helpers and fixtures.
Dependencies
Update dependencies and project configuration for Carbonite 0.17.0
This release updates the project to version 0.17.0 and raises the minimum required Elixir version to 1.15. Key dependency upgrades include Ecto and Ecto SQL to the 3.14 series, Postgrex to 0.22.4, and Jason to 1.4.5. Development tooling has also been updated, with Credo moving to 1.7.19, Dialyxir to 1.4.8, and ExDoc added for documentation generation. The project metadata has been expanded to include Apache-2.0 licensing, maintainer information, and Hex.pm package configuration.
(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 70.
Lenses
- Code Health 100
- Architecture 66
- Maturity 65
- Readiness 67
- Security 98
Changes since last survey
- 156 commits — 135 feature/other, 21 fixes
By area
- (root) — 90 commits
- lib/carbonite — 44 commits
- test/support — 6 commits
- lib/carbonite.ex — 3 commits
- test/capture_test.exs — 3 commits
- test/carbonite — 3 commits
- .github/workflows — 2 commits
- lib/mix — 2 commits
- (repo) — 1 commit
- config/config.exs — 1 commit
- test/carbonite_test.exs — 1 commit
Notable commits
- fix: Fix carbonite prefix handling
- fix: Fix carbonite_prefix option in Carbonite.purge/2 (#74)
- fix: Fix doc for Multi.insert_transaction
- fix: Fix flaky tests (#55)
- fix: Fix incompatibility with Postgres 14.x (#117)
- fix: Fix migration range in README
- fix: Fix success type of Carbonite.process/4 (#76)
- fix: Fix t:trigger_config_key type.
- fix: Fix two flaky tests
- fix: Fix v8 down migration. (#101)
- fix: Small docs fix
- fix: Type fixes
- fix: [#132] Fix insert_transaction/1 on ecto 3.13.0 (#133)
- fix: [#86] Fix incompatibility with PostgreSQL 16.0 (#87)
- fix: fix changelog link
- fix: fix license
- fix: fix remaining prefix types and options
- fix: fix table_pk docs
- fix: fix(docs): correctly use table_prefix option in migration comments (#78)
- fix: fix: Escape table_prefix with double quotes (#124)
- …and 136 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
bitcrowd/carbonite 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 18 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 e39467f9cf6b348b44539701e899d073e1c6fc94 — 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-5d04157a340d.