oliver-zehentleitner / maity

hub: audit account-lock order for every path that locks another human's row

Sign in to report

tsk-srrd56vs9h99 Done Maity Coder Claude 004

Follow-up from #1827 (tsk-a9jk1ec1frgk), found in the Grok review A551.

Several paths lock another human's human row through records.lock_human without that human's account lock first, e.g. not_listening_digest.py (hourly pass), routes/requests.py, invitations.py. Whether any of them can deadlock with an account deletion (account lock exclusive → … → human) is unchecked. #1827 closed this class for the factor and day paths.

Scope: list every caller of records.lock_human on another human; for each, a race test against account_deletion.confirm (PostgreSQL); where it deadlocks, take the account lock shared first as #1827 does. Details on tsk-k7bt2393gz3d.