Problem
Clock-skewed transcripts (ended_at < started_at) produce negative durations rendered as e.g. -5s and summed into stats totals.
Where
agentrace/parse.py (duration_s, no floor) + agentrace/cli.py (unconditional sum).
Acceptance
Add a failing test first asserting negative durations are clamped/None and excluded from totals. Then fix.
Problem
Clock-skewed transcripts (
ended_at < started_at) produce negative durations rendered as e.g.-5sand summed into stats totals.Where
agentrace/parse.py(duration_s, no floor) +agentrace/cli.py(unconditional sum).Acceptance
Add a failing test first asserting negative durations are clamped/
Noneand excluded from totals. Then fix.