Enrich thread archive analytics with thread context (#39797)

## What changed

- Add app-server client, runtime, thread source, and parent thread ID metadata to archive and unarchive analytics events when the reducer has that context.
- Omit non-automation feature thread sources and skip unavailable metadata.

## Testing

- Cover archive and unarchive event enrichment, filtered feature sources, and threads without cached context.
- Verify the app-server archive flow emits the enriched analytics payload.

GitOrigin-RevId: 163f9c30721cee0172bb4581b6dcd269e44cd941
This commit is contained in:
Eddie Chen authored and copyberry committed 2026-08-20 20:44:31 +00:00
1 parent d9fd91edab
commit cc801d7048
5 files changed
+198 -12

No files matched your search

+4
View File
@@ -448,6 +448,10 @@ async fn api_key_auth_sends_only_plugin_events_to_codex_backend() {
thread_id: "non-plugin-thread-archive".to_string(),
action: ThreadArchiveAction::Archived,
occurred_at_ms: 1,
app_server_client: None,
runtime: None,
thread_source: None,
parent_thread_id: None,
},
}),
sample_plugin_used_track_event("plugin-used", Some("sample@test")),