test(raft-adapter-conformance): WAL catch-up reject reply-construction regression lock

Adds test_5_1_wal_catchup_reject_sends_nack_reply, driving a genuine
(term,lsn) conflict against a real persisted WAL entry through
ha_apply_term_entry_via_library and asserting
ha_send_wal_ack_reply_ex(success=0) fires via ha_wal_ack_send_hook.

Note: test_config_repl.c's test_bug1479_ae_reject_sends_nack_not_silence
already covers the same call site via a different (forward-gap)
stimulus, added in the original bug-1479 commit. design.md's own File
Structure Plan explicitly calls for this new test in this file
regardless, so this is disclosed, design-sanctioned defense-in-depth,
not accidental duplication -- both tests independently confirmed to
fail together when the reply call is removed.

1065 -> 1066 tests, 0 failures.
This commit is contained in:
Rongsong Shen 2026-07-29 16:11:47 +00:00
parent 87ce7be917
commit cb668adc7a
3 changed files with 116 additions and 1 deletions

View file

@ -64,7 +64,7 @@
- _Boundary: test_ha_core_safety.c_
- [ ] 5. Core: regression-lock tests for already-shipped reply and append behavior
- [ ] 5.1 (P) Test that a WAL catch-up rejection actually sends the reply on the wire
- [x] 5.1 (P) Test that a WAL catch-up rejection actually sends the reply on the wire
- Add a test asserting `ha_send_wal_ack_reply_ex(success=0)` is invoked (via the existing `ha_wal_ack_send_hook`) when a WAL catch-up entry is rejected, closing the reply-construction-boundary coverage gap that existed alongside the already-shipped bug-1479 fix
- Observable: new test in `test_ha_core_safety.c` fails if the reject branch is ever changed back to a silent drop
- _Requirements: 2.1_