test(ha-commit-engine): RED integration tests for ACK feed and sync-append (task 5.1)

Tests 30-34: wired repl_on_ack feeds engine, membership mutators
trigger re-evaluation, per-entry sync-append contract (stale-ACK
rejection, committed_lsn unmoved on timeout, n_peers=1 replaces
-ENODEV). test_repl_majority walAck cases rewired to per-LSN
semantics (configAck byte-identical). Sanctioned scaffolding:
entry_lsn param on repl_wait_majority_ack (legacy body byte-identical,
callers pass 0), inert repl_set_commit_engine stub. 9 RED failures;
baseline signatures unchanged. LSN-0 edge documented for 5.2/5.3.
This commit is contained in:
Rongsong Shen 2026-06-11 23:09:05 +00:00
parent c9154bd5cc
commit d1353360cc
9 changed files with 512 additions and 79 deletions

View file

@ -910,3 +910,20 @@
| 2026-06-11 | ha-commit-engine task 4.2: replaced repl_active_standby_count -1 stub with registry-truth count (ep!=NULL && !in_catch_up under r->lock); added ha_state_t.repl back-pointer (ha.h); ha_has_write_quorum uses helper when wired, legacy standby_endpoints fallback when NULL; added wired gate test 29 (RED: Expected -10013 Was 0 → GREEN) | src/controller/repl.c, ha.c, ha.h, testsuite/test_commit_engine.c | 29 tests 0 failures; full census = exactly 3 bug-411 baseline failures unchanged | ~60k |
| 16:40 | Adversarial review ha-commit-engine task 4.2 (quorum-accounting fix): boundary clean, mutant run proves test 29 killing power (Expected -10013 Was 0), 29/29 group PASS, full census = exactly 3 bug-411 baseline failures, no sanitizer output — APPROVED | ha.c, ha.h, repl.c, test_commit_engine.c | approved | ~30k |
| 15:28 | Edited .kiro/specs/ha-commit-engine/tasks.md | inline fix | ~42 |
| 15:37 | Edited src/include/repl.h | modified void() | ~75 |
| 15:38 | Edited src/include/repl.h | expanded (+8 lines) | ~172 |
| 15:38 | Edited src/controller/repl.c | modified repl_wait_majority_ack() | ~130 |
| 15:38 | Edited src/controller/repl.c | modified repl_set_commit_engine() | ~150 |
| 15:38 | Edited src/controller/config_repl.c | 2→4 lines | ~73 |
| 15:38 | Edited src/controller/persist.c | 2→5 lines | ~99 |
| 15:38 | Edited src/controller/testsuite/test_repl_unit.c | 2→2 lines | ~27 |
| 15:39 | Edited src/controller/testsuite/test_repl_unit.c | 2→2 lines | ~30 |
| 15:39 | Edited src/controller/testsuite/test_commit_engine.c | added error handling | ~269 |
| 15:40 | Edited src/controller/testsuite/test_commit_engine.c | added error handling | ~3260 |
| 15:40 | Edited src/controller/testsuite/test_commit_engine.c | added error handling | ~96 |
| 15:40 | Edited src/controller/testsuite/test_commit_engine.c | expanded (+6 lines) | ~151 |
| 15:42 | Created src/controller/testsuite/test_repl_majority.c | — | ~2989 |
| 5.1-RED | ha-commit-engine task 5.1: RED tests for ACK feed + sync-append path; repl_wait_majority_ack gains entry_lsn param (legacy body byte-identical); inert repl_set_commit_engine stub | test_commit_engine.c, test_repl_majority.c, repl.h, repl.c, config_repl.c, persist.c, test_repl_unit.c | building | ~60k |
| 5.1-RED-done | RED captured: 9 new failures (4 commit_engine #30/31/33/34, 5 repl_majority walAck) + 3 baselines exact; build green; test 32 pins positive contract (green in RED by design) | census /tmp/census_final.log | ok | ~90k |
| 16:08 | Edited .kiro/specs/ha-commit-engine/tasks.md | inline fix | ~22 |
| 16:08 | Edited .kiro/specs/ha-commit-engine/tasks.md | modified hygiene() | ~517 |