WhatsApp/waraft
65.4
Adequate · 13 November 2026
10.8k
lines of production code
Erlang
primary language
8
measurements over time
What this system is
Features
Initial release of WARaft with build configuration and documentation
This entry introduces the WARaft project, an Erlang implementation of the Raft consensus algorithm. The change adds the \rebar.config\ build file, specifying a minimum Erlang/OTP 28.0 requirement and including test dependencies like \assert\ and \meck\. It also establishes the initial \README.md\, which documents the library's features (including leader election, replicated logs, and pluggable components), provides a quick-start guide for running a single-node cluster, and outlines the Apache 2.0 license.
(repo-wide) · high confidence
Introduce pluggable distribution and application-scoped configuration for RAFT
The RAFT subsystem now supports pluggable distribution layers and application-scoped configuration. A new \wa\_raft\_distribution\ module provides a behavior with a default Erlang distribution implementation, allowing custom transport backends. Additionally, \wa\_raft\_env\ introduces a configuration API that searches application environments in a specific order, enabling table-level overrides and runtime election weight adjustments. This is accompanied by new application and supervisor modules (\wa\_raft\_app\, \wa\_raft\_app\_sup\) to manage shared services like transport and snapshot catchup, replacing the previous monolithic startup model.
src · high confidence
Behavioural changes
Standardized RAFT logging and RPC naming conventions
The RAFT subsystem now uses a dedicated logging domain (whatsapp, wa\_raft) via the standard Erlang logger, replacing ad-hoc logging macros. RPC communication has been standardized to use named procedures (e.g., append\_entries, request\_vote) with explicit sender names and nodes, replacing the previous generic RPC format that relied on numeric IDs. This change improves log clarity and ensures consistent identification of RAFT participants across the cluster.
include · high confidence
Updated kvstore example to use wa\_raft\_acceptor API and configurable storage
The kvstore example application has been refactored to align with the current wa\_raft API. Client operations (read, write, delete) now explicitly use the wa\_raft\_acceptor module instead of direct gen\_server calls, providing clearer error handling via specific acceptor error types. The application's configuration in kvstore.app.src has been expanded to allow users to specify custom modules for the raft log, storage, distribution, and transport layers, as well as a default path for the raft database. Additionally, the supervisor logic was simplified to pass partition-specific arguments directly to the wa\_raft supervisor, and module documentation was standardized to use -moduledoc attributes.
examples/kvstore · high confidence
Test coverage
Added comprehensive test suite for wa\_raft components
Added new Common Test suites and helper modules to verify the correctness of the wa\_raft Raft implementation. The new tests cover the acceptor (commit and strong read operations, including queue-full error handling), the log module (open, append, trim, rotate, and config operations), the queue (commit and read operations, including queue-full scenarios), the storage layer (snapshot creation, restoration, and config persistence), and the transport layer (file path validation and worker failure handling). Additionally, a cluster test helper was added to support multi-node integration tests, including sanity checks for basic operations, restarts, catchup, and reelection.
test · 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 65 → 65 (-0.1)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.
Lenses
- Code Health 75 → 74 (-0.5)
- Architecture 100 → 100 (+0.0)
- Maturity 54 → 54 (+0.0)
- Readiness 64 → 64 (+0.0)
- Security 100 → 100 (+0.0)
New (10)
- Edited copies of one member (3 members, 9+ corresponding lines) (src/wa_raft_part_sup.erl)
- Edited copies of one member (5 members, 2+ corresponding lines) (src/wa_raft_acceptor.erl)
- Edited copies of one member (5 members, 3+ corresponding lines) (src/wa_raft_acceptor.erl)
- Edited copy of a member (11 corresponding lines) (src/wa_raft_log_ets.erl)
- Edited copy of a member (15 corresponding lines) (src/wa_raft_server.erl)
- Edited copy of a member (17 corresponding lines) (src/wa_raft_transport.erl)
- Edited copy of a member (2 corresponding lines) (src/wa_raft_sup.erl)
- Edited copy of a member (7 corresponding lines) (src/wa_raft_info.erl)
- Edited copy of a member (8 corresponding lines) (src/wa_raft_dist_transport.erl)
- Edited copy of a member (8 corresponding lines) (src/wa_raft_queue.erl)
Changes since last survey
- 8 commits — 8 feature/other, 0 fixes
By area
- include/wa_raft.hrl — 3 commits
- include/wa_raft_rpc.hrl — 1 commit
- src/wa_raft_log.erl — 1 commit
- src/wa_raft_server.erl — 1 commit
- src/wa_raft_storage.erl — 1 commit
- test/wa_raft_acceptor_SUITE.erl — 1 commit
Notable commits
- change: Count pending reads toward commit batching
- change: Delete unused metadata/0 type
- change: Move transport startup into providers
- change: Remove arguments that local functions ignore
- change: Remove obsolete bulk catchup RPC helpers
- change: Test late strong-read reply delivery after read timeout
- change: Type wa_raft_log:append/2 without eqwalizer:ignore
- change: Use sender timestamps for quorum freshness
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
WhatsApp/waraft 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 13 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 5980caba3642e920ff0c10eb2cc30b536e50dc74 — the exact code this score is about.
- Scored under rubric-2026.11.3 — 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.57+preprod-8ebfb01cf4c0.