@@ -368,7 +368,10 @@ it.live("names a proxied login by its saved ChatGPT email only when Codex reads
368368 const scriptPath = path . join ( codexHome , "script.json" ) ;
369369 const binaryPath = path . join ( import . meta. dirname , "testFixtures" , "codexCollabMockPeer.sh" ) ;
370370 // A model provider that skips OpenAI auth hides the account, yet usage still names one.
371- const proxied = Effect . fn ( function * ( accountId : string , store : string ) {
371+ const proxied = Effect . fn ( "test.proxiedCodexLogin" ) ( function * (
372+ accountId : string ,
373+ store : string ,
374+ ) {
372375 yield * fileSystem . writeFileString (
373376 scriptPath ,
374377 JSON . stringify ( {
@@ -392,6 +395,18 @@ it.live("names a proxied login by its saved ChatGPT email only when Codex reads
392395 const otherAccount = yield * proxied ( "acct-2" , "file" ) ;
393396 assert . strictEqual ( otherAccount . auth . email , undefined ) ;
394397 assert . strictEqual ( otherAccount . auth . workspaceId , "acct-2" ) ;
398+ const stalledLogin = yield * proxied ( "acct-1" , "file" ) . pipe (
399+ Effect . provideService ( FileSystem . FileSystem , {
400+ ...fileSystem ,
401+ readFileString : ( file , ...options ) =>
402+ file === path . join ( codexHome , "auth.json" )
403+ ? Effect . never
404+ : fileSystem . readFileString ( file , ...options ) ,
405+ } ) ,
406+ ) ;
407+ assert . strictEqual ( stalledLogin . status , "ready" ) ;
408+ assert . strictEqual ( stalledLogin . auth . workspaceId , "acct-1" ) ;
409+ assert . strictEqual ( stalledLogin . auth . email , undefined ) ;
395410 } ) . pipe (
396411 Effect . scoped ,
397412 Effect . provide ( Layer . mergeAll ( layerTestNodeServices , ServerSettingsModule . layerTest ( ) ) ) ,
0 commit comments