Track voice session lifecycle metrics in the TUI (#43934)

## What changed

- Record voice session starts, connections, failures, endings, and active duration under `codex.voice.session.*`.
- Deduplicate failure accounting and distinguish errors during startup retry cleanup from errors during a requested stop.
- Record failures on rejected voice operations and disconnects, and clear the owned session when a stop request is rejected.

## Testing

Add regression tests for failure accounting during retry cleanup and session cleanup after rejected stop requests, including replay-only threads.

GitOrigin-RevId: d67cab5ff1e8fc85ce7a3d61a1763d38a5d537f0
This commit is contained in:
Benjamin Carlsson authored and copyberry committed 2026-09-08 22:21:01 +00:00
1 parent 5e3f0ee94b
commit fba22e9a2a
7 files changed
+140 -7

No files matched your search

@@ -3,6 +3,8 @@
#[path = "realtime/recording_controls_tests.rs"]
mod recording_controls_tests;
#[path = "realtime/session_metrics_tests.rs"]
mod session_metrics_tests;
use super::RealtimeConversationPhase;
use crate::app_command::AppCommand;