[improve][docs] Clarify SetLinkOp side flip - #101
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the concurrent-insert protocol spec to explicitly state that SetLinkOp.side flips to the receiver-owned mirror slot when confirming a GetLinkOp, aligning Stage 1 and change_neighbor with the existing Algorithm 8 (check_neighbor) correction behavior.
Changes:
- Clarifies in §3.2 step 8 that
SetLinkOp.sideisopposite(request.side)so the reply targets the receiver-owned slot inu’s table. - Updates §4.1
change_neighborpseudocode to useSetLinkOp{ side: opposite(side), ... }and adds an explanatory note referencing receiver-owned semantics and §6.2.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| node replies `SetLinkOp{ nonce, side: opposite(request.side), level: 0, linked: | ||
| Some(accepting_node's Identity) }` directly to `u`. `side` is receiver-owned (Section 2), so the |
There was a problem hiding this comment.
Fair on the notation — request was an undefined referent; switched to opposite(side) matching §4.1/§6.2's binding convention. Kept the flip itself, though: plain side is the ambiguity this PR exists to remove (it reads as echoing the request's side, which installs the reciprocal pointer in the wrong slot under receiver-owned semantics). The following sentence carries the definition.
Spec-only: make the receiver-owned side flip on SetLinkOp link confirmations explicit in §3.2 step 8 and §4's change_neighbor reply, matching the opposite(side) §6.2 already writes. Lands ahead of the handler issues (#91, #94, #95) reading these sections.