fix(#1179): normalize bash-task-* wake_from at write time

This commit is contained in:
damocles 2026-06-03 21:13:31 +02:00 committed by mara
commit 8af06aefdb
2 changed files with 6 additions and 6 deletions

View file

@ -69,6 +69,11 @@ pub fn build_row(
TurnOutcome::AuthFailed => ("auth_failed", None),
TurnOutcome::Failed(e) => ("failed", Some(format!("{e:#}"))),
};
let wake_from = if wake_from.starts_with("bash-task-") {
"bash-task".to_owned()
} else {
wake_from
};
TurnStatRow {
started_at,
ended_at,

View file

@ -245,12 +245,7 @@ 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));
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;
*wake_totals.entry(r.wake_from).or_insert(0) += 1;
*result_totals.entry(r.result_kind).or_insert(0) += 1;
model_set.insert(r.model);