--- id: "bug-1096" status: "fixed" status_updated: "2026-09-24" status_note: "" component: "lib" severity: "unknown" timestamp: "2026-06-24" last_seen: "2026-09-19T09:00:00Z" occurrences: 2 files: ["src/lib/raft/raft.c"] tags: ["raft", "vote-reply", "stale-term", "election-safety", "split-brain", "conformance", "needs-library-fix", "stale-report", "bug-851-family", "stale-response"] related: ["bug-1095", "bug-851"] legacy: true --- # bug-1096: raft_on_vote_reply counts a stale-term vote-reply (term < currentTerm) toward the current election… ## Description raft_on_vote_reply counts a stale-term vote-reply (term < currentTerm) toward the current election instead of dropping it ## Environment _Not recorded (migrated from buglog.json)._ ## Reproduction _Not recorded (migrated from buglog.json)._ ## Root cause No DropStaleResponse: a reply with term < s->term fell through to replies_received++/votes_granted++, corrupting quorum accounting (raft.tla DropStaleResponse discards mterm < currentTerm). ## Fix FIXED (verified 2026-07-02): src/lib/raft/raft.c:832 has `if (reply_term != s->term)` guard before tallying, with an on_trace("vote_reply_stale_drop", ...) at raft.c:455 — exactly the fix this bug's own second entry described. Landed under raft-sim-conformance / raft-commit-safety (both implemented, 18/18 + 23/23 tasks). ## Verification _Not recorded (migrated from buglog.json)._ ## References - Related: bug-1095, bug-851