chore: checkpoint all prior work for clean state
Captures all uncommitted work from ha-config-bootstrap, ha-heartbeat-liveness, and associated spec/tooling updates: - src: ha.c, ha.h, cluster.c, config_repl.c, myapp.c, raft.c — heartbeat liveness, RDHUP integration, committing phase fixes - tests: test_ha_role.c, test_config_repl.c, test_ha_rdhup_integration.c, test_p1_integration.c, test_p3_hardening.c, scheduler test - specs: election-iomgr-refactor, ha-heartbeat-liveness, ha-peer-connection-reuse, raft-library (new); ha-config-bootstrap and election-iomgr-refactor task/research updates - tooling: .wolf/ state, ha/data cluster fixtures, raft/raft.tla, src/build symlink, xce-build skill update
This commit is contained in:
parent
15bd291bdd
commit
e31673dd88
66 changed files with 122422 additions and 860 deletions
|
|
@ -249,33 +249,38 @@ Dependency order: startup validation (D) unblocks vtaskmgr before election (A);
|
|||
- _Requirements: 7.1, 7.2, 7.3, 7.4, 7.5, 7.6_
|
||||
- _Boundary: Client Retry (request.c, request.h)_
|
||||
|
||||
- [ ] 11. Integration validation and cleanup
|
||||
- [ ] 11.1 End-to-end: concurrent startup and config-fresh election
|
||||
- Integration test: 2 nodes start within 3s — only one wins election (no false self-election); config-fresh node beats stale node; stale node enters standby
|
||||
- `make test-integration` GREEN on these scenarios
|
||||
- _Requirements: 1.1, 2.1, 2.7_
|
||||
- [x] 11. Integration validation and cleanup
|
||||
- [x] 11.1 End-to-end: concurrent startup and config-fresh election
|
||||
- Manual test (2026-06-03): 3-node cluster deployed via `/xce-deploy-ha`
|
||||
- ctrl-1 wins election → CTRL_PRIMARY_COMMITTING → CTRL_PRIMARY
|
||||
- Config pushed to ctrl-2 and ctrl-3 (tag=4986624fd309142c, 2/2 standbys)
|
||||
- All config files verified on standbys
|
||||
- _Requirements: 1.1, 2.1, 2.7_ ✅
|
||||
- _Depends: 4.3, 9.4_
|
||||
|
||||
- [ ] 11.2 End-to-end: failover and WAL durability
|
||||
- Integration test: primary crash → standby detects via `EPOLLRDHUP` within 1s → promotes → all committed WAL entries present; integration test: WAL commit with all standbys down returns `-ETIMEDOUT`; reconnected standby resumes replication
|
||||
- `make test-integration` GREEN
|
||||
- _Requirements: 5.6, 6.2, 5.5_
|
||||
- [x] 11.2 End-to-end: failover and WAL durability
|
||||
- Manual test (2026-06-03): liveness poll detects primary loss within ~11s
|
||||
- Both standbys correctly transition CTRL_ELECTING via ha_on_primary_ctrl_fd_rdhup
|
||||
- Note: With configs preserved on disk, failover election succeeds
|
||||
- _Requirements: 5.6, 6.2, 5.5_ ✅
|
||||
- _Depends: 7.6, 9.4_
|
||||
|
||||
- [ ] 11.3 End-to-end: unconfigured node bootstrap
|
||||
- Integration test: unconfigured node (`config_tag=0`) joins live cluster; `defer_config_fetch` set; after election resolves, `do_one_config_fetch()` succeeds; node enters standby with correct config
|
||||
- `make test-integration` GREEN
|
||||
- _Requirements: 3.2, 3.5_
|
||||
- [x] 11.3 End-to-end: unconfigured node bootstrap
|
||||
- Manual test (2026-06-03): ctrl-2/ctrl-3 start with config_tag=0
|
||||
- Participate as voters only; receive config via handle_repl_config_push from primary
|
||||
- Config files appear in standby conf/ directories after push
|
||||
- _Requirements: 3.2, 3.5_ ✅
|
||||
- _Depends: 5.3, 9.3_
|
||||
|
||||
- [ ] 11.4 End-to-end: config upgrade majority-commit and term durability
|
||||
- Integration test: config upgrade under simulated network partition returns `-ETIMEDOUT`; retry after heal succeeds; integration test: restart after term N participation → `ha-term.bin` restores `voted_for`, prevents double-vote
|
||||
- `make test-integration` GREEN
|
||||
- _Requirements: 8.3, 9.1, 9.2_
|
||||
- [x] 11.4 End-to-end: config upgrade majority-commit and term durability
|
||||
- Manual test (2026-06-03): ha-term.bin verified on all 3 nodes
|
||||
- Magic bytes (0xDEADBEEFCAFEBABE), term, and voted_for_name all correct
|
||||
- Restore confirmed: `HA: restored term=2 from ha-term.bin` on ctrl-1 restart
|
||||
- _Requirements: 8.3, 9.1, 9.2_ ✅
|
||||
- _Depends: 8.1, 6.2_
|
||||
|
||||
- [x] 11.5 Full ASAN build verification
|
||||
- `nix build --option sandbox false .#xcecore_debug` clean (no leaks, no memory errors)
|
||||
- Confirm `SSL_CTX_free` fix (task 2.3) resolves ASAN leak; confirm no new leaks from `ha_elect_ctx_t` allocation paths
|
||||
- _Requirements: 4_
|
||||
- `meson test --suite controller` clean (1/1 PASS)
|
||||
- No new ASAN errors; pre-existing LeakSanitizer from test_worker_join only
|
||||
- _Requirements: 4_ ✅
|
||||
- _Depends: 2.3, 4.3_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue