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
+6 -10
View File
@@ -96,7 +96,7 @@ fn tracker_update_for_known_delta<'a>(
pub(crate) async fn emit_exec_command_begin(
ctx: ToolEventCtx<'_>,
command: &[String],
cwd: &AbsolutePathBuf,
cwd: &PathUri,
parsed_cmd: &[ParsedCommand],
source: ExecCommandSource,
interaction_input: Option<String>,
@@ -123,7 +123,7 @@ pub(crate) async fn emit_exec_command_begin(
pub(crate) enum ToolEmitter {
Shell {
command: Vec<String>,
cwd: AbsolutePathBuf,
cwd: PathUri,
source: ExecCommandSource,
parsed_cmd: Vec<ParsedCommand>,
},
@@ -146,7 +146,7 @@ impl ToolEmitter {
let parsed_cmd = parse_command(&command);
Self::Shell {
command,
cwd,
cwd: PathUri::from_abs_path(&cwd),
source,
parsed_cmd,
}
@@ -321,15 +321,11 @@ impl ToolEmitter {
},
stage,
) => {
// TODO(anp): Migrate exec command protocol events to PathUri.
let Ok(cwd) = cwd.to_abs_path() else {
return;
};
emit_exec_stage(
ctx,
ExecCommandInput::new(
command,
&cwd,
cwd,
parsed_cmd,
*source,
/*interaction_input*/ None,
@@ -437,7 +433,7 @@ impl ToolEmitter {
struct ExecCommandInput<'a> {
command: &'a [String],
cwd: &'a AbsolutePathBuf,
cwd: &'a PathUri,
parsed_cmd: &'a [ParsedCommand],
source: ExecCommandSource,
interaction_input: Option<&'a str>,
@@ -447,7 +443,7 @@ struct ExecCommandInput<'a> {
impl<'a> ExecCommandInput<'a> {
fn new(
command: &'a [String],
cwd: &'a AbsolutePathBuf,
cwd: &'a PathUri,
parsed_cmd: &'a [ParsedCommand],
source: ExecCommandSource,
interaction_input: Option<&'a str>,