test(ha-commit-engine): RED tests for per-LSN majority evaluation (task 1.1)

commit.h umbrella-verbatim interface + inert stub commit.c (test target
only); 7 Unity tests covering per-LSN vs acked_lsn>0 counting, majority
median, monotonicity, append clamp, lagging standby, RETAIN immediacy.
All 7 fail RED as intended. Documented 3 pre-existing masked suite
failures (bug-411) and the per-group exit-code masking root cause.
This commit is contained in:
Rongsong Shen 2026-06-11 14:17:09 +00:00
parent 06135954ff
commit d5a0f9c64d
10 changed files with 757 additions and 283 deletions

View file

@ -1,7 +1,7 @@
# anatomy.md
> Auto-maintained by OpenWolf. Last scanned: 2026-06-11T13:00:00.755Z
> Files: 506 tracked | Anatomy hits: 0 | Misses: 0
> Auto-maintained by OpenWolf. Last scanned: 2026-06-11T14:16:52.677Z
> Files: 511 tracked | Anatomy hits: 0 | Misses: 0
## ./
@ -262,7 +262,7 @@
- `requirements.md` — Requirements Document (~2715 tok)
- `research.md` — Research Log: ha-commit-engine (~1345 tok)
- `spec.json` (~140 tok)
- `tasks.md` — Implementation Plan: ha-commit-engine (~2682 tok)
- `tasks.md` — Implementation Plan: ha-commit-engine (~2947 tok)
## .kiro/specs/ha-config-bootstrap/
@ -703,3 +703,17 @@
- `6664f5dc160a6acfc03af4d9881c53f8f6c650ac384b1ad9b3db47d896800af9.json` (~656 tok)
- `669931b38fdf0060e974d68dd28abc43e49a1907405848ce9d8b3b3901518313.json` (~376 tok)
- `66cc2d1ad85554725cecb1f215d375511474a58829464647a0d8c109818d9804.json` (~57 tok)
## src/controller/
- `commit.c` — STUB commit engine (ha-commit-engine task 1.1 RED): init/fini real, commit_submit -ENOSYS, commit_on_ack no-op; real impl in task 1.2 (~474 tok)
- `meson.build` (~1094 tok)
## src/controller/include/
- `commit.h` — commit engine service interface (umbrella-verbatim): commit_engine_t, WAIT/RETAIN modes, init/fini/submit/on_ack/set_writable_lsn/on_membership_change (~771 tok)
## src/controller/testsuite/
- `controller_test.c` — include <argp.h> (~1323 tok)
- `test_commit_engine.c` — RED tests for per-LSN majority + commit-index integrity (Reqs 1.2, 2.1-2.3, 5.1): 7 cases against stub persist_t+replicator_t (~2459 tok)