7.4 The Boot and On-Demand Paths

The two ways a graph gets built differ in more than scope, and the differences are worth having in one place.

BootOn-demand
MembersEvery boot-triggered root plus its closureOne requested service plus its closure
A missing hard-dependency targetBlocks the dependent, in Full mode onlyBlocks the dependent
A disabled hard-dependency targetBlocks the dependentStarts it
A validation findingThe service is failed, others continueThe start fails
Multiple findings on one serviceOnly the highest-precedence one is reported
ConflictsTwo boot-triggered conflicting services fail bothThe conflicting service is evicted
ContextOne boot contextOne context per explicit start
Failure of the whole buildRecovery modeAn error to the caller

7.4.1 Where a definition error lands #

The three places a bad definition can be caught behave differently, and which one catches it depends on what kind of wrong it is:

  • Decoding. A definition that does not parse — an invalid name, a malformed trigger, an unclosed quote, a registry: check naming an uncacheable key, a duplicate field — is caught when the registry is read. At boot it fails that service with ValidationError and the rest continue; on a reload it rejects the whole reload (§3.2).
  • Graph validation. A definition that parses but does not fit — a cycle, a missing target, a flap-constraint violation, an invalid calendar expression — is caught here, and fails that service at boot or the whole reload on a reload-config (§7.2).
  • Start. A definition that parses and fits but whose preconditions do not hold — a failed assert, an unresolvable identity, a missing binary — is caught when the service actually starts, and fails that activation (§5.2, §5.3).

The dividing line between the first two is whether the problem is visible in one definition on its own. Decoding sees one key at a time; validation is the first place that can see two definitions together.

Edit this page