@@ -5716,6 +5716,7 @@ describe("runCodexAppServerAttempt", () => {
57165716 const harness = createStartedThreadHarness ( ) ;
57175717 const params = createParams ( sessionFile , workspaceDir ) ;
57185718 params . verboseLevel = "full" ;
5719+ params . fastMode = "auto" ;
57195720 params . fastModeStartedAtMs = 1_000 ;
57205721 params . fastModeAutoOnSeconds = 30 ;
57215722 params . onToolResult = onToolResult ;
@@ -5796,6 +5797,41 @@ describe("runCodexAppServerAttempt", () => {
57965797 ] ) ;
57975798 } ) ;
57985799
5800+ it ( "does not announce Codex fast auto progress for explicit fast mode" , async ( ) => {
5801+ const now = vi . spyOn ( Date , "now" ) . mockReturnValue ( 1_000 ) ;
5802+ const onToolResult = vi . fn ( ) ;
5803+ const sessionFile = path . join ( tempDir , "session.jsonl" ) ;
5804+ const workspaceDir = path . join ( tempDir , "workspace" ) ;
5805+ const harness = createStartedThreadHarness ( ) ;
5806+ const params = createParams ( sessionFile , workspaceDir ) ;
5807+ params . fastMode = "on" ;
5808+ params . fastModeStartedAtMs = 1_000 ;
5809+ params . fastModeAutoOnSeconds = 30 ;
5810+ params . onToolResult = onToolResult ;
5811+
5812+ const run = runCodexAppServerAttempt ( params ) ;
5813+ await harness . waitForMethod ( "turn/start" ) ;
5814+ now . mockReturnValue ( 35_500 ) ;
5815+ await harness . notify ( {
5816+ method : "rawResponseItem/completed" ,
5817+ params : {
5818+ threadId : "thread-1" ,
5819+ turnId : "turn-1" ,
5820+ item : {
5821+ type : "function_call_output" ,
5822+ id : "call-raw-output" ,
5823+ call_id : "call-raw-output" ,
5824+ output : "tool output" ,
5825+ } ,
5826+ } ,
5827+ } ) ;
5828+ await harness . completeTurn ( { threadId : "thread-1" , turnId : "turn-1" } ) ;
5829+ await run ;
5830+
5831+ const texts = onToolResult . mock . calls . map ( ( [ payload ] ) => payload . text ?? "" ) ;
5832+ expect ( texts . filter ( ( text ) => text . startsWith ( "💨Fast:" ) ) ) . toEqual ( [ ] ) ;
5833+ } ) ;
5834+
57995835 it ( "announces Codex app-server fast auto progress for snapshot-only tool results" , async ( ) => {
58005836 const now = vi . spyOn ( Date , "now" ) . mockReturnValue ( 1_000 ) ;
58015837 const onToolResult = vi . fn ( ) ;
@@ -5805,6 +5841,7 @@ describe("runCodexAppServerAttempt", () => {
58055841 const harness = createStartedThreadHarness ( ) ;
58065842 const params = createParams ( sessionFile , workspaceDir ) ;
58075843 params . verboseLevel = "full" ;
5844+ params . fastMode = "auto" ;
58085845 params . fastModeStartedAtMs = 1_000 ;
58095846 params . fastModeAutoOnSeconds = 30 ;
58105847 params . onToolResult = onToolResult ;
@@ -5868,6 +5905,7 @@ describe("runCodexAppServerAttempt", () => {
58685905 const harness = createStartedThreadHarness ( ) ;
58695906 const params = createParams ( sessionFile , workspaceDir ) ;
58705907 params . verboseLevel = "full" ;
5908+ params . fastMode = "auto" ;
58715909 params . fastModeStartedAtMs = 1_000 ;
58725910 params . fastModeAutoOnSeconds = 30 ;
58735911 params . onToolResult = onToolResult ;
@@ -5919,6 +5957,7 @@ describe("runCodexAppServerAttempt", () => {
59195957 const harness = createStartedThreadHarness ( ) ;
59205958 const params = createParams ( sessionFile , workspaceDir ) ;
59215959 params . verboseLevel = "full" ;
5960+ params . fastMode = "auto" ;
59225961 params . fastModeStartedAtMs = 1_000 ;
59235962 params . fastModeAutoOnSeconds = 30 ;
59245963 params . fastModeAutoProgressState = {
0 commit comments