Description
When the dev branch's config migration runs (migrate_legacy_projects() in config.py), it converts the old project format (string paths) to the new format (ProjectConfig dicts) in-place. No backup of the previous config is created before saving.
This means:
- Running the dev version migrates
~/.basic-memory/config.json to the new format
- Running the released homebrew version (0.18.5) after that fails with
ValidationError: projects.main - Input should be a valid string
- There's no way to recover the old config without manual intervention
Steps to Reproduce
- Install homebrew basic-memory (v0.18.5) and create a working config
- Run the dev branch version — config auto-migrates to new format
- Run the homebrew version again — fails with validation error
Expected Behavior
The migration should create a backup (e.g., config.json.bak) before writing the new format, so users can revert if needed.
Relevant Code
src/basic_memory/config.py — migrate_legacy_projects() model validator
ConfigManager.save() writes directly without backup
Impact
Users who switch between dev and released versions lose their config without recovery path.
Recommendation
Release v0.18.6 with config backup support before deploying the new format to production. This ensures existing users have a safe upgrade path and can roll back if needed.
Description
When the dev branch's config migration runs (
migrate_legacy_projects()inconfig.py), it converts the old project format (string paths) to the new format (ProjectConfig dicts) in-place. No backup of the previous config is created before saving.This means:
~/.basic-memory/config.jsonto the new formatValidationError: projects.main - Input should be a valid stringSteps to Reproduce
Expected Behavior
The migration should create a backup (e.g.,
config.json.bak) before writing the new format, so users can revert if needed.Relevant Code
src/basic_memory/config.py—migrate_legacy_projects()model validatorConfigManager.save()writes directly without backupImpact
Users who switch between dev and released versions lose their config without recovery path.
Recommendation
Release v0.18.6 with config backup support before deploying the new format to production. This ensures existing users have a safe upgrade path and can roll back if needed.