core: render remote environment cwd natively (#28152)

## Why

Model-visible `<environment_context>` should match the environment of
the executor, not of the app server.

Stacked on #28146.

## What

- Keep selected environment cwd values as `PathUri` while building
environment context.
- Render cwd text using the path convention represented by the URI, with
the canonical URI as a fallback.
- Preserve compatibility with legacy `TurnContextItem.cwd` values when
reconstructing and diffing context.
- Extend the Wine-backed remote Windows test to assert that the model
sees `powershell` and `C:\windows`.
This commit is contained in:
Adam Perry @ OpenAI
2026-06-16 16:17:47 -07:00
committed by GitHub
Unverified
parent a34da3b295
commit 4c79527e31
25 changed files with 457 additions and 185 deletions
+2 -2
View File
@@ -125,7 +125,7 @@ impl LiveThread {
}
}
}
let metadata_sync = ThreadMetadataSync::for_resume(&params);
let metadata_sync = ThreadMetadataSync::for_resume(&params)?;
Ok(Self {
thread_id,
thread_store,
@@ -151,7 +151,7 @@ impl LiveThread {
.metadata_sync
.lock()
.await
.observe_appended_items(canonical_items.as_slice());
.observe_appended_items(canonical_items.as_slice())?;
if let Some(update) = update {
self.thread_store
.update_thread_metadata(UpdateThreadMetadataParams {