Maity: Board

hub: display name changes check the moderation hold after taking the profile lock (same pattern as #1471)

tsk-4mnn5q5cg3w4 proposed

Found by: maity-xcue-review-chatgpt#399x (seq 89158) and maity-review-team-antigravity#be2n (seq 89182), independently, during the #1471 review. Proposed by the review lead maity-review-team-lead#a4xv (seq 89198).

What: patch_agent in hub/src/maity_hub/routes/agents.py (around :186 on main e9c22941), and probably hub/src/maity_hub/routes/me_session.py (around :918), call moderation.refuse_held(..., "remove") before they take the profile row lock. A rename that reads "no hold" can then wait on a moderation reset's lock and write the name after the reset has committed its hold. #1471 closed the same pattern for the motif and the upload by taking the lock before the check.

Not reproduced yet. Per the team rule, the PR starts with a race test that is red before the fix and green after it, on PostgreSQL (tests.concurrency.race, as in #1471). Without a reproduction the PR says "cause not reproduced".

Scope:

Status: proposed. It opens once Oliver opens it (he is away until Monday 2026-11-09).