@@ -431,6 +431,7 @@ function isolatedHostEnv(home) {
431431 const resolvedHome = path . resolve ( home )
432432 const parsedHome = path . parse ( resolvedHome )
433433 return {
434+ ...process . env ,
434435 DEVCODEX_TEST_HOME : home ,
435436 DEVCODEX_POSTINSTALL_FORCE : '1' ,
436437 CI : '' ,
@@ -677,6 +678,10 @@ assert.strictEqual(
677678)
678679
679680const installedEnv = isolatedHostEnv ( globalHome )
681+ // Resolve the real host using the same complete environment as direct helper calls,
682+ // before the expensive installed S15 probe starts.
683+ const realCodexExecutable = smokeOptions . realCodex ? resolveCodexExecutable ( null , installedEnv ) : null
684+ const realCodexVersion = smokeOptions . realCodex ? readCodexVersion ( realCodexExecutable , installedEnv ) : null
680685runCommand ( binPath , [ 'init' , '--profile' , 'consumer' ] , { cwd : workspace , env : installedEnv } )
681686assert . ok ( fs . existsSync ( path . join ( workspace , '.devcodex' ) ) , 'workspace init must create only .devcodex runtime' )
682687assert . deepStrictEqual (
@@ -986,8 +991,6 @@ if (smokeOptions.realCodex) {
986991 'real-codex-host-probe.js'
987992 )
988993 assert . strictEqual ( fs . existsSync ( installedRealHostHelper ) , true , 'installed real-host helper is missing' )
989- const realCodexExecutable = resolveCodexExecutable ( null , installedEnv )
990- const realCodexVersion = readCodexVersion ( realCodexExecutable , installedEnv )
991994 realHostIdentity = createRunIdentity ( {
992995 mode : 'installed' ,
993996 sourceCandidate : smokeOptions . sourceCandidate ,
0 commit comments