Documentation contents

Quickstart

Repository checkout

These examples assume a repository checkout. A Go installation provides only the executable. Build from the repository root with Go 1.25 or later. CI pins its Go version.

go build -o ./faultline ./cmd/faultline
./faultline version
./faultline help
./faultline plan examples/seeded-delays.yaml

On Windows, use go build -o faultline.exe ./cmd/faultline and invoke .\faultline.exe. The plan command computes the schedule without connecting to the target.

Try concurrent duplicate delivery

Start ./faultline demo --mode race-buggy --port 8083 or ./faultline demo --mode race-fixed --port 8083. Use a fresh instance for each scenario so the order count starts at zero.

Example Demo mode Expected verdict
examples/sequential-race.yaml Either race mode PASS
examples/concurrent-duplicate.yaml race-buggy FAIL
examples/concurrent-duplicate.yaml race-fixed PASS
examples/seeded-delays.yaml race-fixed PASS
examples/reordered-events.yaml race-fixed PASS

Run each example with ./faultline run <scenario>. The concurrent duplicate example uses a demo-only rendezvous to make the check-then-act bug reproducible. It also requires observed client overlap and a dispatch window of at most 200 ms. An unmet condition makes the verdict INCONCLUSIVE.

Try duplicate delivery

Start the buggy and fixed demos in separate terminals.

./faultline demo --mode buggy --port 8081
./faultline demo --mode fixed --port 8082

In another terminal, run both scenarios. Each delivers the same event twice and then checks that GET /state reports exactly one order.

./faultline run examples/duplicate-buggy.yaml
./faultline run examples/duplicate-fixed.yaml

On fresh demos, buggy mode reports FAIL and exits 3 because it creates two orders. Fixed mode reports PASS and exits 0 because it creates one. Both receive two events. Restart the demos to reset state, or stop them with Ctrl+C.

Inspect a run

Use the report and replay example to save a run to a private directory. Open it in the local report inspector to see client intervals and assertion outcomes.