Skip to content

Prepare selected capability runtime snapshots#29943

Open
jif-oai wants to merge 1 commit into
jif/share-selected-capability-bindingsfrom
jif/prepare-selected-capability-snapshots
Open

Prepare selected capability runtime snapshots#29943
jif-oai wants to merge 1 commit into
jif/share-selected-capability-bindingsfrom
jif/prepare-selected-capability-snapshots

Conversation

@jif-oai

@jif-oai jif-oai commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add generation-based selected capability activation snapshots
  • add generic extension prepare and commit hooks for coherent runtime publication
  • cache selected connector and MCP declarations per root without serializing unrelated executor readiness
  • preserve bindings-only and explicit-snapshot behavior for existing extension hosts

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.

@jif-oai jif-oai requested a review from a team as a code owner June 25, 2026 01:27

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +145 to +149
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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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"] }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant