test(ha-commit-engine): RED tests for write-admission quorum counting (task 4.1)
Tests 21-28: repl_active_standby_count contract (5 RED vs inert -1 stub) + 3 gate-level pins (n_peers<=1 always-true, zero-connected reject, stateless re-accept) that 4.2 must preserve. Declaration in repl.h; ha.c/ha.h untouched (4.2 boundary). 28 tests / 5 RED; suite at the 3-failure baseline with unchanged signatures.
This commit is contained in:
parent
631a08939b
commit
b2598823c0
6 changed files with 322 additions and 3 deletions
|
|
@ -76,3 +76,5 @@
|
|||
- (2026-06-11, ha-convergence-recovery spec) `repl_complete_catchup` (repl.c:521) has NO production caller — `in_catch_up` is set by broadcast-overflow eviction (repl.c:240) and never cleared; re-inclusion trigger is wired by the ACK-driven catch-up continuation.
|
||||
- (2026-06-11) Scheduler-bound job egress has TWO seams, not one: full push `xcesched_push_jobs` (sched.c:169, on scheduler join) AND incremental JOB_NEW push `sched_job_new_fun`→`xcesched_push_joblist` (sched.c:236-248). Status reads (apiserver.c:83, opget.c:173) share `collect_jobs` (dataex.c:294) and must stay unfiltered per umbrella deviation.
|
||||
- (2026-06-11) No saved-argv/execv machinery exists anywhere in src/controller or src/lib — demotion self-restart is net-new; `job_t` is a thin wrapper `{ xce_job_t job; }` at src/include/xce/types.h:483-485 (controller-local fields go on the wrapper, wire type untouched).
|
||||
|
||||
- ha_has_write_quorum (ha.c:1507) is STATIC — testsuite reaches it only through ha_dispatch_gate(ha, opcode) (extern-declared in test files, pattern: test_ha_repl_ack.c). Gate fixtures: ha_init + n_peers + atomic role store + heap zarray standby_endpoints (test_ha_connection_reuse.c pattern). Catch-up exclusion at the gate is untestable until the ha_state_t.repl back-pointer lands (ha-commit-engine 4.2) — assert via repl_active_standby_count instead. (2026-06-11, task 4.1)
|
||||
|
|
|
|||
|
|
@ -892,3 +892,13 @@
|
|||
| 08:48 | Edited .kiro/specs/ha-commit-engine/tasks.md | inline fix | ~35 |
|
||||
| 08:48 | Edited .kiro/specs/ha-commit-engine/tasks.md | inline fix | ~43 |
|
||||
| 08:48 | Edited .kiro/specs/ha-commit-engine/tasks.md | 1→2 lines | ~229 |
|
||||
| 08:55 | Edited src/include/repl.h | added error handling | ~154 |
|
||||
| 08:56 | Edited src/controller/repl.c | modified repl_needs_snapshot() | ~244 |
|
||||
| 08:56 | Edited src/controller/testsuite/test_commit_engine.c | 10→15 lines | ~214 |
|
||||
| 08:56 | Edited src/controller/testsuite/test_commit_engine.c | expanded (+6 lines) | ~145 |
|
||||
| 08:57 | Edited src/controller/testsuite/test_commit_engine.c | added error handling | ~2974 |
|
||||
| 08:57 | Edited src/controller/testsuite/test_commit_engine.c | expanded (+9 lines) | ~255 |
|
||||
| 2026-06-11 | ha-commit-engine task 4.1: RED tests for write-admission quorum counting (tests 21-28 in test_commit_engine.c), repl_active_standby_count declared in repl.h + inert -1 stub in repl.c | src/controller/testsuite/test_commit_engine.c, src/include/repl.h, src/controller/repl.c | build green; 5 RED fails on assertions; baseline 3 failures unchanged | ~60k |
|
||||
| 16:20 | Adversarial review of ha-commit-engine task 4.1 (RED quorum tests): boundary clean, 5 RED + 3 pins verified, full census 8 fails (3 bug-411 + 5 RED), APPROVED | test_commit_engine.c, repl.h, repl.c | approved | ~25k |
|
||||
| 09:14 | Edited .kiro/specs/ha-commit-engine/tasks.md | inline fix | ~17 |
|
||||
| 09:15 | Edited .kiro/specs/ha-commit-engine/tasks.md | 1→2 lines | ~280 |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue