HeddleAdmissionControl

constructor(heddle: FairShareExecution, costPerTask: Long = 1, costOf: (TaskDescriptor) -> Long = { costPerTask }, laneToLeaf: (Lane) -> GroupId? = { lane -> defaultLeafOf(lane) })

Parameters

heddle

the fair-share data plane whose holdings this adapter reserves against — the FairShareExecution surface shared by both front doors, so this accepts either a us.tractat.kuilt.heddle.heddleStatic node (no consensus) or an H5 us.tractat.kuilt.heddle.heddleGoverned node (governed) interchangeably. One asymmetry: a governed node must have enrolled itself before it will author any entitlement — until enroll(self) applies, its write gate is closed, so reserve returns null and schedule delegates nothing and this adapter admits no gated task (#1693, design §13.2).

costPerTask

service units reserved and charged per task. Defaults to 1 — the §14.4 "one unit per task" costing; a caller with variable-cost work supplies a per-descriptor cost via costOf.

costOf

per-task cost function; defaults to a flat costPerTask for every descriptor.

laneToLeaf

maps a task's Lane to the fair-share leaf GroupId to charge, or null to admit the task un-gated. The default treats Lane.ROOT as un-gated and every other tag as the identically-named leaf (Lane("acme/batch") → GroupId("acme/batch")).