Skip to content

[Test] Add: deterministic concurrent-insert repair regression test #97

Description

@thep2p

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.rs alongside 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.left pointing 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 the CheckNeighborOp handler is an acceptable fallback.
  • README.md roadmap entry for join/repair moved from "Next" to "Implemented".

Depends On

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
    L3:                   #92
    L4 (acceptance gate): #97 <-- YOU ARE HERE

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions