reconcileOwn
Re-home this peer's own share of what child's retired inbound edges carried onto its live inbound edge, so a reweight of an internal group does not leave child's holdings negative (#3649). Each peer calls it for itself, as it calls schedule. Once every peer that spent through the old edge has, the ledger validates clean.
Why every peer can call it on its own: one writer per row. Every counter slot of the ledger is keyed by the replica that writes it, and on a static node that replica is its only writer: there is no control plane to write the relocation families. The move reads only self's base slots on the retired edges and writes only self-keyed slots: it drains self's slots on the old edges and credits self's relocation slots on the live one. Two peers' moves touch disjoint slots and join without conflict, in any order and across a partition, and no peer derives another's row from a gossip view of it. HeddleNodeReconcileOwnPropertyTest pins that on three peers.
Read, publish, then mark, in one locked section. Once the move is published, or found already made, the retired edges are marked locally unwritable, the mark the governed barrier uses. A reservation captured across one and completed afterwards then charges the live edge instead of the drained one. No completion can run between the read and the mark, because both hold the node lock. A refused move marks nothing.
A restart forgets the marks, and every reservation with them, so nothing left after it can charge a retired edge. What a restart can break is the read. A static node boots from its mint and recovers its own earlier writes by anti-entropy, so a restarted peer that calls this before they have come back reads stale finals and moves too little. The writes that arrive later sit on the drained edge and the ledger stays in conflict. This is the cross-incarnation gap of the relocation design, §6.5 residual 2, on the static path; HeddleNodeReconcileOwnTest pins what it leaves.
Every retired edge into child must hang off the live edge's parent, because a move conserves only within one parent; otherwise nothing moves and the answer is ReconcileOwnOutcome.CrossParent. Calling it again is harmless and answers ReconcileOwnOutcome.NothingToRepair.
GovernedHeddleNode does not expose this: there every relocation goes through the control log, with GovernedHeddleNode.reconcile.
Samples
when (val outcome = reconcileOwn(child)) {
// Moved: this peer's share of the old edges now rides the live edge.
is ReconcileOwnOutcome.Repaired -> "moved ${outcome.credit} credit and ${outcome.spent} spent onto ${outcome.onto.value}"
// This peer's row is already drained. Calling again is harmless.
ReconcileOwnOutcome.NothingToRepair -> "nothing of mine to move"
// The retire, or the new edge's activation, has not reached this peer yet. Call again later.
ReconcileOwnOutcome.NoRetiredEdge -> "no retired edge yet"
ReconcileOwnOutcome.NoLiveEdge -> "no live edge yet"
// The rest write nothing and do not clear by themselves: the tree needs an operator.
is ReconcileOwnOutcome.TwoLiveEdges -> "close all but one of ${outcome.edges.map { it.value }}"
is ReconcileOwnOutcome.CrossParent -> "retired edges hang off ${outcome.foreign.values.map { it.value }}, not ${outcome.liveParent.value}"
is ReconcileOwnOutcome.Refused -> "refused: ${outcome.reason}"
}