← ClaudeAtlas

concurrency-reviewlisted

Use as a REVIEW LENS when judging another agent's diff for concurrency and data-integrity defects under failure — concurrent writers, unsynchronised read-modify-write and lost updates, temp-file name collisions, non-atomic file writes, cross-process locking and stale-lock leases, crash/pause/retry schedules, idempotency, transactions and isolation — before recommending approval. Invoke on every review whose diff persists data (files, database rows, caches, queues), takes a lock, retries, or runs in a request handler, worker or job that can execute concurrently; it complements review-ticket and the builder's concurrency-and-async skill.
tmj-90/gaffer · ★ 1 · Code & Development · score 70
Install: claude install-skill tmj-90/gaffer
# Concurrency and data-integrity review lens Race and crash defects pass every sequential test, so they sail through review unless someone plays the bad schedule on purpose. Live runs shipped exactly this class twice: concurrent writers sharing one temp-file name (HTTP 500), an unsynchronised read-modify-write (lost updates), and a time-only stale-lock lease that let a second process break the lock of a holder that was merely paused — losing a write the first process had already acknowledged. Every reviewer scored correctness 4/5. This lens exists so that does not happen again. A finding here is a **concrete defect only when you can write the schedule**: the ordered steps (who reads, who writes, who pauses or crashes, when) that end in a wrong, observable outcome — a lost acknowledged write, a corrupt or partial file, a duplicate effect, a 500, a deadlock. "Consider adding a lock" without a schedule is a note. ## Steps 1. **Establish the concurrency shape.** Can the changed code run twice at once? An HTTP handler can (servers serve requests concurrently; Node interleaves at every `await`); so can workers, cron jobs that overlap, CLI commands a user can start twice, multiple processes or instances sharing one file or database. Check how the app is deployed (worker count, cluster mode, replicas) and call `search_lore` for the repo's locking, transaction and persistence conventions. If there is provably one writer and one thread, write "single writer — n/a"