MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / from_events

Method from_events

atomic-agent/src/hook_health.rs:134–140  ·  view source on GitHub ↗

Build a report from observations, including out-of-order outage replay.

(events: Vec<crate::hook_log::SessionLogEvent>)

Source from the content-addressed store, hash-verified

132
133 /// Build a report from observations, including out-of-order outage replay.
134 pub fn from_events(events: Vec<crate::hook_log::SessionLogEvent>) -> Option<Self> {
135 let mut report = Self::empty(&events.first()?.at);
136 for event in events {
137 report.record_event(&event);
138 }
139 Some(report)
140 }
141
142 /// Incremental projection, safe for pages and older events replayed after
143 /// an outage. Only a success in the same session can heal that session.

Callers

nothing calls this directly

Calls 1

record_eventMethod · 0.80

Tested by

no test coverage detected