Report turn trigger and source in turn analytics (#42003)

## What changed

- Add `turn_trigger` and `codex_turn_source` to `codex_turn_event` analytics.
- Read the source from effective Responses metadata, preserving configured-over-client precedence and reflecting accepted steer metadata.
- Omit trigger and source values from analytics when they exceed the existing Responses metadata value limit.

## Testing

- Cover event serialization, turn lifecycle emission, configured and client source precedence, size limits, and source updates after steering.

GitOrigin-RevId: bbd45af4c6af52956d2394b722ea78e65e5b9bd7
This commit is contained in:
Eddie Chen authored and copyberry committed 2026-09-01 07:32:54 +00:00
1 parent e017e93ace
commit 2b7c279735
9 files changed
+172 -8

No files matched your search

+2
View File
@@ -3426,6 +3426,8 @@ fn codex_turn_event_params(
session_id: thread_metadata.session_id.clone(),
turn_id,
root_turn_id: turn_metadata.root_turn_id(),
turn_trigger: turn_metadata.turn_trigger(),
codex_turn_source: turn_metadata.codex_turn_source(),
app_server_client,
runtime,
submission_type,