Files
codex/codex-rs/analytics
Ahmed Ibrahim a0219c2eb9 Track turn timing in ChatGPT telemetry (#24144)
## Why
This is the turn-specific slice of the ChatGPT telemetry stack. We want
per-turn timing that breaks total turn time into request-start delay,
sampling time, and blocking tool critical path, while keeping approval
wait attributable to the turn without mixing in app-server or thread
startup costs.

## What changed
- extend `TurnTimingState` in `codex-rs/core` to accumulate
request-start delay, sampling duration, and blocking-tool critical-path
duration across a turn
- emit a `TurnTimingBreakdownFact` at turn completion and attach it to
`codex_turn_event`
- roll review durations into `approval_wait_duration_ms` and derive
`finalize_duration_ms` as the remainder after request start, sampling,
and blocking tool time
- add reducer and timing-state coverage for the new turn timing fields
and approval roll-up

## Verification
- `cargo check -p codex-analytics -p codex-app-server -p codex-core`
- `just fix -p codex-analytics -p codex-core`
2026-05-27 12:01:37 -07:00
..