rabbitmq/khepri
61.0
Adequate · 23 September 2026
21.1k
lines of production code
Erlang
primary language
5
measurements over time
What this system is
Khepri is an Erlang library for managing hierarchical tree data structures, providing a public API for node creation, traversal, and payload manipulation. It supports transactional operations with conditional checks and offers advanced interfaces for detailed result handling and Elixir-style error unwrapping. The system is designed for integration into larger applications, featuring strict type safety and comprehensive test coverage for core tree operations.
Features
Introduce advanced API and Elixir-friendly bang functions
The library now exposes a new \khepri\_adv\ module providing variants of standard functions that return more detailed results, such as distinguishing between a node with an \undefined\ payload and one with no payload, or retrieving the payload version for manual transactional operations. Additionally, a new \khepri\_bang\ header introduces Elixir-style 'bang' functions (e.g., \get!\, \get\_or!\) that unwrap results directly, simplifying pipeline usage for Elixir consumers.
src · high confidence
Behavioural changes
Documentation site receives a custom visual identity
The generated documentation now features a dedicated brand look, replacing the previous generic GitHub Markdown styling with a custom stylesheet (\stylesheet.css\) that applies a beige navbar and displays the Khepri logo as a background for the main heading. A custom SVG favicon (\khepri-favicon.svg\) is now served in the browser tab, and a GitHub fork ribbon is added to the page header via an external CSS library. To support this new design, the project has removed the bundled \github-markdown.css\, \prism.css\, and \prism.js\ assets, and added optimized SVG assets for the logo (\khepri-logo.svg\, \khepri-logo-inkscape.svg\) and a social media preview image (\khepri-social-preview.svg\).
doc · high confidence
Dual licensing and dependency overhaul
The project now supports dual licensing under Apache-2.0 and Mozilla Public License 2.0, with the Apache license text renamed to LICENSE-Apache-2.0 and the MPL-2.0 text added as LICENSE-MPL-2.0. The build configuration has been significantly updated: the minimum required Erlang/OTP version is raised to 27, and dependencies are now fetched from Hex.pm instead of Git, specifically pinning Ra to 3.2.0 and introducing Horus 0.5.0. The legacy rebar.config.script used for Coveralls integration has been removed, and the project now uses the rebar3\_hex plugin for documentation generation.
(repo-wide) · high confidence
Khepri API refactoring: macro renaming, stricter type checking, and new condition records
The public API in \include/khepri.hrl\ has been refactored to improve type safety and consistency. Path-related macros (e.g., \IS\_NODE\_ID\, \ROOT\NODE\) are renamed with a \KHEPRI\\ prefix (e.g., \IS\_KHEPRI\_NODE\_ID\, \KHEPRI\_ROOT\_NODE\) to avoid namespace collisions. The \IS\_KHEPRI\_CONDITION/1\ macro is now stricter, explicitly checking for specific record types rather than just tuple existence. New condition records \if\_has\_payload\ and \if\_has\_sproc\ are added, and the \if\_data\_matches\ record now supports an optional \conditions\ field. Additionally, the \if\_child\_list\_count\ record is renamed to \if\_child\_list\_length\, and error/exception macros are standardized to \khepri\_error/2\ and \khepri\_exception/2\.
include · high confidence
Test coverage
Added EUnit test suites for advanced Khepri API operations
Added new EUnit test files in the test directory to cover the advanced Khepri API (\khepri\_adv\ and \khepri\_tx\_adv\). These tests verify the behavior of node creation, insertion, update, deletion, and payload clearing operations, including both direct API calls and those executed within read-write or read-only transactions. The test coverage extends to edge cases such as non-existing nodes, wildcard path restrictions, conditional deletes, and async options.
test · high confidence
Dependencies
Dependency and application metadata management refactored to use external config files
The project's build configuration (mix.exs) has been updated to automatically derive the application name, description, and version from the source file src/khepri.app.src, and to read the list of dependencies and their version constraints from rebar.config. This change eliminates manual duplication of metadata and dependency definitions within the Mix project file, ensuring that these values remain consistent with the Rebar-based build 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
Score
- CAI 58 → 61 (+2.6)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 91 → 91 (+0.4)
- Architecture 100 → 100 (+0.0)
- Maturity 38 → 59 (+21.7)
- Readiness 74 → 53 (-21.0)
- Security 67 → 57 (-9.8)
- Event Sourcing 100 → 100 (+0.0)
Resolved (11)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- No exposed public API
- Off-boarding risk: anonymized user #1
- Test reliability not included
- TooManyMethods: khepri (src/khepri.erl)
- TooManyMethods: khepri_cluster (src/khepri_cluster.erl)
- TooManyMethods: khepri_machine (src/khepri_machine.erl)
- TooManyMethods: khepri_tree (src/khepri_tree.erl)
- TooManyMethods: khepri_tx_adv (src/khepri_tx_adv.erl)
- complexity unreadable for .erl, .exs, .hrl — churn × complexity hotspots could not be measured
New (91)
- Coverage not measured — no coverage collector is wired up
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Duplicated block (10 lines × 2) (src/khepri.erl)
- Duplicated block (10 lines × 2) (src/khepri_machine.erl)
- Duplicated block (10 lines × 2) (src/khepri_tree.erl)
- Duplicated block (11 lines × 2) (src/khepri_tree.erl)
- Duplicated block (14 lines × 2) (src/khepri_projection.erl)
- Duplicated block (5 lines × 2) (src/khepri.erl)
- Duplicated block (5 lines × 2) (src/khepri.erl)
- Duplicated block (5 lines × 2) (src/khepri.erl)
- Duplicated block (5 lines × 2) (src/khepri.erl)
- Duplicated block (8 lines × 2) (src/khepri.erl)
- FixmeComment (src/khepri.erl)
- FixmeComment (src/khepri_cluster.erl)
- FixmeComment (src/khepri_cluster.erl)
- FixmeComment (src/khepri_machine.erl)
- FixmeComment (src/khepri_machine.erl)
- FixmeComment (src/khepri_tx.erl)
- FixmeComment (src/khepri_tx_adv.erl)
- …and 71 more
Changes since last survey
- 130 commits — 111 feature/other, 19 fixes
By area
- (repo) — 52 commits
- .github/workflows — 19 commits
- (root) — 17 commits
- src/khepri.erl — 9 commits
- src/khepri_machine.erl — 4 commits
- doc/overview.edoc — 3 commits
- src/khepri_cluster.erl — 3 commits
- src/khepri_condition.erl — 3 commits
- src/khepri_tree.erl — 3 commits
- src/khepri.app.src — 2 commits
- src/khepri_event_handler.erl — 2 commits
- src/khepri_utils.erl — 2 commits
- src/khepri_app.erl — 1 commit
- src/khepri_import_export.erl — 1 commit
- src/khepri_node.hrl — 1 commit
- src/khepri_path.erl — 1 commit
- src/khepri_pattern_tree.erl — 1 commit
- src/khepri_tx_adv.erl — 1 commit
- test/advanced_tx_delete.erl — 1 commit
- test/cluster_SUITE.erl — 1 commit
Notable commits
- fix: Documentation: Fix several warnings reported by ExDoc
- fix: GitHub Actions: Fix manual trigger of the cleanup
- fix: GitHub Actions: Fix shell syntax error
- fix: GitHub Actions: Fix syntax of the on: trigger mechanism
- fix: GitHub Actions: Fix two tests + add log messages
- fix: Merge pull request #416 from rabbitmq/fix-legacy-delete-ret-missing-node
- fix: Merge pull request #429 from rabbitmq/collection-of-small-fixes
- fix: Merge pull request #430 from rabbitmq/elp-spec-fixes
- fix: Merge pull request #431 from rabbitmq/fix-style
- fix: Merge pull request #432 from rabbitmq/fix-style
- fix: Merge pull request #434 from rabbitmq/fix-errors-in-docs
- fix: Merge pull request #439 from rabbitmq/fix-get-on-mismatching-node
- fix: Merge pull request #440 from rabbitmq/fix-race-condition-during-cluster-join
- fix: Merge pull request #441 from rabbitmq/fix-test-flake-in-protect_against_dups_option
- fix: khepri_import_export, khepri_machine, khepri_tx: Fix function specs
- fix: khepri_pattern_tree: Fix any/2's spec to return boolean() instead of payload() | undefined
- fix: khepri_tx_adv: Fix crash converting delete return value to legacy format
- fix: test/prop_state_machine: Fix handling of automatically reclaimed parent tree nodes
- fix: test/protect_against_dups_option: Fix Expiry value in dedup_expiry_test_()
- change: Bump Khepri to version 0.17.10
- …and 110 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
rabbitmq/khepri 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 23 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 f7fead4627fd1f8f7044fc12b207fa8f5eaa3654 — 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-955b9cee9818.