What happens when a key lands on the exact same position as a node? The successor rule uses "at or after," so the node owns its own position. Today you pin that boundary down, the edge that decides whether the search is >= or >.
Confirm a key positioned exactly on a node is owned by that node.
The successor rule says “first node at or after the key,” and the at matters. When a
key’s position lands exactly on a node’s position, that node owns it - the search must
not skip to the next node. The cleanest way to land a key precisely on a node is to look
up a node’s own name: Pos("alpha") is alpha’s position by definition, so
Get("alpha") had better return alpha.
The three cases cover the boundary everywhere it can occur. gamma is the lowest
node (5130), alpha is in the middle (28075), and beta is the highest
(58567). The highest is the sharp one: if your predicate were strictly greater-than
rather than greater-or-equal, a key on beta’s position would find nothing at or after
it, wrap around, and wrongly return gamma. Getting all three right confirms the
inclusive >= boundary is what makes on-node keys behave.
// The successor search predicate is positions[i] >= kp.// When kp exactly equals a node position, that same index is// returned, so the node owns its own position - no wrap, no skip.// Get("beta") must find beta at the top position, not wrap to gamma.