Skip to content

Commit 25f50de

Browse files
authored
Test selected capabilities across availability and resume (#30157)
## Why This stack crosses World State, executor skills, selected plugin metadata, MCP processes, connectors, dynamic environments, and resume. This PR adds two end-to-end scenarios that validate those pieces together. Both tests enable `deferred_executor`, so they exercise the real delayed-environment path. ## Scenario 1: availability across turns and resume ```text 1. Start a thread with one selected plugin root bound to E1. 2. E1 is unavailable. - executor skill is absent - selected MCP is absent - connector has no selected-plugin attribution 3. Start E1 and register the same stable environment ID. 4. Start a new turn. - the executor skill appears through World State - its body beats a colliding host skill - the selected MCP tool is advertised and executes inside E1 - the connector is attributed to the selected plugin 5. Start another turn without changing E1. - the MCP PID stays the same, proving runtime reuse 6. Restart app-server and resume the thread. - durable selected-root intent is restored - skills, MCP, and connector attribution are restored - a new MCP PID proves ephemeral process state was rebuilt ``` ## Scenario 2: availability changes inside one turn ```text 1. Start a turn while E1 is unavailable. 2. The first model sample sees no executor skill, MCP, or selected connector. 3. The turn pauses on request_user_input. 4. Start E1 and register it while that same turn is still active. 5. Continue the turn. 6. The very next model sample sees: - the executor skill catalog - the selected MCP tool - selected-plugin connector attribution 7. The model calls the MCP, and its output proves execution happened inside E1. ``` This second scenario specifically protects the aeon-style behavior: capability state is captured again for every sampling step, not only at the next user turn. ## Scope These are integration tests only. They do not add a combinatorial matrix for unsupported plugin-file mutation, environment generations, transport disconnects, or delayed `required = true` executor MCPs.
1 parent 0d4351c commit 25f50de

5 files changed

Lines changed: 735 additions & 6 deletions

File tree

codex-rs/app-server/tests/suite/v2/app_list.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,7 +1533,7 @@ impl ServerHandler for AppListMcpServer {
15331533
}
15341534
}
15351535

1536-
async fn start_apps_server_with_delays(
1536+
pub(super) async fn start_apps_server_with_delays(
15371537
connectors: Vec<AppInfo>,
15381538
tools: Vec<Tool>,
15391539
directory_delay: Duration,
@@ -1693,7 +1693,7 @@ async fn list_directory_connectors(
16931693
}
16941694
}
16951695

1696-
fn connector_tool(connector_id: &str, connector_name: &str) -> Result<Tool> {
1696+
pub(super) fn connector_tool(connector_id: &str, connector_name: &str) -> Result<Tool> {
16971697
let schema: JsonObject = serde_json::from_value(json!({
16981698
"type": "object",
16991699
"additionalProperties": false

codex-rs/app-server/tests/suite/v2/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ mod request_user_input;
5656
mod request_validation;
5757
mod review;
5858
mod safety_check_downgrade;
59+
#[cfg(not(target_os = "windows"))]
60+
mod selected_capability_stack;
5961
mod skills_list;
6062
mod sleep;
6163
mod thread_archive;

0 commit comments

Comments
 (0)