fix: consolidate all config/data paths to ~/.codecora/cora-code/ - #512
Merged
Conversation
- cora_dir() now returns ~/.codecora/cora-code/ (was ~/.cora/) - cache_dir() now returns ~/.codecora/cora-code/cache/reviews/ (was ~/.cache/cora/reviews/) - Auto-migration from legacy paths on first run (config.yaml, auth.toml, cache files) - Migration is idempotent (.migrated-to-codecora marker) - Old files preserved (copy, not move) for user safety - Updated all user-facing strings and doc comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Unify all scattered config/data paths into a single directory:
~/.codecora/cora-code/Before (3+ locations):
After (single location):
Why
Issue #511: Data scattered across 3+ locations is confusing for users, complicates backups, and fragments the directory structure. The
~/.codecora/cora-code/path already existed for graph DB + update cache — this PR makes it the single home for ALL cora-code data.How
cora_dir()inloader.rs: now returnsdata_dir::cora_data_dir()instead of~/.cora/cache_dir()incache.rs: now returnscora_data_dir().join("cache/reviews")instead of~/.cache/cora/reviews/config.yaml,auth.toml,config.toml→ copied (not moved — user can safely delete old files).jsonfiles → moved (rename, since cache is ephemeral).migratedmarker also copied to prevent TOML→YAML re-migration.migrated-to-codecoramarker file prevents re-runningTesting
cargo build— cleancargo test— 22/22 pass (16 unit + 6 config)cargo clippy— 0 warningscargo fmt --check— cleanRelated Issues
Fixes #511
Checklist
cargo fmt)