feat(raft-adapter-conformance): send explicit reply on every config-push outcome

handle_repl_config_push now sends a ReplConfigPushReply{accepted,term}
from every exit path instead of silently dropping on the four reject
conditions (malformed request, missing bytes/sha256, sha256 mismatch,
conf_save_config failure). Term is sourced live from c->ha.term.
-EAGAIN activation-defer still replies accepted=1, unchanged.

Adds an XCE_TESTING-only send-hook mirroring ha_wal_ack_send_hook so
tests can observe the reply payload without a live endpoint.
This commit is contained in:
Rongsong Shen 2026-07-29 09:43:35 +00:00
parent ee7ede03c2
commit b7828eed4a
4 changed files with 148 additions and 13 deletions

View file

@ -7,7 +7,7 @@
- _Requirements: 7.4_
- [ ] 2. Core: configuration-push reply integrity
- [ ] 2.1 (P) Send an explicit accept/reject reply carrying term on every configuration push outcome
- [x] 2.1 (P) Send an explicit accept/reject reply carrying term on every configuration push outcome
- In `handle_repl_config_push`, construct and send `ReplConfigPushReply{accepted=0, term=current_term}` on each of the four reject early-returns (malformed request, missing bytes/sha256, sha256 mismatch, `conf_save_config` failure) instead of returning without a reply
- Populate `term` on the existing success reply path too
- Preserve the existing `-EAGAIN`-from-`config_activate_committed` behavior unchanged: that path still sends `accepted=1` (activation-deferred is not a rejection)