Classify MCP auth and approval outcomes in analytics (#45716)

## What changed

- Record `auth_or_link` for Codex app calls with trusted connector authentication failure metadata, capturing it before result callbacks or model-facing rewrites. Propagate the classification to MCP tool-call and app-usage analytics.
- Record `approval` when a dispatched approval request is denied, times out, or aborts, covering both MCP elicitation and legacy user-input approvals.

## Testing

Add unit and turn-level coverage for authentication failures, metadata removal by callbacks, successful and rejected approvals, and closed approval response channels. Verify event counts, classification, and exclusion of sensitive test values and authentication URLs from analytics payloads.

GitOrigin-RevId: 493df2a2923f346a0f644f1f26ab8b6b9b8888e0
This commit is contained in:
priyanshusingh-de authored and copyberry committed 2026-09-15 15:03:29 +00:00
1 parent 2fdcdeaf0e
commit 7784318b5f
6 files changed
+618 -120

No files matched your search

+1
View File
@@ -15,6 +15,7 @@ workspace = true
anyhow = { workspace = true }
assert_cmd = { workspace = true }
base64 = { workspace = true }
codex-analytics = { workspace = true }
codex-arg0 = { workspace = true }
codex-attachment-store = { workspace = true }
codex-config = { workspace = true }