Separate environment requests from runtime selections (#51221)

## What changed

Introduce `TurnEnvironmentRequest` for caller-supplied environment input and construct `TurnEnvironmentSelection` at session startup and app-server settings boundaries. Update thread startup, default environments, and inherited environment handoffs to use requests, with explicit conversions when reusing runtime selections.

Move the environment types into `protocol::environment` while retaining their `protocol` re-exports. Update test fixtures and existing tests to build request inputs separately from runtime selections.

GitOrigin-RevId: 12e7daaece95aae136afae8b055b4dbaebdffc75
This commit is contained in:
Adam Perry @ OpenAI
2026-10-06 01:39:50 +00:00
committed by copyberry
parent 28b91c7c31
commit 2dbcab90e2
46 changed files with 373 additions and 212 deletions
+1 -1
View File
@@ -1722,7 +1722,7 @@ async fn pending_environment_failure_reaches_child_and_grandchild() {
let root = harness
.manager
.start_thread(StartThreadOptions {
environments: Some(vec![pending.clone()]),
environments: Some(vec![pending.clone().into_request()]),
..StartThreadOptions::new(harness.config.clone())
})
.await