Record exec pids in tool call spans

This commit is contained in:
marina-oai
2026-01-15 17:16:24 +09:00
parent a09711332a
commit ca47abc69a
17 changed files with 151 additions and 33 deletions

View File

@@ -640,6 +640,7 @@ fn exec_command_end_success_produces_completed_command_item() {
EventMsg::ExecCommandBegin(ExecCommandBeginEvent {
call_id: "1".to_string(),
process_id: None,
os_pid: None,
turn_id: "turn-1".to_string(),
command: command.clone(),
cwd: cwd.clone(),
@@ -670,6 +671,7 @@ fn exec_command_end_success_produces_completed_command_item() {
EventMsg::ExecCommandEnd(ExecCommandEndEvent {
call_id: "1".to_string(),
process_id: None,
os_pid: None,
turn_id: "turn-1".to_string(),
command,
cwd,
@@ -717,6 +719,7 @@ fn command_execution_output_delta_updates_item_progress() {
EventMsg::ExecCommandBegin(ExecCommandBeginEvent {
call_id: "delta-1".to_string(),
process_id: Some("42".to_string()),
os_pid: None,
turn_id: "turn-1".to_string(),
command: command.clone(),
cwd: cwd.clone(),
@@ -757,6 +760,7 @@ fn command_execution_output_delta_updates_item_progress() {
EventMsg::ExecCommandEnd(ExecCommandEndEvent {
call_id: "delta-1".to_string(),
process_id: Some("42".to_string()),
os_pid: None,
turn_id: "turn-1".to_string(),
command,
cwd,
@@ -801,6 +805,7 @@ fn exec_command_end_failure_produces_failed_command_item() {
EventMsg::ExecCommandBegin(ExecCommandBeginEvent {
call_id: "2".to_string(),
process_id: None,
os_pid: None,
turn_id: "turn-1".to_string(),
command: command.clone(),
cwd: cwd.clone(),
@@ -830,6 +835,7 @@ fn exec_command_end_failure_produces_failed_command_item() {
EventMsg::ExecCommandEnd(ExecCommandEndEvent {
call_id: "2".to_string(),
process_id: None,
os_pid: None,
turn_id: "turn-1".to_string(),
command,
cwd,
@@ -871,6 +877,7 @@ fn exec_command_end_without_begin_is_ignored() {
EventMsg::ExecCommandEnd(ExecCommandEndEvent {
call_id: "no-begin".to_string(),
process_id: None,
os_pid: None,
turn_id: "turn-1".to_string(),
command: Vec::new(),
cwd: PathBuf::from("."),