Skip to content

test(cli): isolate legacy desktop preferences in Supervisor config fixtures #1686

Description

@luokerenx4

On clean dev 0a10220d on macOS arm64, pnpm test has four failed assertions across packages/cli/src/startup-target.spec.ts (one) and packages/cli/src/supervisor-config.spec.ts (three). They expect an unset Default, but receive {machine:'local',project:'default'} from an existing installed desktop preference. A targeted run of startup-target reproduces the failure (3 pass / 1 fail).

Reproduction: with a normal legacy OpenAlice desktop openalice-data-home.json selecting the default home, run these specs. Their temporary Supervisor roots do not isolate the migration's desktop-preference input. The same tests can consequently fail differently for another developer's existing desktop state.

Suspected boundary: #1675 added Supervisor schema-3 migration. readSupervisorConfig(root) migrates schema 2/missing state via migrateSupervisorDefault; without legacyDesktopPreferencePath it consults platform userData paths. The migration spec itself injects an isolated preference path, but these older fixtures do not. Config mutations also call the migration internally, so isolating only one read is insufficient.

Repair the hermetic fixture/environment boundary and retain separate explicit migration-input acceptance. Do not change real desktop preferences or disable production migration to make tests pass. #1682/#1684 address the separate PTY fixtures and are related but do not include these two files.

Deferred from #1685 to preserve the bounded desktop destroyed-window fix. Full baseline result: 7494 passed / 27 failed / 8 skipped, 882 files; these four failures are not accepted evidence.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions