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
{{ message }}
Repository navigation
bug(agent): the #1083 result callback envelope carries no finish time, so a late-delivered terminal records the delivery time as completed_at #3628
Follow-up of #3589. The backend now accepts completed_at on the result-callback contract (ExecutionResultEnvelope.completed_at) and both terminal writers measure duration_ms to it. The agent never sends it: result_callback._success_envelope / _envelope_from_http_exception / _cancelled_override (docker/base-image/agent_server/services/result_callback.py) carry no finish timestamp, and the callback POST is retried with capped backoff up to the slot-lease deadline and re-sent by the startup sweep after a crash. On every such late delivery the row's completed_at is the delivery time and duration_ms includes the whole retry window — the same fabricated-duration shape #3589 fixed on the watchdog claim path.
Expected
The agent stamps completed_at (ISO, UTC) into every callback envelope at the moment the turn ends (next to terminal_reason), so a terminal that reaches the backend hours later still records the turn's own duration. Backend side is already in place (#3589): unknown/absent → the writer stamps now, so an older image keeps today's behaviour.
docker/base-image/agent_server/services/retained_results.py — the retained record already carries retained_at; the callback envelope should carry the same instant
Activity