@@ -679,6 +679,11 @@ console.log(`legacy host installation tests passed selectors=5 dryRunWrites=0 co
679679 const workspace = path . join ( currentRoot , 'workspace' )
680680 fs . mkdirSync ( home , { recursive : true } )
681681 fs . mkdirSync ( path . join ( workspace , '.devcodex' ) , { recursive : true } )
682+ fs . writeFileSync (
683+ path . join ( workspace , '.devcodex' , 'layout.json' ) ,
684+ `${ JSON . stringify ( { mode : 'workspace-namespace' } , null , 2 ) } \n` ,
685+ 'utf8'
686+ )
682687 fs . writeFileSync ( path . join ( workspace , 'package.json' ) , '{"name":"global-only-fixture"}\n' )
683688 const env = {
684689 ...process . env ,
@@ -699,6 +704,19 @@ console.log(`legacy host installation tests passed selectors=5 dryRunWrites=0 co
699704 assert . strictEqual ( inspection . hosts . length , 5 )
700705 assert . ok ( fs . existsSync ( path . join ( home , 'gemini-cli-home' , '.gemini' , 'devcodex' , 'global-host-receipt.json' ) ) )
701706
707+ const statusAfterGlobalInstall = spawnSync ( process . execPath , [ INDEX , 'status' , '--json' ] , {
708+ cwd : workspace ,
709+ encoding : 'utf8' ,
710+ env
711+ } )
712+ assert . strictEqual ( statusAfterGlobalInstall . status , 0 , statusAfterGlobalInstall . stderr || statusAfterGlobalInstall . stdout )
713+ const statusAfterGlobalInstallFacts = JSON . parse ( statusAfterGlobalInstall . stdout ) . payload
714+ assert . strictEqual ( statusAfterGlobalInstallFacts . globalHostConfig . ready , true )
715+ assert . strictEqual ( statusAfterGlobalInstallFacts . entryFiles . instructionProjection . grokPlugin . globalAdapterReady , true )
716+ assert ( ! statusAfterGlobalInstallFacts . entryFiles . instructionProjection . issues . some ( item =>
717+ item . code === 'HOST_GROK_WORKSPACE_PLUGIN_MISSING'
718+ ) )
719+
702720 const runtimeInit = spawnSync ( process . execPath , [ INDEX , 'init' , '--json' ] , {
703721 cwd : workspace ,
704722 encoding : 'utf8' ,
0 commit comments