unified-exec: retain PathUri in command events (#28780)

## Why

App-server must report command events containing foreign-platform paths
without changing existing client or rollout path-string formats.

## What changed

- retain `PathUri` through exec command begin/end events
- convert cwd values to `LegacyAppPathString` at the app-server
compatibility boundary
- drop command actions with foreign paths and log them
- serialize rollout-trace cwd values using their inferred native path
representation
- restore Wine coverage for retained Windows cwd values and successful
completion
This commit is contained in:
Adam Perry @ OpenAI
2026-06-17 22:00:04 -07:00
committed by GitHub
Unverified
parent 285eff6c3e
commit 3931bc2bde
56 changed files with 566 additions and 125 deletions
@@ -68,10 +68,9 @@ impl EventProcessorWithHumanOutput {
match item {
ThreadItem::CommandExecution { command, cwd, .. } => {
eprintln!(
"{}\n{} in {}",
"{}\n{} in {cwd}",
"exec".style(self.italic).style(self.magenta),
command.style(self.bold),
cwd.display()
);
}
ThreadItem::McpToolCall { server, tool, .. } => {
@@ -170,7 +170,7 @@ fn command_execution_started_and_completed_translate_to_thread_events() {
let command_item = ThreadItem::CommandExecution {
id: "cmd-1".to_string(),
command: "ls".to_string(),
cwd: test_path_buf("/tmp/project").abs(),
cwd: test_path_buf("/tmp/project").abs().into(),
process_id: Some("123".to_string()),
source: CommandExecutionSource::UserShell,
status: ApiCommandExecutionStatus::InProgress,
@@ -210,7 +210,7 @@ fn command_execution_started_and_completed_translate_to_thread_events() {
item: ThreadItem::CommandExecution {
id: "cmd-1".to_string(),
command: "ls".to_string(),
cwd: test_path_buf("/tmp/project").abs(),
cwd: test_path_buf("/tmp/project").abs().into(),
process_id: Some("123".to_string()),
source: CommandExecutionSource::UserShell,
status: ApiCommandExecutionStatus::Completed,
@@ -1321,7 +1321,7 @@ fn turn_completion_reconciles_started_items_from_turn_items() {
item: ThreadItem::CommandExecution {
id: "cmd-1".to_string(),
command: "ls".to_string(),
cwd: test_path_buf("/tmp/project").abs(),
cwd: test_path_buf("/tmp/project").abs().into(),
process_id: Some("123".to_string()),
source: CommandExecutionSource::UserShell,
status: ApiCommandExecutionStatus::InProgress,
@@ -1361,7 +1361,7 @@ fn turn_completion_reconciles_started_items_from_turn_items() {
items: vec![ThreadItem::CommandExecution {
id: "cmd-1".to_string(),
command: "ls".to_string(),
cwd: test_path_buf("/tmp/project").abs(),
cwd: test_path_buf("/tmp/project").abs().into(),
process_id: Some("123".to_string()),
source: CommandExecutionSource::UserShell,
status: ApiCommandExecutionStatus::Completed,