glam/scripts/lib
kempersc fade1ed5b3 fix: add safety measures to prevent data loss during enrichment
Key changes:
- Created scripts/lib/safe_yaml_update.py with PROTECTED_KEYS constant
- Fixed enrich_custodians_wikidata_full.py to re-read files before writing
  (prevents race conditions where another script modified the file)
- Added safety check to abort if protected keys would be lost
- Protected keys include: location, original_entry, ghcid, provenance,
  google_maps_enrichment, osm_enrichment, etc.

Root cause of data loss in 62fdd35321:
- Script loaded files into list, then processed them later
- If another script modified files between load and write, changes were lost
- Now files are re-read immediately before modification

Per AGENTS.md Rule 5: NEVER Delete Enriched Data - Additive Only
2025-12-09 12:27:09 +01:00
..
__init__.py fix: add safety measures to prevent data loss during enrichment 2025-12-09 12:27:09 +01:00
safe_yaml_update.py fix: add safety measures to prevent data loss during enrichment 2025-12-09 12:27:09 +01:00