From 0dbccf4b0a815b7c9b6870256dd5e4486f1f5663 Mon Sep 17 00:00:00 2001 From: Rongsong Shen Date: Sun, 21 Jun 2026 17:13:31 +0000 Subject: [PATCH] docs(raft-log-replication): validation GO notes + known 8.3-restart partial + adapter invariant --- .kiro/specs/raft-log-replication/tasks.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.kiro/specs/raft-log-replication/tasks.md b/.kiro/specs/raft-log-replication/tasks.md index 6d8f242..30e622d 100644 --- a/.kiro/specs/raft-log-replication/tasks.md +++ b/.kiro/specs/raft-log-replication/tasks.md @@ -197,3 +197,9 @@ - _Requirements: 1.1, 2.1, 3.2, 4.3, 5.1, 6.1, 7.1, 8.4_ - _Boundary: src/lib/raft, src/lib/testsuite_ - _Depends: 9.2, 9.3, 9.4_ + +## Implementation Notes + +- **Validation (2026-06-21): GO.** Clean ASAN build green from scratch (`xce-build.sh lib`, Fail 0); 8/8 requirement sections covered (40/41 acceptance criteria); boundary ALIGNED (no controller files; no commit advance / vote freshness / transport I/O / entry-bytes in library state); out-of-scope items confirmed absent. +- **Known minor gap — Req 8.3 "node restart while replication proceeds" (PARTIAL):** drop/dup/reorder are fully covered by 9.3, and the `initial_log_len` restore primitive is tested at init; 9.4's stale-rejoin covers the equivalent observable state. But no dedicated simulator test chains "restart a sim node mid-replication (re-init from restored log_len) then resume AE delivery" — the sim has no in-place single-node restart helper. Low risk; a follow-up could add a `raft_sim_restart_node` + test to close it strictly. +- **Adapter invariant (from validation LOW note):** the AE accept already-have branch treats `on_get_entry_term(index) == entry_term` as a match, which is also true when both are 0. A correct leader never sends `entry_term == 0` for a real entry (`raft_log_append` stamps `s->term >= 1`), so this is safe in-library — but the controller adapter (raft-commit-safety) MUST guarantee it never delivers `entry_term == 0` with `entries_len == 1`.