Skip to content

CodeWhale Config Paths Fragmented Across OS and Cygwin (Plus Silent Migration Bug) #2369

@buko

Description

@buko

config-mismatch.patch

CodeWhale Config Paths Fragmented Across OS and Cygwin (Plus Silent Migration Bug)

Description

Currently, CodeWhale configuration files are fragmented and resolved inconsistently depending on the OS environment. On Windows (and specifically when running under Cygwin):

  1. config.toml evaluates to %USERPROFILE%\.deepseek\config.toml because it ignores the $HOME environment variable (which is /home/bob/ on Cygwin).
  2. settings.toml ignores $HOME and resolves to %APPDATA%\deepseek\settings.toml.

To make matters worse, CodeWhale v0.8.44 introduced a silent config migration. It copies the legacy .deepseek configuration directory to the new .codewhale directory in the background. Because it does this silently, users are left editing their legacy files (which they consider the source of truth) with no effect, leading to incredible confusion.

Proposed Solution

  1. Unify the Paths: Update both codewhale_home() and legacy_deepseek_home() to respect the $HOME environment variable natively before falling back to the OS-specific %USERPROFILE%.
  2. Consolidate settings.toml: Update Settings::path() so that it natively looks in .codewhale/settings.toml, gracefully falls back to .deepseek/settings.toml, and only checks %APPDATA% as a final backward-compatibility measure.
  3. Loud Migration Warning: Change the silent migration logic into a loud migration logic. Introduce migrate_settings_if_needed(). If either config.toml or settings.toml is migrated from a legacy location, CodeWhale will print a massive highly-visible banner to the terminal instructing the user about the new path, listing the old paths to delete, and then immediately terminating execution std::process::exit(0). This guarantees no more silent ghost files.

Patch

A complete patch resolving this issue is attached.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status
    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions