docs(raft-adapter-conformance): document dormant AppendEntries sender + non-regression guard

ha_cb_send_append_entries_stub's doc-comment now plainly states it is
reachable only via raft_send_append_entries (zero production callers,
grep-confirmed), and names repl_broadcast/ha_stream_wal_to_standby as
the actual production send/retry/backoff mechanism (Req 3.3, amended
to permit this documentation-only resolution over retire-or-wire-in).

Adds an XCE_TESTING-only ha_send_append_entries_stub_call_count
counter, mirroring the ha_wal_ack_send_hook idiom, as the guard against
this ever silently regaining a production caller. Task 4.2 will drive
the real production path and assert it stays zero.

1063 -> 1064 tests, 0 failures. Zero behavior change to any production
send path.
This commit is contained in:
Rongsong Shen 2026-07-29 15:04:07 +00:00
parent 62db70d16d
commit 6d798df35d
4 changed files with 111 additions and 2 deletions

View file

@ -49,7 +49,7 @@
- _Depends: 3.1_
- [ ] 4. Core: document the dormant AppendEntries sender and guard it against silent regression
- [ ] 4.1 Record the production-authoritative send mechanism and add a non-regression guard
- [x] 4.1 Record the production-authoritative send mechanism and add a non-regression guard
- Extend the `on_send_append_entries` doc-comment (`ha.c`, the `ha_cb_send_append_entries_stub` callback) to state plainly that this callback is reachable only via `raft_send_append_entries`, which has no production caller, and that `repl_broadcast`/`ha_stream_wal_to_standby` are the actual production `AppendEntries`-equivalent send/retry/backoff mechanism
- Add an `XCE_TESTING`-only call counter to `ha_cb_send_append_entries_stub`
- Observable: the counter exists and is queryable from a test; the doc-comment names both the dormant path and the live substitute explicitly