fix(store): atomic+exclusive claim_task — close Gap 4 concurrency guard #190
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/claim-task-concurrency-guard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
claim_task was a blind UPDATE; two agents racing the same task both won (last-writer-wins). Now guarded on
status = queuedso claiming is atomic and exclusive — racing agents get a Conflict (ok:false over the socket) instead of stealing a claimed task. This is the contention the Tailscale bridge exposes for Phase 5.Tests:
test_claim_task_is_exclusive/test_claim_task_not_found(store),socket_rejects_double_claim_of_same_task(daemon, end-to-end). Plan Gap 4 moved to closed.🤖 Generated with Claude Code