fix(#1179): coalesce bash-task-* wake sources in stats

This commit is contained in:
damocles 2026-06-03 21:11:16 +02:00 committed by mara
commit 3ccfc647f7

View file

@ -245,7 +245,12 @@ fn snapshot(path: &Path, window: Window) -> Result<Snapshot> {
*acc.model_counts.entry(r.model.clone()).or_insert(0) += 1;
all_durations.push(r.duration_ms.max(0));
*wake_totals.entry(r.wake_from).or_insert(0) += 1;
let wake_key = if r.wake_from.starts_with("bash-task-") {
"bash-task".to_owned()
} else {
r.wake_from
};
*wake_totals.entry(wake_key).or_insert(0) += 1;
*result_totals.entry(r.result_kind).or_insert(0) += 1;
model_set.insert(r.model);