Summary
master_data_routes.py:38–51 (_save_master) creates a backup and writes without running validate_master_data_file. The web_app.py version of the same helper does run validation and restores the backup on failure. Malformed writes through the routes module bypass the safety net.
Evidence
master_data_routes.py:38–51 — _save_master backs up and writes without validation.
web_app.py:1166–1191 — _save_master runs validate_master_data_file after writing, restores backup on failure.
Two implementations of the same write-path helper with different safety guarantees.
Impact
Writes routed through master_data_routes._save_master can corrupt Master_CV_Data.json without triggering the automatic backup-restore. This is a data integrity risk.
Acceptance criteria
Related
- GAP-43 in
tasks/gaps.md
- Affected persona stories: US-M1
Summary
master_data_routes.py:38–51(_save_master) creates a backup and writes without runningvalidate_master_data_file. Theweb_app.pyversion of the same helper does run validation and restores the backup on failure. Malformed writes through the routes module bypass the safety net.Evidence
master_data_routes.py:38–51—_save_masterbacks up and writes without validation.web_app.py:1166–1191—_save_masterrunsvalidate_master_data_fileafter writing, restores backup on failure.Two implementations of the same write-path helper with different safety guarantees.
Impact
Writes routed through
master_data_routes._save_mastercan corruptMaster_CV_Data.jsonwithout triggering the automatic backup-restore. This is a data integrity risk.Acceptance criteria
_save_masterimplementation that always runs post-write validation with backup-restore on failureRelated
tasks/gaps.md