Skip to main content

Module lifecycle

Module lifecycle 

Source
Expand description

Lifecycle event vocabulary: the kind-tag lifecycle::EventType and its lifecycle::SubjectKind, shared by the readout binder and the checkpoint log. Lifecycle event vocabulary — the kind-tag [EventType] plus its [SubjectKind].

[EventType] names the lifecycle slot that triggered a render (on_phase_end, on_update, …); [SubjectKind] names what kind of subject the firing context represents (session / phase / iteration / scope). Together they are the shared lifecycle vocabulary used by the readout binder (to validate and dispatch readouts) and by the checkpoint log (to tie a durable data record to its lifecycle kind-tag).

See SRD-63 §4.1. Two kinds of events exist:

  • Lifecycle events — fire exactly once per (slot, subject). _start and _end are delaminated; nothing fires twice for the same subject under one slot.
  • Refresh events — fire repeatedly while the subject is in flight. Currently only [EventType::Update].

Push 2 wires Update and PhaseEnd through the activity pipeline; the remaining variants are reachable from Push 3 onward as the workload-side readouts: parser maps slot names to events and Push 4 wires wildcard binding to cover scope and session lifecycles.

Enums§

EventType
SubjectKind
What kind of subject a context (and a render) is scoped to. Determined by the firing event and the surface that built the context. Builtins declare which kinds they accept; the binder validates at bake-time.