mirror of
https://github.com/stablyai/orca.git
synced 2026-10-18 00:03:20 +00:00
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.
This commit is contained in:
@@ -42,6 +42,9 @@ function createSettings(overrides: Partial<GlobalSettings> = {}): 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,
|
||||
|
||||
@@ -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', () => {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user