public snapshot · areas/examples/raft-nib/ · system@main · commit da2bf624f03d · shared 2026-11-23T17:23:12Z· frozen: this page does not change when the repository does
all files

raft-nib

Raft leader election and log replication in nib: three nodes, each a fibre on the simulated network, checked against a safety monitor by nib-tla.

filewhat it is
raft.nibthe program; wires Main (Raft as stated), Mutant, Careless and Forgetful (each a known-wrong variant)
RaftTrace.tlathe monitor: ElectionSafety, LogMatching, LeaderCompleteness, StateMachineSafety, Durability
tla.json, worlds/what nib-tla verify areas/examples/raft-nib checks, in CI (repo:quint)
explore.shruns a wire under many seeded worlds and keeps every refused run with the world file that reproduces it
site/the public explainer at https://raft.app.jahfer.link (deploy name raft), served by nib-site's static server (package.nix)
gen/build.py writes site/index.html from real runs: the two drawn runs, every refused sweep seed re-run, the verify table, code cut from the sources; check_site.py is the package's check

The site is authoring-time output, committed. After a change to the program or the monitor, rebuild it (needs nibc and nib-tla built, the grammar's node_modules, and a checker as nib-tla finds one):

python3 areas/examples/raft-nib/gen/build.py            # runs verify itself (~2 min)
python3 areas/examples/raft-nib/gen/build.py --verify-log verify.log

build.py refuses to write a page whose runs do not say what the page says: the drawn correct run must be admitted, the drawn forgetful run refused at the save the page explains, and every refused sweep seed refused again at the entry verify reported.

Why it exists, what it showed, and what is still open: specs/nib-raft/INTENT.md.