front

fun front(edges: List<PolicyEdge>, excluding: Set<AttachmentId> = emptySet()): Rational?

The parent's current virtual time — the front of the set of children competing under it right now (design §7.2, §7.3 step 2). This is the value a joiner is seated at, under one rule for both kinds of joiner: EntitlementLedger.seat writes it into a newborn's Gauge floor, and wakeOffset clamps a waking child up to it.

The set is the demanding candidates (isDemanding), not every ACTIVE child. The two differ the moment a sibling idles, and the difference has a fairness sign in both directions: with a runner at ev = 20 and an idler parked at 0 the all-ACTIVE mean is 10, so a newborn seated there starts half the runner's lifetime behind the front — the lifetime credit §10.5 forbids, and precisely the idle credit the §10.6 clamp denies the idler itself. Symmetrically, a sibling that is satisfied and ahead pulls the all-ACTIVE mean past the real front and the newborn takes an arbitrary penalty. The mean over the set the joiner will actually compete in is neutral by construction.

excluding names edges that must not count toward the front. Both kinds of joiner have to be named now (issue #1752): a waker is already ACTIVE and already demanding by the time the clamp is computed, and since the seat moved out of the record into the Gauge an unseated newborn is an ordinary ACTIVE edge too — reading from its own origin, which is the furthest back anything can read, so leaving it in would drag the front down to meet it and hand it exactly the lifetime credit the seat exists to deny. Co-joiners must be named for the same reason: two siblings joining together would otherwise average each other's origin-or-stale reading into the front and both keep it.

When nothing in the surviving set is demanding, the fallback is the maximum effective virtual service rather than the mean. §10.5 is one-directional — credit is forbidden, a sliver of penalty is merely undesirable — so the conservative choice is the bound that can only ever give up.

Not derivable from replicated state, by design — and no longer required to be. Demand ages out by local receive time and PolicyEdge.virtualOffset is deliberately not replicated, so two peers can and do compute different fronts. That used to be safe only by carriage: the finished record travelled in the log entry, one proposer's reading became everyone's permanent fact, and a proposer reading a partial view froze a wrong one for good (issue #1713). The seat now goes into the Gauge, whose join resolves by max on the floor rather than preserving the reading — so every peer that still sees the edge unseated may publish its own front and the readings converge instead of racing (issue #1752). A stale peer's low reading is absorbed; a peer that has seen more wins.

What that does not dissolve is intent divergence: two ungoverned HeddleNode.prepare calls supplying different weights still union to a divergent record set and starve the child. Drive a generation from one proposer for that reason — not for the seat's sake.

Return

the front, or null when no edge survives excluding and there is therefore no set to take a front of.

Parameters

edges

the parent's immediate children.

excluding

edges that must not count toward the front — the joiner, plus any co-joiners being seated in the same act.