PolicyEdge

data class PolicyEdge(val record: AttachmentRecord, val summary: EdgeSummary, val demand: Demand, val gauge: Gauge?, val baseIssued: Long, val virtualOffset: Rational = Rational.ZERO)

One immediate child, as the policy sees it: the immutable attachment metadata (record — parent, child and weight), the parent-facing accounting (summary — issued/returned/spent), the child's advertised demand, the replicated virtual-time seat (gauge paired with baseIssued), and the scheduler-local wake clamp (virtualOffset).

The record and summary must describe the same edge; HeddlePolicy rejects a mismatch rather than schedule against inconsistent inputs.

Constructors

Link copied to clipboard
constructor(record: AttachmentRecord, summary: EdgeSummary, demand: Demand, gauge: Gauge?, baseIssued: Long, virtualOffset: Rational = Rational.ZERO)

Properties

Link copied to clipboard

the edge's base issuance — the Gauge's fold axis, and deliberately not EdgeSummary.issued, which is the effective value and adds relocation credit. Reading the effective value here would make a relocation-receiving edge appear to have consumed its whole re-homed strand the instant it arrived (issue #1752, F2); it is also what makes the seat arrival-order independent. Necessarily 0 ≤ baseIssued ≤ summary.issued.

Link copied to clipboard

how much more the child could usefully take (design §6).

Link copied to clipboard
val gauge: Gauge?

the edge's replicated virtual-time seat, or null when nothing has seated it yet — in which case the edge reads from its own origin, exactly as an unseated edge should. Absence is meaningful (it is the seat-bump predicate, see EntitlementLedger.seat), so it is a required parameter: a caller assembling a policy input has to say which it holds.

Link copied to clipboard

the edge's parent, child and weight (design §7.1).

Link copied to clipboard

the edge's cumulative issued/returned/spent (design §4.5).

Link copied to clipboard

scheduler-local forward clamp applied on wake so an idle child cannot bank a backlog of virtual time (design §7.2). ZERO for a child that never slept; computed by HeddlePolicy.wakeOffset on an idle→demand edge — HeddleNode detects that edge and carries the offset here (issue #1695), joining each new value with the one already stored so a re-wake into a lower front can never refund an earlier clamp (issue #1714). Deliberately not replicated — divergent offsets reorder locally but never touch conservation.