Flow Description
- A MesEvent (e.g., SCRAPPED with reason code DIM_OUT_OF_SPEC) arrives from the factory floor MES system
- The stream-processor joins the event with LineConfig, updates the running shift aggregate, and emits a ShiftAggregate if meaningful changes are detected
- The alarm-service receives the ShiftAggregate, evaluates all enabled alarm rules, and checks hysteresis state
- If an alarm fires (NORMAL→ACTIVE or CLEARED→ACTIVE), the alarm-service generates a SupervisorAlert with an LLM-enriched message (or fallback template)
- The SupervisorAlert is published to the
supervisor-alertstopic for the websocket-bridge to forward to the dashboard