⚠ SPEED CAVEAT: Slow deep-thinker: ~17-19 t/s, 5-9 min/prompt, ~5-9k tokens incl. reasoning. Fast for quality, not throughput.
tok/sec19.38
tokens9095
TTFT3.55s
▮ PILLAR BREAKDOWN
Complexity (O(1))
18/20
Concurrency / Races
15/20
Tx Isolation
12/20
Memory & Edges
16/20
Test Integrity
15/20
✓ WENT RIGHT
Complexity (O(1)) (18/20)
Memory & Edges (16/20)
✗ WENT WRONG
Tx Isolation (12/20)
▮ CRITICAL BUGS
rollback() is a sync method (line 213, 'def rollback') returning None, but the test awaits it (line 252, 'await tx2.rollback()') -> TypeError: object NoneType can't be used in 'await' expression. The whole test suite crashes at the rollback assertion. Fix: make it 'async def rollback()'.
_update_min_freq walks min_freq upward indefinitely with no upper bound; harmless while the cache is non-empty but an unbounded loop on a fully-drained cache.
No transaction lifecycle guard: after commit() or rollback(), a stale Transaction handle can still call put/get/delete/commit again (double-commit) with no error.
Transaction.get/commit acquire self.cache.lock directly — transactions share the cache's single lock rather than an isolation lock; correct for the buffer model but couples tx lifetime to cache lock contention.
▮ RECOMMENDED USE
The strongest LFU result from a non-coder model in this benchmark — nails true O(1) freq-bucket eviction with correct min_freq tracking and __slots__ where both specialist coder models (KAT, Qwen3-Coder) failed catastrophically. Let down by one signature bug: rollback() is sync but awaited.
▮ REFACTORED PATCH
# Fix 1 (fatal): rollback must be async to match 'await tx2.rollback()'
async def rollback(self):
self.pending_puts.clear()
self.pending_deletes.clear()
# Fix 2: bound _update_min_freq against a drained cache
def _update_min_freq(self):
if not self.freq_map:
self.min_freq = 0; return
while self.min_freq not in self.freq_map:
self.min_freq += 1
# Fix 3: lifecycle guard on Transaction
def __init__(self, cache):
self.cache = cache; self.pending_puts = {}; self.pending_deletes = set(); self._closed = False
def _check_open(self):
if self._closed: raise RuntimeError("Transaction already committed/rolled back")
async def commit(self):
self._check_open(); # ... existing body ...; self._closed = True
async def rollback(self):
self._check_open(); self.pending_puts.clear(); self.pending_deletes.clear(); self._closed = True