Skip to content

[feat][node] Add join stage-1 orchestration and primary test - #139

Open
TheP2P (thep2p) wants to merge 1 commit into
thep2p/90-link-request-roundtripfrom
thep2p/90-join-stage1-orchestration
Open

TheP2P (thep2p) wants to merge 1 commit into
thep2p/90-link-request-roundtripfrom
thep2p/90-join-stage1-orchestration

Conversation

@thep2p

Copy link
Copy Markdown
Collaborator

Summary

  • Add join_stage1_link_level0, composing the three round-trip primitives from the earlier PRs in this stack: picks the search direction by comparing introducer.id() against this node's own id (Direction::Right when less, Direction::Left when greater, a typed error on collision), locates the search-resolved node and its neighbor, then sends the two GetLinkOp requests concurrently.
  • Update the design doc (Section 3.2) to describe both directional branches, replacing an earlier version that only covered introducer.id() < u.id() and, as written, would have silently corrupted the graph's sorted-order invariant when a joining node's id is smaller than its introducer's.
  • New primary test (test_join_stage1_link_level0_links_both_sides): the normal two-sided link case, asserting entries land on the correct side of this node's own table.

Part of #90's join stage-1 linking, split into a PR stack: the round-trip primitives (address, span-parentage, predecessor search, neighbor query, link request) are stacked as separate PRs below this one. Two more scenario tests (one-node-graph edge case, no-right-neighbor) plus a fourth (new-leftmost-node, covering the branch this PR's doc fix addresses) follow as small stacked PRs on top of this one.

Test plan

  • cargo fmt --check
  • cargo clippy --all-targets -- -D warnings
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test

@thep2p
TheP2P (thep2p) added this pull request to stack #143 September 14, 2026 20:23
@thep2p
TheP2P (thep2p) force-pushed the thep2p/90-join-stage1-orchestration branch from 0660fcc to ac3027e Compare September 15, 2026 17:27
@thep2p
TheP2P (thep2p) force-pushed the thep2p/90-join-stage1-orchestration branch from ac3027e to bba1f14 Compare September 15, 2026 17:50
@thep2p
TheP2P (thep2p) force-pushed the thep2p/90-join-stage1-orchestration branch from bba1f14 to e96013f Compare September 15, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant