Track image preparation details in turn analytics (#36388)

## What changed

- Record the effective detail setting and source and prepared dimensions for
  successfully decoded images.
- Associate message images with their role and tool-output images with their
  originating call ID.
- Include the collected image preparation metadata in the corresponding turn
  analytics event.

## Testing

- Cover image resize metadata, tool-output attribution, turn aggregation, event
  serialization, and app-server analytics output.

GitOrigin-RevId: dbfb5ba1ce7cb02dd93d9b579c5109817f16aef5
This commit is contained in:
Curtis 'Fjord' Hawthorne authored and copyberry committed 2026-07-31 20:34:41 +00:00
1 parent bf7804c254
commit 1bef168976
13 files changed
+315 -29

No files matched your search

+2
View File
@@ -13,6 +13,7 @@ use crate::facts::CompactionStrategy;
use crate::facts::CompactionTrigger;
use crate::facts::GoalEventKind;
use crate::facts::HookRunFact;
use crate::facts::ImagePreparationMetadata;
use crate::facts::InvocationType;
use crate::facts::PluginInstallRequested;
use crate::facts::PluginState;
@@ -895,6 +896,7 @@ pub(crate) struct CodexTurnEventParams {
pub(crate) personality: Option<String>,
pub(crate) workspace_kind: Option<String>,
pub(crate) num_input_images: usize,
pub(crate) image_preparations: Vec<ImagePreparationMetadata>,
pub(crate) is_first_turn: bool,
pub(crate) status: Option<TurnStatus>,
/// Client wall-clock time for the first non-startup turn/interrupt request