Expand description
Lifecycle triggers and the trigger set of every shipped policy. What: The lifecycle points at which policies run, which shipped policy runs at which point, and which points this executable can serve. Why: A policy runs only for the triggers it declares. A trigger whose lifecycle is not ported must be answered as “unavailable”, never as an empty result that would read as “checked and clean”.
In TS you’d write (pseudocode):
// type PolicyTrigger = 'pre-forward' | 'post-commit' | 'manual-push' | 'direct-check' | 'direct-fix';Enums§
- Trigger
- What:
One lifecycle point.
An
enumis a closed set of named alternatives.#[derive(...)]asks the compiler to generate copying (Clone,Copy), debug printing (Debug) and==(Eq,PartialEq). Why: The set is fixed by the event format, where each event names its trigger.
Functions§
- policy_
runs_ on - What:
Whether a policy declares a trigger.
boolis true or false. Why: The stage asks this once per policy before anything else. - policy_
triggers - What: The triggers a shipped policy declares, copied from the incumbent definitions. Why: The engine skips a policy at every other lifecycle point, exactly as the incumbent’s stage did.
- trigger_
is_ ported - What: Whether this executable implements the lifecycle a trigger belongs to. Why: Every lifecycle is ported: the exhaustive match below answers true for each variant, and a new variant fails to compile until it is answered here. The engine still checks this before running a lifecycle, so a future unported variant gets a typed “unavailable” instead of running zero policies and looking clean.
- trigger_
name - What:
The wire spelling of a trigger.
&'static stris text baked into the program for its whole run (siblingStringwould be an owned copy). Why: Events print exactly the spellings the incumbent emitted.