From eb8b9be89fffe7333faf9f84bdc252b676cb2639 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Thu, 16 Jul 2026 15:37:07 -0700 Subject: [PATCH] RC: enable system-default real-home routing by default (flag ON) Flip codexSystemDefaultRealHomeEnabled to default ON for this RC's staged rollout (a user can still opt out by setting it false, which stays byte-identical to managed-home behavior). This is the only intended behavior difference between the RC branch and the individual PRs. Updates the two tests that assumed the prior OFF default. --- src/main/codex-accounts/runtime-home-service.test.ts | 3 +++ src/main/codex/codex-real-home-flag.test.ts | 8 ++++---- src/main/codex/codex-real-home-flag.ts | 7 ++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/main/codex-accounts/runtime-home-service.test.ts b/src/main/codex-accounts/runtime-home-service.test.ts index c9f8d156ed9..513385b5f24 100644 --- a/src/main/codex-accounts/runtime-home-service.test.ts +++ b/src/main/codex-accounts/runtime-home-service.test.ts @@ -42,6 +42,9 @@ function createSettings(overrides: Partial = {}): GlobalSettings const agentStatusHooksEnabled = overrides.agentStatusHooksEnabled ?? true const tabAutoGenerateTitle = overrides.tabAutoGenerateTitle ?? false return { + // Managed-home tests assert the mirror path; the RC defaults the real-home + // flag ON, so opt these managed cases out unless a test overrides it. + codexSystemDefaultRealHomeEnabled: overrides.codexSystemDefaultRealHomeEnabled ?? false, workspaceDir: testState.fakeHomeDir, nestWorkspaces: false, refreshLocalBaseRefOnWorktreeCreate: false, diff --git a/src/main/codex/codex-real-home-flag.test.ts b/src/main/codex/codex-real-home-flag.test.ts index 6c1ec8fa1eb..d06640b282f 100644 --- a/src/main/codex/codex-real-home-flag.test.ts +++ b/src/main/codex/codex-real-home-flag.test.ts @@ -18,10 +18,10 @@ afterEach(() => { }) describe('isCodexSystemDefaultRealHomeEnabled', () => { - it('is OFF by default (undefined settings)', () => { - expect(isCodexSystemDefaultRealHomeEnabled(undefined)).toBe(false) - expect(isCodexSystemDefaultRealHomeEnabled(null)).toBe(false) - expect(isCodexSystemDefaultRealHomeEnabled({})).toBe(false) + it('is ON by default on this RC (undefined settings)', () => { + expect(isCodexSystemDefaultRealHomeEnabled(undefined)).toBe(true) + expect(isCodexSystemDefaultRealHomeEnabled(null)).toBe(true) + expect(isCodexSystemDefaultRealHomeEnabled({})).toBe(true) }) it('honors the settings flag when set to true', () => { diff --git a/src/main/codex/codex-real-home-flag.ts b/src/main/codex/codex-real-home-flag.ts index c41f1b22dfa..0a1b54645ce 100644 --- a/src/main/codex/codex-real-home-flag.ts +++ b/src/main/codex/codex-real-home-flag.ts @@ -5,8 +5,9 @@ import type { GlobalSettings } from '../../shared/types' * real ~/.codex instead of Orca's managed runtime home. * * Why a flag: this moves where user Codex state lives (auth, config, sessions, - * hooks). It ships dark, default OFF, with NO settings UI, so flag-OFF stays - * byte-identical to today's managed-home behavior. Managed (multi-account) + * hooks). It is ENABLED BY DEFAULT on this RC for the staged rollout; a user can + * still opt out by setting codexSystemDefaultRealHomeEnabled to false, which + * stays byte-identical to today's managed-home behavior. Managed (multi-account) * selections are unaffected either way. * * The env override exists only so isolated dev/CDP verification can exercise @@ -21,7 +22,7 @@ export function isCodexSystemDefaultRealHomeEnabled( if (envOverride !== null) { return envOverride } - return settings?.codexSystemDefaultRealHomeEnabled === true + return settings?.codexSystemDefaultRealHomeEnabled !== false } function readCodexRealHomeEnvOverride(): boolean | null {