Skip to content

[Node] Add: link/relink-decision handlers to Core #94

Closed

Description

@thep2p

Summary

Add two pure-local Core methods on BaseCore (src/node/core.rs) that wrap the lookup-table primitives for message handling: a link-decision method wrapping try_link (backs GetLinkOp and BuddyOp-match handling) and a relink-decision method wrapping try_relink (backs CheckNeighborOp handling). Network-agnostic, mirroring search_by_id. See docs/protocol/concurrent-insert.md, Section 9 (Core surface) and Section 4.3 (the wrapped primitives' outcome types).

Files

  • src/node/core.rs — two new Core trait methods on BaseCore.
  • src/node/core_test.rs — pure-local unit tests (no mock network).

Acceptance Criteria

  • The link-decision method returns the same LinkOutcome try_link would produce for the given (level, direction, candidate).
  • The relink-decision method returns the same RelinkOutcome try_relink would produce for the given (level, direction, claimant).
  • Both are thin wrappers — no lock logic duplicated; try_link/try_relink remain the only place a table entry is written.

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 <-- YOU ARE HERE  #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
    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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions