oliver-zehentleitner / maity
hub: every caller that takes runners.lock with project locks takes rows first, then the sorted full project union (three pre-existing lock-order exceptions)
tsk-612a4bp7nxes Open
Found by Codex d4kb in A2041 (seq 193887) while approving #2105 (hub PR B) at d3c3be4e; they predate PR B and stay outside it (review lead, seq 193897; cbt4 note nte-77vvyb1zacq2 on tsk-1h9wcf58rec5). After #2105 the leak path takes runner credential rows, then runner rows, then the sorted projects, as the owner revoke does. Three callers still differ: (1) account deletion locks projects (account_deletion.py ~172) before runner credentials and rows (~466) and can invert against a concurrent leak of the same runner; (2) re-pair emits in the existing projects (routes/runners.py ~506) then attaches in enrollment order (~527) without prelocking the full project union, and can overlap in reverse with another runner sorted pass; (3) runner revoke or removal under the default policy locks the attached projects (runner_revoke.py ~116) but its later close can reach a detached placement project (placements.py ~1282, ~1335). Done when every caller that takes runners.lock together with project locks takes rows first and then the sorted full union, each with a lock-instrumentation test as hub/tests/test_placements.py ~1028 does for the leak. Legs: two vendors plus security (suqj). Start after #2105 merges, since it builds on its lock order.