feat(raft-sim-conformance): bag push/deliver routes vote+AE RPCs through library handlers (task 2.1)

This commit is contained in:
Rongsong Shen 2026-06-24 12:10:11 +00:00
parent 631854303c
commit ae4495104a
4 changed files with 249 additions and 2 deletions

View file

@ -37,7 +37,7 @@
## 2. Message bag (mirrors raft.tla `messages`)
- [ ] 2.1 RED+GREEN: bag push/deliver routes vote and AppendEntries RPCs through the library handlers
- [x] 2.1 RED+GREEN: bag push/deliver routes vote and AppendEntries RPCs through the library handlers
- Test: pushing a vote-req and an AE-req then delivering them invokes `raft_on_vote_request` / `raft_on_append_entries_request`, and the handler reply is pushed back as a `*_RSP` message
- Implement `raft_sim_bag_push` and `raft_sim_bag_deliver(i)` (route by `kind`, honor `node.partition`, push replies)
- Observable completion: delivered requests produce matching responses in the bag; partitioned endpoints are not delivered