Locale layout mismatch rebuild
Problem
Changing locales.mode, locales.structure, or locales.directory without clearing cache can leave files.json fingerprints pointing at the wrong segment set. Operators may see stale missingKeys or validate results until something forces a rescan.
What we do
- Layout fingerprint in
files.jsonrecordsmode,structure,directory, andsource. - On mismatch vs live config,
decideAnalysisRebuildreturnsfullwith reasonlayout_changed— full project scan, not a partial src patch. - Partial layout recovery: when only the fingerprint changes but src index is still usable, core may re-walk locale segments and reuse the cached
src/**index where safe (CLI cache). --debug-cache: look foranalysis rebuild: full (...)including layout-related reasons after config edits.
Operator checklist
| Change | Expected cache behavior |
|---|---|
Rename locales.directory | Full rebuild on next command |
Switch flat_file → locale_directory | Full rebuild; set structure explicitly |
| Edit target locale JSON only | Reuse analysis (target locale only) |
| Edit source locale JSON only | Partial missingKeys refresh |