EdgeSummary

@Serializable
data class EdgeSummary(val attachment: AttachmentId, val issued: Long, val returned: Long, val spent: Long)

The parent-facing view of one edge — everything a parent needs to schedule a child, and deliberately nothing more. It exposes how much entitlement was issued down the edge, how much was returned, and how much service was spent through it; the child's queues, identities, placement, and leaf receipts are simply not in this projection. Information hiding here is a hard interface boundary, not a convention (design §4.5).

spent is the total service charged through the edge — the sum of service charged where the edge is a path's final edge and where it is a strict prefix.

Every figure is an effective value: the grow-only base counter plus any relocation recorded against it (see EntitlementLedger's "relocation counters"). So an edge that received a re-homed generation reports the credit it now carries, and one whose generation was moved away reports itself drained — without any counter ever having been decremented.

The projection is a merge homomorphism: because the ledger merges per-edge, componentwise, reading one edge's summary from a merged ledger equals merging the two edges' summaries (design §10.8).

Constructors

Link copied to clipboard
constructor(attachment: AttachmentId, issued: Long, returned: Long, spent: Long)

Properties

Link copied to clipboard

which edge this summarizes.

Link copied to clipboard

Entitlement committed to the child, spent or not: issued − returned.

Link copied to clipboard

cumulative entitlement delegated down across the edge.

Link copied to clipboard

Entitlement still live on the edge: issued − returned − spent. May be zero or (transiently) negative.

Link copied to clipboard

cumulative entitlement handed back up across the edge.

Link copied to clipboard
val spent: Long

cumulative service charged through the edge (leaf + roll-up).