Аудит безопасности исключений в кэше Caffeine
testing
audit-exception-safety is a Claude Code skill that audits exception safety and failure atomicity across every throw site in a Caffeine cache implementation. Running as a model-invocation-free auditor agent, it covers eight throw-site categories: user-provided code (CacheLoader, Weigher, Expiry, compute mapping functions, RemovalListener/EvictionListener) and runtime errors (OutOfMemoryError, StackOverflowError, RejectedExecutionException). For each site the skill enumerates mutations already committed before the throw, determines whether the catch block rolls back or commits, and checks for phantom entries, orphaned WeakReferences, weightedSize counter drift, lost eviction or removal notifications, leaked CompletableFutures, and stuck refresh flags. The highest-priority target is the catch-commit-rethrow pattern in doComputeIfAbsent and remap, historically the most fragile path. In the JCache adapter, it additionally traces CacheWriter partial-failure bookkeeping, EntryProcessor, ExpiryPolicy, and Copier serialization failures in store-by-value mode.
- #exception-safety
- #concurrency
- #cache-correctness
- #atomicity
- #memory-safety
- #caffeine