Runtime Guide¶
Guide Maps¶
graph LR
source["MetricSource"] --> runtime["MonitoringRuntime"]
runtime --> aggregate["MonitoringPolicy"]
runtime --> sink["IncidentSink"]
runtime --> projections["Read models and projections"]
flowchart LR
question["What is the runtime coordinating?"] --> cycle["Read one cycle path"]
cycle --> owner["Separate coordination from authority"]
owner --> proof["Check runtime tests or tour output"]
Use this guide when the capstone's runtime feels like a vague middle layer. The goal is to show exactly what orchestration the runtime owns and what must still remain outside it.
What the runtime owns¶
- loading the aggregate through the repository and unit of work
- asking the aggregate to evaluate or change lifecycle state
- publishing alerts through the incident sink
- applying emitted events to projections and read models
- returning learner-facing cycle summaries
What the runtime must not own¶
- deciding whether a lifecycle transition is legal
- hiding evaluation behavior that belongs to policy objects
- treating projections as authoritative domain state
- redefining persistence semantics that belong to the repository boundary
Best code route¶
MonitoringRuntime.register_policyMonitoringRuntime.activate_ruleMonitoringRuntime.retire_ruleMonitoringRuntime.run_cycleMonitoringRuntime.snapshot
Best companion proofs¶
tests/test_runtime.pyfor orchestration and rollback behaviorTOUR.mdfor the human-facing story of one runtime cycleEVENT_FLOW_GUIDE.mdfor the projection handoff after the runtime receives events