Repository navigation
[Test] Add: deterministic concurrent-insert repair regression test #97
Copy link
Copy link
Open
Description
Summary
The concurrent-insert epic's acceptance test: reproduce the exact 4-node adversarial interleaving that leaves two stale backpointers, then verify one repair round heals it. Setup and message ordering: docs/protocol/concurrent-insert.md, Section 7.
Scope
- New sibling
*_test.rsalongside the join/repair logic (this crate's colocated test convention). README.md— update the roadmap to reflect join + repair as implemented.
Acceptance Criteria
- Direct sequential calls through the mock network (synchronous/recursive dispatch), not
std::thread::spawn— no timing assumptions. - Assertion 1: the transient stale state (
B.right/C.leftpointing past each other) is reachable under the exact ordering in Section 7. - Assertion 2: one repair round heals it into the fully-reciprocal A–B–C–D chain. Per Section 7, prefer exercising the real spawned repair task via the test
RepairSchedule, firing one tick and awaiting completion under a bounded timeout; a direct call to theCheckNeighborOphandler is an acceptable fallback. README.mdroadmap entry for join/repair moved from "Next" to "Implemented".
Depends On
- [Network] Add: join/repair Event variants and payload structs #84 — join/repair message catalogue
- [Core] Add try_link: atomic accept-or-forward slot decision #85 — try_link primitive
- [Core] Add try_relink: single-lock repair primitive for LookupTable #93 — try_relink primitive
- [Node] Add: prefix-match and max-level queries to Core #86 — prefix-match and max-level queries
- [Node] Add: RepairSchedule trait abstracting repair-tick waits #87 — RepairSchedule abstraction
- [Node] Add: link/relink-decision handlers to Core #94 — link/relink-decision handlers
- [Node] Generalize request correlation: add Phase 0 join bootstrap #88 — request correlation and join bootstrap
- [Node] Implement: periodic backpointer repair sweep #89 — periodic backpointer repair sweep
- [Node] Implement: level-0 join linking (Phase 1) #90 — Stage-1 level-0 join linking
- [Node] Wire: max-level, neighbor, and set-link event handlers #91 — max-level/neighbor/set-link event handlers
- [Node] Wire: GetLinkOp and BuddyOp event handlers #95 — GetLinkOp and BuddyOp event handlers
- [Node] Wire: CheckNeighborOp repair handler #96 — CheckNeighborOp repair handler
- [Node] Implement: Stage-2 join and join entry point #92 — Stage-2 join and join entry point
- [Node] Fix: skip a wrong-side neighbor in join stage 1 #148 (skip a wrong-side neighbor in join stage 1)
Dependency graph (unblocked first):
EPIC #81 -- local search & join protocol
#67 [DONE] search_by_id #71 [OPEN] search_by_mem_vec (independent)
#74 [OPEN] search_by_id timeout fix #76 [OPEN] delete/leave
Concurrent join + repair (Algorithm 2 + Algorithm 8; supersedes closed #66, #77):
L0 (no deps): #84 #85 #93 #86 #87
L1: #94 #88 #89
L2: #90 #91 #95 #96
L2.5 (link round-trip follow-ups; #146 blocks #92): #145 #146
L2.5 (stage-1 concurrent-join fix; blocked by #90, blocks #97): #148
L3: #92
L4 (acceptance gate): #97 <-- YOU ARE HERE
L5 (post-gate cleanup; also blocked by #76): #100
Test-suite cleanup, blocked by #90:
#147
Test infrastructure, mock network hub (#62's latency simulation builds on #149's queue):
#149 (blocked by #90, blocks nothing)
#62 (no blocker)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity