@@ -1572,12 +1572,16 @@ async fn approving_allow_prefix_persists_policy_and_skips_future_prompts() -> Re
15721572
15731573 let call_id_first = "allow-prefix-first" ;
15741574 let ( first_event, expected_command) = ActionKind :: RunCommand {
1575- command : & [ "printf" , " allow-prefix-ok"] ,
1575+ command : "printf allow-prefix-ok" ,
15761576 }
15771577 . prepare ( & test, & server, call_id_first, false )
15781578 . await ?;
15791579 let expected_command =
15801580 expected_command. expect ( "allow prefix scenario should produce a shell command" ) ;
1581+ let expected_allow_prefix = expected_command
1582+ . split_whitespace ( )
1583+ . map ( ToString :: to_string)
1584+ . collect :: < Vec < _ > > ( ) ;
15811585
15821586 let _ = mount_sse_once (
15831587 & server,
@@ -1605,14 +1609,15 @@ async fn approving_allow_prefix_persists_policy_and_skips_future_prompts() -> Re
16051609 )
16061610 . await ?;
16071611
1608- let approval = expect_exec_approval ( & test, & expected_command) . await ;
1609- assert_eq ! ( approval. allow_prefix, Some ( expected_command. clone( ) ) ) ;
1612+ let approval =
1613+ expect_exec_approval ( & test, expected_allow_prefix. last ( ) . unwrap ( ) . as_str ( ) ) . await ;
1614+ assert_eq ! ( approval. allow_prefix, Some ( expected_allow_prefix. clone( ) ) ) ;
16101615
16111616 test. codex
16121617 . submit ( Op :: ExecApproval {
16131618 id : "0" . into ( ) ,
16141619 decision : ReviewDecision :: ApprovedAllowPrefix {
1615- allow_prefix : expected_command . clone ( ) ,
1620+ allow_prefix : expected_allow_prefix . clone ( ) ,
16161621 } ,
16171622 } )
16181623 . await ?;
@@ -1640,11 +1645,11 @@ async fn approving_allow_prefix_persists_policy_and_skips_future_prompts() -> Re
16401645
16411646 let call_id_second = "allow-prefix-second" ;
16421647 let ( second_event, second_command) = ActionKind :: RunCommand {
1643- command : & [ "printf" , " allow-prefix-ok"] ,
1648+ command : "printf allow-prefix-ok" ,
16441649 }
16451650 . prepare ( & test, & server, call_id_second, false )
16461651 . await ?;
1647- assert_eq ! ( second_command, Some ( expected_command. clone ( ) ) ) ;
1652+ assert_eq ! ( second_command. as_deref ( ) , Some ( expected_command. as_str ( ) ) ) ;
16481653
16491654 let _ = mount_sse_once (
16501655 & server,
0 commit comments