Boot
What fromTopology booted: the engine, and what booting it did, in the shape a reload reports. ApplyResult.refusals is empty when the whole tree booted; otherwise it names every group left out, and heddle runs the rest.
Samples
val tree = draft("farm") {
group("builds") {
lane("fast")
lane("fine", Weight.of(1, 30_720))
}
lane("docs")
}
val (heddle, booted) = LocalHeddle.fromTopology(tree, LocalPolicy(defaultReservation = 3L), epoch = 0L)
val left = setOf(tree.groupId("builds"), tree.groupId("builds", "fast"), tree.groupId("builds", "fine"))
check(booted.refusals.map { it.child }.toSet() == left)
check(booted.refusals.all { it is StepRefusal.Refused })
// The rest of the tree runs.
heddle.reconcileCapacity(totalSlots = 1L)
val docs = tree.groupId("docs")
val lease = (heddle.acquire(setOf(docs), setOf(docs), startedAt = 0L) as AcquireOutcome.Acquired).lease
heddle.complete(lease.id, actualCost = 3L, waiting = emptySet())
// A tree whose weights fit brings `builds` back, as any reload would.
val fits = draft("farm") {
group("builds") {
lane("fast")
lane("fine", Weight.of(1, 30_000))
}
lane("docs")
}
check(heddle.apply(fits, generation = 1L).refusals.isEmpty())
val fast = fits.groupId("builds", "fast")
check(heddle.acquire(setOf(fast), setOf(fast), startedAt = 1L) is AcquireOutcome.Acquired)Content copied to clipboard
Properties
Link copied to clipboard
the engine, running every group result does not refuse.
Link copied to clipboard
the steps the boot applied, and one refusal per group it left out.