HashiCorp Raft Chaos Testing
npm run stability:go-raft-chaos runs a HashiCorp Raft-focused stability harness. It is separate from normal E2E, Noosraft chaos, and soak tests.
The current harness reuses the real test:raft:go cluster path and records the covered HashiCorp Raft sidecar scenarios as a machine-readable report under go-raft-chaos-results/.
Covered now:
- baseline three-node HashiCorp Raft commit
- leader election and block replication
- leader sidecar restart/failover
- follower restart/catch-up
- persisted data directory restart
- forced sidecar death and TypeScript supervisor auto-restart
- TypeScript HTTP listener interruption while the HashiCorp Raft sidecar stays alive; missed committed callbacks are recovered by replaying newly committed sidecar log entries through the deterministic NOOSChain block path
- no-quorum probe: two voters are stopped, the remaining voter cannot falsely finalize a new block, quorum is restored, and commits resume
- callback auth rejection
- duplicate committed callback idempotency
- malformed callback rejection
- final chain/replay verification
Commands
powershell
npm run stability:go-raft-chaosbash
npm run stability:go-raft-chaosEnvironment
GO_RAFT_CHAOS_LOG_DIR: report directory, default./go-raft-chaos-results.GO_RAFT_CHAOS_KEEP_DB: reserved for future dedicated schemas.GO_RAFT_CHAOS_DURATION_MS: reserved for future long-running loops.GO_RAFT_CHAOS_SEED: report metadata seed.
Limitations
This is crash-fault testing for the HashiCorp Raft sidecar bridge, not Byzantine testing. It does not certify production Raft behavior, autonomous membership orchestration, OpenBFT, CometBFT, or libp2p.