forked from lei.chen/myxce
logOk (raft.tla:285, closes G6): local_last_log_term = log_len>0 ? on_get_entry_term(log_len):0; logOk = cand_last_log_term > local || (== && cand_last_log_index >= log_len). Lexicographic: term dominates, tie decided by index. Shared raft_log_ok helper. Vote (4.2): logOk deny inserted after stale-term/UpdateTerm/role-gate/one-vote-per-term and BEFORE on_vote_eligible (denies even when the app gate would grant); persist-before-grant intact. PreVote (5.2): identical logOk, fully side-effect-free (no term/vote/role/commit mutation, no on_persist). Signatures extended (1.3) on raft_on_vote_request/pre_vote_request; all 39 lib call sites + sim routing updated; sim captures the candidate's send-time last-log tuple (raft_sim_rpc_t). Empty-log call sites pass (0,0) → logOk true → existing outcomes preserved. 9 freshness tests. NOTE: controller cluster.c vote callers still use the old signatures and will NOT compile — an accepted, design-documented revalidation trigger; the controller adapter plumbing is owned by the downstream ha-term-safety spec (to be implemented next). Library suite ASAN green (239 tests). |
||
|---|---|---|
| .. | ||
| config-upgrade-snapshot | ||
| controller-status | ||
| election-iomgr-refactor | ||
| ha-commit-barrier-rollout | ||
| ha-commit-durability | ||
| ha-commit-engine | ||
| ha-config-bootstrap | ||
| ha-consistency-invariants | ||
| ha-convergence-recovery | ||
| ha-elect-ctx-lifecycle | ||
| ha-heartbeat-committed-propagation | ||
| ha-heartbeat-liveness | ||
| ha-peer-connection-reuse | ||
| ha-prevote | ||
| ha-repl-hardening | ||
| ha-single-leader-role | ||
| ha-term-safety | ||
| ha-wal-replication | ||
| libxce-failover | ||
| raft-commit-safety | ||
| raft-library | ||
| raft-log-replication | ||
| raft-sim-conformance | ||
| resval-id-decoupling | ||
| scheduler-controller-msg-gap | ||
| worker-join-refactor | ||
| xce-test-e2e-primitives | ||
| .gitignore | ||