Аудит дрейфа контрактов публичного API
testing
audit-contract-drift is a Claude Code skill that finds places where documented API contracts and the Caffeine cache implementation diverge. Rather than starting from code, it reads documentation first — collecting behavioral promises from javadoc `<b>Note:</b>` and `<b>Warning:</b>` blocks and language like "must", "will", and "guarantees" across `Caffeine.java`, `Cache.java`, `LoadingCache.java`, `AsyncCache.java`, `Policy.java`, `Weigher.java`, `Expiry.java`, and related files. Each promise is then traced through every code path that should honor it: direct API calls, `asMap()` view methods, bulk operations, the `synchronous()` round-trip, and serialization. The skill explicitly checks known drift patterns — identity vs. equals semantics for `weakKeys`/`softValues`, dropped `removalListener` notifications in async paths, and configuration loss across serialization versions. Every finding anchors both sides of the drift with the exact javadoc snippet and the divergent implementation, plus a minimal user-observable scenario where docs and code disagree.
- #cache
- #contract-verification
- #api-correctness
- #documentation
- #auditing