You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(copilot): use execution events for tool timing (#1290)
Copilot CLI records authoritative `tool.execution_start` and `tool.execution_complete` timestamps, but Session Analysis currently derives completed call duration from the next persisted message. Resuming a session hours later can therefore attribute the entire idle gap to the final tool call.
This change preserves Copilot execution boundaries as canonical tool-result events and uses paired start/completion timestamps for per-call timing in SQLite, PostgreSQL, and DuckDB. When every call in a turn has an authoritative completion boundary, the turn ends at the latest completion instead of the next user message; incomplete and unsupported providers retain the existing fallback behavior.
Blocked result categories continue to omit result content while retaining non-content execution metadata needed for timing. The parser data version advances so existing source-backed Copilot sessions are rebuilt with execution events. The Copilot format inventory records the observed event contract, and focused parser, ingestion, and timing regressions cover a completed blocked Read call followed by a 12-hour resumed-session gap.
The main review points are the result-event representation in `internal/parser/copilot.go`, blocked-content handling in `internal/sync/engine.go`, the fallback boundary rules in `internal/db/timing.go`, and storage-backend query parity.
Fixes#1288
Co-authored-by: Christina7 <Christina7@users.noreply.github.com>
0 commit comments