handle_report_host_counts

Function handle_report_host_counts 

Source
fn handle_report_host_counts(
    state: &mut State,
    host_windows: u32,
    host_pool: u32,
) -> Vec<Event>
Expand description

Phase B.4 follow-up — drift check. Compares host-reported counts to launcher mirror counts; emits DriftDetected for each disagreeing dimension. Returns [] when both counts match (the happy path; mirrors are in sync).

Two events possible (windows + pool) when both diverge in the same report — emitted in a stable order (windows first) so test assertions don’t depend on HashSet iteration order.