Skip to content
CAI
Software that uses CAICheck a score

lasp-lang/partisan

56.3

Adequate · 23 September 2026

38.9k

lines of production code

Erlang

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Partisan is a distributed actor runtime for Erlang/OTP that facilitates node discovery, membership management, and message broadcasting across clusters. It provides a suite of configurable distributed protocols, including consensus algorithms and gossip mechanisms, alongside infrastructure for secure TLS communication and RPC. The system includes comprehensive tooling for static analysis, model checking, and performance benchmarking to verify protocol correctness and reliability.

How it got here

2016 — OTP 27 compatibility and TCP infrastructure

5 changes.

This period focused on upgrading Partisan to support Erlang/OTP 27, including new header files and conditional compilation attributes. The project introduced a dedicated acceptor pool for managing TCP connections and fixed critical build issues related to OTP module generation. Comprehensive test suites were added to validate the new connection handling, acknowledgements, and backpressure mechanisms.

2018–2019 — distributed protocol implementation and tooling

6 changes.

This period focused on implementing a suite of new distributed consensus and membership protocols, including variants of two-phase commit and gossip algorithms. The work was supported by establishing robust testing infrastructure, such as automated verification scripts, fault injection tools, and causality analysis files, alongside initial configuration setup for TLS and structured logging.

2023–2026 — v6 architecture and testing infrastructure

4 changes.

This period focused on defining the v6 architecture through detailed design records for broadcast, membership, and RPC subsystems, while establishing a new benchmark harness to validate performance. Concurrently, test coverage was expanded with dedicated handlers for OTP installation and a local Fly.io infrastructure to support heavy test suites.

Features

Add automated testing and analysis scripts for distributed protocols

The \bin\ directory now includes a suite of shell scripts and escripts to automate the verification of distributed protocol implementations. New scripts (\check-hbbft.sh\, \check-lashup.sh\, \check-paxoid.sh\, \check-riak-ensemble.sh\, \check-zraft.sh\) provide entry points to run model checking, static analysis, and fault-injection tests for specific protocols like HBBFT, Lashup, Paxoid, Riak Ensemble, and ZRaft. Supporting infrastructure includes \counterexample-find.sh\ and \counterexample-replay.sh\ for generating and reproducing test failures, \filibuster.sh\ for multi-run fault injection, \partisan-analysis.escript\ for static code analysis, and \perf-suite.sh\ for performance benchmarking under varying network conditions.

bin · high confidence

Added causality analysis files for distributed protocols

New causality analysis files have been added to the analysis directory for several distributed protocols, including Alsberg Day, Bernstein CTP, Demers (anti-entropy, direct mail, rumor mongering), Lampson 2PC, Lashup, Paxoid, Riak Ensemble, Skeen 3PC, and Zraft. These files define the message reception and forwarding relationships (causality) for each protocol variant, with some protocols like Lashup, Riak Ensemble, and Zraft having empty analysis results.

analysis · high confidence

Added causality and background annotations for distributed protocol models

New annotation files have been added to the annotations directory for several distributed protocol models, including Alsberg Day, Bernstein CTP, Demers variants, Lampson 2PC, Paxoid, Riak Ensemble, Skeen 3PC, and Zraft. These files define the message causality relationships (specifying which received messages trigger which forwarded messages) and background message sets for each model, providing structured metadata for analysis.

annotations · high confidence

Initial configuration setup with TLS and structured logging

The application now includes a default configuration file (sys.config) that enables TLS by default, pointing to generated server and client certificates located in the config/\_ssl directory. It also configures the Erlang logger with a custom template that includes OpenTelemetry trace and span IDs, and applies specific filters to manage log output from remote and domain-specific sources. Additionally, a new script (make\_certs) is provided to generate the necessary SSL certificates and keys for local development and testing, and a vars.config file defines the platform configuration directory.

config · high confidence

Introduce acceptor pool for TCP connection handling

Partisan now uses a dedicated acceptor pool (acceptor\_pool, acceptor, acceptor\_loop) to manage incoming TCP connections, replacing the previous direct socket handling. This change introduces a supervised pool architecture where partisan\_acceptor\_socket listens on configured addresses and delegates accepted connections to the pool, improving connection management and graceful shutdown capabilities.

src · high confidence

New benchmark harness and baseline for v6 performance validation

Added a new repeatable benchmark driver (\partisan\_bench\) and a corresponding baseline report (\BASELINE.md\) to establish performance metrics for the v6 release. The driver measures latency percentiles and throughput across various scenarios (including RPC concurrency and broadcast fan-out) with a variance gate to ensure statistical significance, while the baseline documents current loopback performance on an Apple M4 Pro to serve as a reference for future optimizations.

bench · high confidence

New distributed consensus and membership protocols added

The protocols area now includes several new implementations for distributed coordination: the Alsberg-Day two-phase commit protocol (with acked and membership-aware variants), the Bernstein CTP transaction protocol, the Lampson 2PC protocol, and Demers-style gossip protocols (direct mail, anti-entropy, and rumor-mongering, with and without acknowledgements). These modules provide APIs for broadcast, read/write operations, and membership updates, integrating with the existing partisan peer service for node discovery and message forwarding.

protocols · high confidence

Architecture

Documented architectural decisions for broadcast, membership, and RPC subsystems

Added seven new Architecture Decision Records (ADRs) to the documentation extras. ADR-000001 and ADR-000002 define a shift from a single shared broadcast process to per-group isolation with a pluggable tree engine (defaulting to Plumtree, with Thicket as an opt-in load-balancing alternative). ADR-000003 retires the synchronous \gen\_event\ membership bus in favor of a lock-free snapshot with asynchronous push notifications. ADR-000004 details the implementation of the Thicket engine. ADR-000005 proposes a pluggable, negotiated challenge/response authentication handshake for peer connections. ADR-000006 restructures RPC to use a correlated request/response protocol via \partisan\_erpc\ as the primary surface, moving away from the serialized \partisan\_rpc\_backend\ for standard calls.

_doc\extras · high confidence

Behavioural changes

Initial release of Partisan v6.3.0 with OTP 27+ support and peer discovery fix

This entry establishes the v6.3.0 release baseline for the Partisan distributed actor runtime. The project now requires Erlang/OTP 27 or later, enforced via \rebar.config\ and \rebar.config.script\, and generates Partisan-flavoured OTP modules (e.g., \partisan\_gen\_server\) at compile time. A critical behavioral fix ensures that the peer discovery agent no longer evicts cluster members that are temporarily absent from discovery lookups (such as nodes during boot), preventing unnecessary churn in dynamic environments. The release also consolidates the OTP-to-Partisan module mapping into a single source of truth (\partisan\_otp\_modules\) and introduces the \add\_members/1\ callback to the \partisan\_peer\_service\_manager\ behaviour.

(repo-wide) · high confidence

Move unused counterexample scripts to old-bin

Several shell and Erlang scripts used for generating, minimizing, and analyzing counterexamples (including \counterexample-extend-partitions\, \counterexample-minimize-failures\, \counterexample-model-checker\, and \schedule-generator\) have been moved from the main \bin\ directory into the \old-bin\ directory. This change isolates these legacy or unused tooling files from the active build and execution paths.

old-bin · high confidence

New Partisan include headers for Erlang 27 compatibility and configuration

This change introduces a set of new header files (\partisan.hrl\, \partisan\_logger.hrl\, \partisan\_peer\_socket.hrl\, \partisan\_util.hrl\) that centralize common types, macros, and configuration defaults for the Partisan library. A key addition is support for Erlang/OTP 27, using conditional compilation to switch between \-moduledoc\ and \-compile\ attributes for documentation. The headers also define core constants such as the default peer port (9090), membership strategy defaults, and RPC channel identifiers, while replacing the previous \lager\ logging dependency with the standard \kernel/logger\ via \partisan\_logger.hrl\. Additionally, utility macros for IP address validation and record-to-map conversion are provided to support the new TCP-based gossip and membership mechanisms.

include · high confidence

Fixes

Switch OTP module generation to pre-compile to fix infinite recursion

The build process for generating OTP modules has been changed from a post-compile hook to a pre-compile step using a new escript. This change fixes a bug where generating .erl source files caused infinite recursion due to the Erlang pretty-printer stripping the \erlang:\ prefix from BIF calls, which then resolved to local functions. By compiling directly to .beam files in-memory, the AST is preserved exactly, ensuring correct behavior and preventing the loop.

priv · high confidence

Test coverage

Added local Fly.io infrastructure for running heavy test suites; Added test suite callback handler for OTP installation tests; New test suites and infrastructure for acceptor pool, acknowledgements, and backpressure.

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 57 → 56 (-1.0)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 89 → 84 (-4.4)
  • Architecture 100 → 99 (-1.1)
  • Maturity 48 → 68 (+20.1)
  • Readiness 61 → 68 (+6.7)
  • Security 73 → 44 (-29.5)
  • Event-Driven 56 → 59 (+2.4)
  • Event Sourcing 100 → 100 (+0.0)

Resolved (26)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Medium IaC: CKV_DOCKER_3 (partisan-base.Dockerfile)
  • Medium IaC: CKV_DOCKER_6 (Dockerfile)
  • Medium IaC: CKV_DOCKER_6 (partisan-base.Dockerfile)
  • Medium IaC: CKV_DOCKER_7 (Dockerfile)
  • No exposed public API
  • Off-boarding risk: anonymized user #1
  • Test reliability not included
  • TooManyMethods: acceptor_pool (src/acceptor_pool.erl)
  • TooManyMethods: partisan (src/partisan.erl)
  • TooManyMethods: partisan_analysis (src/partisan_analysis.erl)
  • TooManyMethods: partisan_client_server_peer_service_manager (src/partisan_client_server_peer_service_manager.erl)
  • TooManyMethods: partisan_config (src/partisan_config.erl)
  • TooManyMethods: partisan_erpc (src/partisan_erpc.erl)
  • TooManyMethods: partisan_hyparview_peer_service_manager (src/partisan_hyparview_peer_service_manager.erl)
  • TooManyMethods: partisan_interval_sets (src/partisan_interval_sets.erl)
  • TooManyMethods: partisan_monitor (src/partisan_monitor.erl)
  • TooManyMethods: partisan_otp_patches (src/partisan_otp_patches.erl)
  • TooManyMethods: partisan_peer_connections (src/partisan_peer_connections.erl)
  • …and 6 more

New (277)

  • Change coupling clique: partisan_client_server_peer_service_manager.erl, partisan_hyparview_peer_service_manager.erl, partisan_static_peer_service_manager.erl (src/partisan_client_server_peer_service_manager.erl)
  • 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) (protocols/bernstein_ctp.erl)
  • Duplicated block (10 lines × 2) (src/partisan_hyparview_peer_service_manager.erl)
  • Duplicated block (10 lines × 2) (src/partisan_hyparview_peer_service_manager.erl)
  • Duplicated block (10 lines × 2) (src/partisan_pluggable_peer_service_manager.erl)
  • Duplicated block (10 lines × 2) (src/partisan_pluggable_peer_service_manager.erl)
  • Duplicated block (10 lines × 2) (src/partisan_pluggable_peer_service_manager.erl)
  • Duplicated block (10 lines × 3) (protocols/bernstein_ctp.erl)
  • Duplicated block (10 lines × 3) (protocols/demers_direct_mail.erl)
  • Duplicated block (10–11 lines × 2) (src/partisan_peer_service_client.erl)
  • Duplicated block (10–12 lines × 3) (src/partisan_erpc.erl)
  • Duplicated block (11 lines × 2) (src/partisan_client_server_peer_service_manager.erl)
  • Duplicated block (11 lines × 2) (src/partisan_hyparview_peer_service_manager.erl)
  • Duplicated block (11 lines × 2) (src/partisan_peer_service_client.erl)
  • Duplicated block (11 lines × 3) (protocols/alsberg_day.erl)
  • Duplicated block (11 lines × 3) (protocols/bernstein_ctp.erl)
  • Duplicated block (12 lines × 2) (src/partisan_client_server_peer_service_manager.erl)
  • …and 257 more

Changes since last survey

  • 16 commits — 15 feature/other, 1 fixes

By area

  • (repo) — 8 commits
  • (root) — 5 commits
  • src/partisan_peer_service_manager.erl — 2 commits
  • src/partisan.erl — 1 commit

Notable commits

  • fix: fix listener death on per-connection errors; survive unknown envelopes
  • change: Extract the OTP→Partisan module table into partisan_otp_modules
  • change: Merge branch 'master' of https://github.com/lasp-lang/partisan into develop
  • change: Merge branch 'release/v6.1.0'
  • change: Merge branch 'release/v6.2.0'
  • change: Merge branch 'release/v6.3.0'
  • change: Merge pull request #264 from hasantayyar/patch-1
  • change: Merge tag 'v6.1.0' into develop
  • change: Merge tag 'v6.2.0' into develop
  • change: Merge tag 'v6.3.0' into develop
  • change: Respect OTP28 + message priority when alias is used
  • change: Respect OTP28 + message priority when alias is used
  • change: cleanup comments and fmt
  • change: complete changes to static peer service which was neglected in the move to v6
  • change: peer discovery never evicts a member absent from a lookup
  • change: release v6.1.0

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

Survey your own repository

lasp-lang/partisan 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 966c0303fc9289d1b8268dec74f6cba48b830d2e — 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.