@@ -315,21 +315,24 @@ async fn failed_initial_end_for_unstored_process_uses_fallback_output() {
315315
316316 let event = tokio:: time:: timeout ( Duration :: from_secs ( 1 ) , rx_event. recv ( ) )
317317 . await
318- . expect ( "timed out waiting for failed exec end event " )
318+ . expect ( "timed out waiting for failed command execution item " )
319319 . expect ( "event channel closed" ) ;
320- let codex_protocol:: protocol:: EventMsg :: ExecCommandEnd ( end_event ) = event. msg else {
321- panic ! ( "expected ExecCommandEnd event" ) ;
320+ let codex_protocol:: protocol:: EventMsg :: ItemCompleted ( completed_event ) = event. msg else {
321+ panic ! ( "expected ItemCompleted event" ) ;
322322 } ;
323- assert_eq ! ( end_event. call_id, "call-unified-denied" ) ;
323+ let codex_protocol:: items:: TurnItem :: CommandExecution ( item) = completed_event. item else {
324+ panic ! ( "expected CommandExecution item" ) ;
325+ } ;
326+ assert_eq ! ( item. id, "call-unified-denied" ) ;
324327 assert_eq ! (
325- end_event . status,
326- codex_protocol:: protocol :: ExecCommandStatus :: Failed
328+ item . status,
329+ codex_protocol:: items :: CommandExecutionStatus :: Failed
327330 ) ;
328- assert_eq ! ( end_event . exit_code, - 1 ) ;
329- assert_eq ! ( end_event . process_id. as_deref( ) , Some ( "123" ) ) ;
331+ assert_eq ! ( item . exit_code, Some ( - 1 ) ) ;
332+ assert_eq ! ( item . process_id. as_deref( ) , Some ( "123" ) ) ;
330333 assert_eq ! (
331- end_event . aggregated_output,
332- "PRE_DENIAL_MARKER\n Network access denied"
334+ item . aggregated_output. as_deref ( ) ,
335+ Some ( "PRE_DENIAL_MARKER\n Network access denied" )
333336 ) ;
334337}
335338
0 commit comments