test(raft-adapter-conformance): batch payload persist-failure propagation regression lock

Adds test_batch_payload_persist_failure_propagates_to_whole_batch,
proving persist_submit_job_payloads_async resolves every payload in a
3-entry batch with the same first-failure rc when the first payload's
append fails, rather than letting later payloads independently
succeed (Req 5.3).

Fault injection: chmod the WAL leaf directory to 0500 to force
open_new_segment's EACCES (surfaced as -EIO), restored the instant the
first failure is observed -- a transient fault, not a permanent one,
so the test genuinely distinguishes propagation from independent
per-payload failure. No existing fault hook was reachable from this
code path; this is a real, previously-uncovered gap.

1066 -> 1067 tests, 0 failures. Task 5 (regression-lock tests for
already-shipped/already-conformant behavior) now complete -- Core
phase of raft-adapter-conformance finished (tasks 1-5).
This commit is contained in:
Rongsong Shen 2026-07-30 03:20:22 +00:00
parent cb668adc7a
commit 396d90a85e
2 changed files with 178 additions and 1 deletions

View file

@ -70,7 +70,7 @@
- _Requirements: 2.1_
- _Boundary: test_ha_core_safety.c_
- [ ] 5.2 (P) Test that one failing payload in a submitted batch propagates to the whole batch
- [x] 5.2 (P) Test that one failing payload in a submitted batch propagates to the whole batch
- Add a test asserting `persist_submit_job_payloads_async` resolves every payload in a batch with the first failure's outcome when one payload fails to persist, rather than completing a subset
- Observable: new test in `test_commit_barrier_reply.c` fails if a future change lets a batch partially succeed
- _Requirements: 5.3_