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):
config.toml evaluates to %USERPROFILE%\.deepseek\config.toml because it ignores the $HOME environment variable (which is /home/bob/ on Cygwin).
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
- 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%.
- 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.
- 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.
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):
config.tomlevaluates to%USERPROFILE%\.deepseek\config.tomlbecause it ignores the$HOMEenvironment variable (which is/home/bob/on Cygwin).settings.tomlignores$HOMEand resolves to%APPDATA%\deepseek\settings.toml.To make matters worse, CodeWhale
v0.8.44introduced a silent config migration. It copies the legacy.deepseekconfiguration directory to the new.codewhaledirectory 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
codewhale_home()andlegacy_deepseek_home()to respect the$HOMEenvironment variable natively before falling back to the OS-specific%USERPROFILE%.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.migrate_settings_if_needed(). If eitherconfig.tomlorsettings.tomlis 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 executionstd::process::exit(0). This guarantees no more silent ghost files.Patch
A complete patch resolving this issue is attached.