You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On main f9f076a11, settings.save_many reads settings.json, changes lines and rewrites the whole file with no lock (settings.py:622-664, _write_lines 534-543). The write is atomic, so the file is never half written, but two writers at once lose the edit that was read before the other's write.
Writers: the Settings page (web/settings.py:305,321,540,634) and nullius migrate --providers --apply (migrate.py:265). Two Settings requests to one server race the same way.
Other profile files written from both the page and the CLI already take a lock: leaderboard weights (leaderboard/weighting.py:103), access tokens (access.py:78).
Reproduction
Pause one save_many after it reads settings.json.
Save another setting through a second request.
Resume the first.
Read settings.json.
Expected
Both edits are kept.
Acceptance
save/save_many read, change and write settings.json under one lock, as weights and tokens do
Activity