mirror of
https://github.com/openai/codex.git
synced 2026-10-20 17:38:45 +00:00
Consolidate command execution output into aggregated_output (#50402)
## What changed - Remove `stdout`, `stderr`, and `formatted_output` from `CommandExecutionItem` and `ExecCommandEndEvent`, retaining `aggregated_output` as the output field. - Update command event producers, legacy conversion, rollout traces, and the precomputed schema. Use aggregated output for terminal trace results. - Clear `interaction_input` in emitted and migrated command completion items. ## Testing Update command execution and trace tests to use aggregated output, and assert that legacy rollout migration preserves `aggregatedOutput`. GitOrigin-RevId: ed59827d4a5ec9a767084ee4feac72c2042440f2
This commit is contained in:
@@ -2408,12 +2408,9 @@ mod tests {
|
||||
source: ExecCommandSource::Agent,
|
||||
interaction_input: None,
|
||||
status: CoreCommandExecutionStatus::Completed,
|
||||
stdout: Some("hello world\n".to_string()),
|
||||
stderr: Some(String::new()),
|
||||
aggregated_output: Some("hello world\n".to_string()),
|
||||
exit_code: Some(0),
|
||||
duration: Some(Duration::from_millis(12)),
|
||||
formatted_output: Some("hello world\n".to_string()),
|
||||
});
|
||||
let events = vec![
|
||||
EventMsg::TurnStarted(TurnStartedEvent {
|
||||
@@ -2456,12 +2453,9 @@ mod tests {
|
||||
parsed_cmd,
|
||||
source: ExecCommandSource::Agent,
|
||||
interaction_input: None,
|
||||
stdout: "hello world\n".to_string(),
|
||||
stderr: String::new(),
|
||||
aggregated_output: "hello world\n".to_string(),
|
||||
exit_code: 0,
|
||||
duration: Duration::from_millis(12),
|
||||
formatted_output: "hello world\n".to_string(),
|
||||
status: CoreExecCommandStatus::Completed,
|
||||
}),
|
||||
EventMsg::TurnComplete(TurnCompleteEvent {
|
||||
@@ -3145,12 +3139,9 @@ mod tests {
|
||||
}],
|
||||
source: ExecCommandSource::Agent,
|
||||
interaction_input: None,
|
||||
stdout: String::new(),
|
||||
stderr: String::new(),
|
||||
aggregated_output: "hello world\n".into(),
|
||||
exit_code: 0,
|
||||
duration: Duration::from_millis(12),
|
||||
formatted_output: String::new(),
|
||||
status: CoreExecCommandStatus::Completed,
|
||||
}),
|
||||
EventMsg::McpToolCallEnd(McpToolCallEndEvent {
|
||||
@@ -3439,12 +3430,9 @@ mod tests {
|
||||
parsed_cmd: vec![ParsedCommand::Unknown { cmd: "ls".into() }],
|
||||
source: ExecCommandSource::Agent,
|
||||
interaction_input: None,
|
||||
stdout: String::new(),
|
||||
stderr: "exec command rejected by user".into(),
|
||||
aggregated_output: "exec command rejected by user".into(),
|
||||
exit_code: -1,
|
||||
duration: Duration::ZERO,
|
||||
formatted_output: String::new(),
|
||||
status: CoreExecCommandStatus::Declined,
|
||||
}),
|
||||
EventMsg::PatchApplyEnd(PatchApplyEndEvent {
|
||||
@@ -3833,12 +3821,9 @@ mod tests {
|
||||
}],
|
||||
source: ExecCommandSource::Agent,
|
||||
interaction_input: None,
|
||||
stdout: "done\n".into(),
|
||||
stderr: String::new(),
|
||||
aggregated_output: "done\n".into(),
|
||||
exit_code: 0,
|
||||
duration: Duration::from_millis(5),
|
||||
formatted_output: "done\n".into(),
|
||||
status: CoreExecCommandStatus::Completed,
|
||||
}),
|
||||
EventMsg::TurnComplete(TurnCompleteEvent {
|
||||
@@ -3943,12 +3928,9 @@ mod tests {
|
||||
}],
|
||||
source: ExecCommandSource::Agent,
|
||||
interaction_input: None,
|
||||
stdout: "done\n".into(),
|
||||
stderr: String::new(),
|
||||
aggregated_output: "done\n".into(),
|
||||
exit_code: 0,
|
||||
duration: Duration::from_millis(5),
|
||||
formatted_output: "done\n".into(),
|
||||
status: CoreExecCommandStatus::Completed,
|
||||
}),
|
||||
EventMsg::TurnComplete(TurnCompleteEvent {
|
||||
|
||||
@@ -3330,12 +3330,9 @@ fn core_turn_item_into_thread_item_converts_supported_variants() {
|
||||
source: CoreExecCommandSource::Agent,
|
||||
interaction_input: None,
|
||||
status: CoreCommandExecutionStatus::Completed,
|
||||
stdout: Some("done\n".to_string()),
|
||||
stderr: Some(String::new()),
|
||||
aggregated_output: Some("done\n".to_string()),
|
||||
exit_code: Some(0),
|
||||
duration: Some(Duration::from_millis(5)),
|
||||
formatted_output: Some("done\n".to_string()),
|
||||
});
|
||||
|
||||
assert_eq!(
|
||||
|
||||
Reference in New Issue
Block a user