Repository navigation
[test][node] Cover join stage-1 becoming the new leftmost node - #142
Conversation
fe11b97 to
f26479b
Compare
f26479b to
14e3226
Compare
14e3226 to
63378d8
Compare
63378d8 to
554f4d7
Compare
554f4d7 to
8096337
Compare
753eed7 to
74709d3
Compare
74709d3 to
afe9cb3
Compare
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The test accurately covers the intended edge case, and the documentation matches the implementation.
Review effort: Balanced
Findings: None
What changed in this PR
Adds coverage for stage-1 joining when the node becomes the new leftmost node and documents the search-direction invariant.
Changes:
- Tests the leftward search and single-link-request path.
- Documents requirements for safe search fallback behavior.
| File | Description |
|---|---|
src/node/base_node.rs |
Adds the new-leftmost-node join test. |
src/node/core.rs |
Clarifies the directional search invariant. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@claude review |
|
Claude finished @thep2p's task —— View job Review: PR #142 — join stage-1 new leftmost node test
Verdict: Approve. The test is correct, a faithful mirror of the existing no-right-neighbor test, and the two carried-over fixes are sound. Test correctness (
|
There was a problem hiding this comment.
Test is correct and a faithful mirror of the existing no-right-neighbor test. Traced every assertion against join_stage1_link_level0: direction selection (introducer > own_id -> Left), the GetLinkOp dir=Left proposal for z's left slot, and the SetLinkOp mirror landing z on this node's right slot all line up, matching 'u becomes the new leftmost node'. The added req.dir assertion is a nice improvement over the sibling test. The core.rs doc fixes (fallback wording + direction-selection invariant paragraph) are accurate and behavior-preserving. Verified by inspection; CI covers fmt/clippy/test/doc.
Summary
This completes #90's required test coverage: normal two-sided link, one-node-graph edge case, and no-known-neighbor (both sides) are now all covered.
Test plan