Rebuild it
Build a toy Raft in one process: five server objects, S1 to S5, and a fake network that can delay, drop or hold back any message, driven by a fake clock and a seeded random number generator so every run can be replayed. Use Figure 2 as your spec. Implement random election timeouts, RequestVote with the up-to-date rule, AppendEntries with the previous-entry check, nextIndex backoff, and the rule that a leader counts copies only for entries from its own term. Leave out membership changes and log compaction. Test it two ways. First, script the story's run: Ana's entry commits in term 1, Bo's reaches only S2 before S1 crashes, S5 writes Cy's entry in term 2 and crashes, and S1 leads term 3. Check that S1 does not commit Bo's entry until its own no-op at index 3 is on a majority. Then delete the own-term rule and find the run where S5 erases an entry S1 has already applied. Second, run a few thousand random seeds with crashes and dropped messages, and after every step assert that no term has two leaders and no two servers have applied different commands at the same index.