claude-code-cli / claude-sonnet-5-5 / medium / medium effort preferred over claude-code-cli / claude-haiku-5-5 / low / low effort · close win.
Primary judge: Sol 6.1, requested Low. Effective provider effort and internal attempts were not verified. A close win is still a scored preference; it does not establish a material defect.
Reviewed public evidence
Task goal
Read-only architecture analysis. Two workers use a30second lease to update an external resource. WorkerA pauses beyond expiry; workerB acquires the lease and completes a newer update; A resumes and overwrites it. The lease service issues monotonically increasing epochs, but the external system currently accepts every write. Design the smallest fencing/ownership contract, including renewal, stale-writer rejection, retries and where the check must occur. Distinguish avoiding duplicate work from preventing stale effects. No tools or implementation/test claims. Three numbered items, under180words.
claude-code-cli / claude-sonnet-5-5 / medium / medium effort answer
1. **Contract and check location.** The lease service returns `{resource, epoch}` on acquire, and a higher epoch always supersedes a lower one. Every write carries `(resource, epoch)`. The external system must atomically compare-and-persist a `max_epoch` per resource in the same transaction as the effect. It accepts a write if `epoch >= max_epoch`, then sets `max_epoch = epoch`, and rejects `epoch < max_epoch` with a non-retryable "fenced" error. A check in the worker, or one made before the write, is a time-of-check/time-of-use race and cannot prevent the stale effect. This check must live at the resource, or at a gateway that owns the write path.
2. **Renewal and retries.** Renewal keeps the same epoch and extends the TTL, and it fails if the lease has been lost. A worker that fails to renew must stop. A new owner always gets a new epoch. Retries reuse the original epoch plus an idempotency key, so a duplicate of an accepted write is a no-op. A fenced rejection means abandon the work and never re-acquire silently. Re-acquiring creates a new epoch and must re-read the current state first.
3. **Duplicate work vs. stale effects.** Leases and renewal only reduce duplicate work. They are advisory, and a paused worker can't know its lease has expired. Only the resource-side epoch fence prevents stale effects. Without it, even a perfect lease service permits A's overwrite.claude-code-cli / claude-haiku-5-5 / low / low effort answer
1. **Contract:** Acquire returns epoch E. Renewal keeps E, and reacquiring after expiry yields a larger E. Each mutation carries (resource, E, idempotency key). The resource stores the highest accepted epoch and applies a write only if E ≥ stored, updating both in one atomic compare-and-set. Do not rely on the 30-second lease for safety.
2. **Check location:** Enforce the check inside the external resource's atomic write, not in the client or lease service, because a paused client can act after any client-side check. Writes with E < stored are rejected. The writer stops and reacquires; it never retries with the old epoch. Transient failures retry with the same E and idempotency key, so duplicate deliveries apply once.
3. **Duplicate work vs. stale effects:** Leases reduce duplicate work but can overlap after pauses. Only epoch fencing prevents stale effects. The smallest fix is lease, plus epoch on writes, plus a resource-side conditional write. Until the external system supports compare-and-set on a stored epoch, A's overwrite cannot be prevented. Missing: whether the external system offers conditional writes, which the packet does not show. Confidence is high on the design; the packet contains no implementation details.
Primary judge's stated reason
B offers slightly more useful ownership-loss and reacquisition guidance, reducing ambiguity about retrying obsolete work with fresh authority. This is a weak, forced preference, not an established material quality gap: both describe the central fencing solution correctly, and an independent review could reasonably reject the preference.
This reason is the judge's assessment. No independent factual-defect finding is asserted by this record.
Battle wave: de579025-176b-4295-9b7c-1fab1a526d41. Pair: brp1_6b5cc98c6d2200740bdb80d8ffe32aac6e6104fa043b55442f5eec42822a0ad4. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.