Files
codex/codex-rs/analytics
reia-oai 14c8b7771a Attribute compaction analytics to the correct voice session (#51963)
## Why

Compaction analytics lack a voice session ID. A compaction event can arrive after its voice session has closed or another session has started, so attribution needs to account for when compaction began.

## What changed

Add `voice_session_id` to compaction events. Track realtime session starts, ID updates, and closures, retaining up to 16 recent closed session windows. Resolve the session from the compaction start timestamp, falling back to the turn's voice session ID.

Forward realtime session ID updates from the app server to analytics and update the active turn's attribution.

## Testing

Add coverage for realtime session boundary facts, compaction event serialization, and delayed compaction events across consecutive voice sessions.

GitOrigin-RevId: 981da0ea2c38a87079b6bab33daf2c88fd95160f
2026-10-08 05:29:11 +00:00
..