Commit 8febda2
fix(redis-worker): mollifier CAS isolation, reset claim cleanup + test gaps
Close review findings on the mollifier buffer extensions:
- mutateSnapshot(set_metadata) now bumps metadataVersion so a concurrent
casSetMetadata conflicts instead of clobbering under a stale version
- resetIdempotency clears the pre-gate claim slot, not just the lookup,
so a resolved/pending claim can't keep deduping past reset
- claimMollifierIdempotency guards a falsy GET before string.sub
- re-export AcceptResult (accept's public return type) and
makeIdempotencyClaimKey from the package index
- correct stale "TTL expired" comments (no accept-time TTL anymore) and
the mutateSnapshot doc (FAILED returns not_found, not busy)
Tests: listForEnvWithWatermark coverage (page-1, page-N, tied-score
continuation, orphan skip, empty/guard), fail clears idempotency lookup,
casSetMetadata busy on materialised entry, set_metadata/CAS version
interleave, resetIdempotency clears claim slot.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 0a22252 commit 8febda2
3 files changed
Lines changed: 421 additions & 21 deletions
0 commit comments