Prepare selected capability runtime snapshots#29943
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70e6930d9b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let selected_capabilities = activation.snapshot().selected_capabilities().clone(); | ||
| let connector_snapshot = self | ||
| .snapshot_for_selected_capabilities(&selected_capabilities, cache.as_ref()) | ||
| .await; | ||
| connector_state.publish(connector_snapshot); |
There was a problem hiding this comment.
Expose activation snapshots to connector consumers
When a thread is initialized with SelectedCapabilityActivation, this path only publishes the computed connectors into ConnectorSnapshotState; the existing runtime still reads ConnectorSnapshot from ExtensionDataInit in core/src/mcp.rs (connector_snapshot_for_thread and the selected-MCP routing check). In that activation mode the selected connector declarations are therefore invisible to tool construction and hosted-app routing even though they were resolved here, so selected plugin apps will be omitted or routed as standalone MCP servers until the active snapshot is stored in the type consumers actually read (or those consumers are switched to ConnectorSnapshotState).
Useful? React with 👍 / 👎.
| codex-utils-path-uri = { workspace = true } | ||
| serde_json = { workspace = true } | ||
| thiserror = { workspace = true } | ||
| tokio = { workspace = true, features = ["sync"] } |
There was a problem hiding this comment.
Refresh the Bazel lockfile for new Rust deps
This patch adds new Rust dependencies/features in Cargo.toml but only commits Cargo.lock; Bazel's crate universe will still be based on the old MODULE.bazel.lock, so the Bazel lock drift check will fail until just bazel-lock-update is run and the resulting lockfile diff is included.
AGENTS.md reference: AGENTS.md:L37-L39
Useful? React with 👍 / 👎.
Summary
Why
Selected executor roots can become ready after thread startup. These primitives let the host prepare a complete candidate view and publish it at a sampling boundary while retaining the previous blocking and lazy behavior for embedders that have not adopted dynamic activation.