PolicyEdge

data class PolicyEdge(val record: AttachmentRecord, val summary: EdgeSummary, val demand: Demand, val gauge: Gauge?, val baseIssued: Long, val offsetTicks: Int128 = Int128.ZERO, val origin: Int128 = Int128.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 (offsetTicks).

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, offsetTicks: Int128 = Int128.ZERO, origin: Int128 = Int128.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 start, 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

scheduler-local forward clamp applied on wake so an idle child cannot bank a backlog of virtual time (design §7.2), in ticks of the edge's own service and wide (#3353). Zero for a child that never slept; computed on an idle→demand edge — FairShareAllocator detects that edge and carries the offset here (issue #1695), and a returner's shift only ever adds to it (#3376), 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. Non-negative.

Link copied to clipboard

deprecated, and zero from every engine since design §7.1 step B, where positions are absolute. 0.7.5 published it. A caller that sets it reads every position less ⌊origin · w · G⌋, as 0.7.5 did. Non-negative.

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).