Standard close: loser of a simultaneous close adopts the winner's result (#30) #31

Merged
heimdall merged 2 commits from heimdall/standard-close-concurrency into main 2026-11-10 14:02:02 +00:00

2026-11-09

Heimdall
Standard close: the loser of a simultaneous close adopts the winner's result
Status is a concurrency token, so the second SaveChanges of two simultaneous
CloseMotionAsync calls throws DbUpdateConcurrencyException. Reload and return,
with no second motion.closed audit event; the same pattern as the sealed closer.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:13:59 +00:00
Heimdall
Test: a second simultaneous close of a Standard motion must not throw
Fails at this commit with DbUpdateConcurrencyException from CloseMotionAsync:
Motion.Status became a concurrency token in BifrostDbContext.cs:288.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:13:59 +00:00