The scenario
A queue coordinates work across multiple workers. A worker’s claim needs a lifetime and an owner, so slow or disconnected workers do not interfere with newer work.
A failure to reason about
One worker pauses and another takes over. An acknowledgement arriving from the first worker must not erase the second worker’s active job.
Illustrative context for the topic. The exercise’s full requirements arrive in the workspace.
Questions to bring to your review
- What proves that a worker still owns a claim?
- How does a controlled clock make the sequence reproducible?
- Which application workflows also depend on queue state?
Skills you will practice
- Concurrency
- Leases
- Fencing tokens
Read the existing code, reproduce the reported behavior, review proposed changes, and verify your final implementation. You can use AI assistance while staying responsible for the result.
Prepare with a worked example
- How to review AI-generated code
A worked review of a cache patch: establish the contract, find a counterexample, verify the fix, and explain the evidence.
See how nrml evaluates an attempt, including the limits of automated evidence.