Add turn-start MCP and connector availability analytics - #31474
Draft
mzeng-openai wants to merge 1 commit into
Draft
Add turn-start MCP and connector availability analytics#31474mzeng-openai wants to merge 1 commit into
mzeng-openai wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
codex_turn_eventwith the generic MCP server names and connector identities exposed at turn startWhy
The connector-runtime RFC calls for distinguishing inventory availability from actual usage. Turn analytics currently reports MCP tool-call counts, so a zero cannot tell us whether no MCP/connector tools were available or whether available tools simply were not called.
RFC: https://app.notion.com/p/3818e50b62b081d28e88f9c3342d4d10
Payload
codex_turn_eventnow includes:turn_start_available_mcp_server_namesturn_start_available_mcp_server_names_truncatedturn_start_available_connectorsas{ connector_id, connector_name }turn_start_available_connectors_truncatedEach identity list is stably ordered, deduplicated, capped at 100 items and 16 KiB of serialized JSON, and accompanied by a truncation flag. The
codex_appsMCP server is represented through connector identities rather than as a generic server name.The snapshot represents post-policy exposure: model visibility, connector accessibility, app policy, and direct/deferred search gating have been applied. It intentionally precedes final router schema validation, tool-name collision resolution, and code-mode exclusions.
Validation
just test -p codex-analytics— 86 passedjust test -p codex-core defers_apps_and_non_app_mcp_toolsjust test -p codex-app-server --test all turn_start_tracks_thread_originator_in_analyticsjust fix -p codex-analyticsjust fix -p codex-corejust fix -p codex-app-serverjust fmtDraft status
Draft pending final cleanup around cumulative byte-budget test coverage and a few small reducer/test simplifications identified in the final review.