taxes_az/taxes_az/master_data
Ali b963422bca fix(master-data): drop file-hash fast-path so sync always reconciles DB
The hash fast-path compared the JSON file hash to a stored value and exited
early when unchanged. But it only tracked the *file*, not the *table*: if rows
went missing from the DB (manual delete, restore from an older dump) while the
JSON stayed the same, the sync skipped entirely and never restored them — so
`bench migrate` silently failed to recreate missing master-data rows.

Always run the full diff now. It costs one SELECT plus an in-memory compare —
measured at ~0.1s for 13k rows — so there's no reason to skip it. The diff is
driven by DB state, making the sync self-healing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 16:14:50 +00:00
..
__init__.py perf(master-data): sync Main type of activity via hash-diff instead of fixture 2026-05-19 12:44:06 +00:00
item_group.json perf(master-data): sync Item Groups via hash-diff instead of after_migrate loop 2026-05-20 15:30:03 +00:00
main_type_of_activity.json perf(master-data): sync Main type of activity via hash-diff instead of fixture 2026-05-19 12:44:06 +00:00
sync.py fix(master-data): drop file-hash fast-path so sync always reconciles DB 2026-05-20 16:14:50 +00:00