Files
sim/apps
Vikhyath MondretiandClaude e90378a5c1 improvement(permissions): confine workspace role changes to existing members (#6180)
* improvement(permissions): confine workspace role changes to existing members

* improvement(permissions): retry lock timeouts and audit admin upserts truthfully

Bounding the row-lock wait with `lock_timeout` made a competing writer raise
55P03, which the retry set excluded — so the bounded wait failed the request
where the unbounded one would have waited. 55P03 is now retried like the other
contention aborts, the timeout is shortened since each attempt releases its
pooled connection, and contention that outlives every attempt answers with a
busy conflict instead of a generic server error.

The admin member upsert recorded MEMBER_ADDED even when the conflict branch
amended an existing membership, putting a join that never happened in the
workspace audit trail. It now records a role change, matching the action the
response already reported.

Adds the missing test coverage for withTransactionRetry.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-08-01 18:55:01 -07:00
..
…