MeshDisplacement

sealed interface MeshDisplacement

Something the mesh's duplicate-link dedup did that a consumer's own logger should be able to see.

kuilt-core is logger-free by contract, so a mesh takes an onDisplacement callback the way CompositeLoom takes onPlyFailure: the seam raises the event, the consumer records it. Both cases below are conditions, not faults — the mesh keeps working through either — but each is the only externally visible trace of a decision that moved a peer's frames between links, and OrderingHoldOverflowed in particular records a moment at which us.tractat.kuilt.core.Seam.incoming's send-order promise was deliberately traded for liveness (#2474).

Every field is an identity or a state, never a size alone: a count says that something happened, the identities say what.

Inheritors

Types

Link copied to clipboard

Which arm of the dedup produced the drained link.

Link copied to clipboard
data class Drained(val peer: PeerId, val arm: MeshDisplacement.Arm, val outcome: MeshDisplacement.Outcome, val framesDrained: Int) : MeshDisplacement

A displaced link finished draining and was disposed of.

Link copied to clipboard
data class OrderingHoldOverflowed(val peer: PeerId, val buffered: Int, val capacity: Int) : MeshDisplacement

The receiver ordering hold for peer hit capacity and released early, delivering out of send order for that peer rather than backpressuring.

Link copied to clipboard

How a drain ended — the field that says whether the mechanism worked or was backstopped.

Properties

Link copied to clipboard
abstract val peer: PeerId

The peer whose links were involved.