소스 정보
- 저장소
- ben-manes/caffeine
- 최근 소스 활동
- 2026년 7월 3일 18:46
- 감지된 SKILL.md 언어
- 영어
- 스타
- 17,831
- 포크
- 1,709
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
SOC 직업 분류 기준
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/ben-manes/caffeine --skill audit-contract-drift명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
Regenerate the window climber's adversarial trap traces and run the behavioral gate against the real cache in the simulator
Adversarial workload search for eviction-policy regret. Crafts, shrinks, and classifies workloads on which the adaptive window climber fails to close the gap to its achievable optimum, and routes each failure class to the mechanism responsible (controller, policy structure, or recovery layer)
Price each algorithmic step of the window climber by removing it, to find steps that no longer earn their keep and branches that no longer fire
| name | audit-contract-drift |
| description | Find places where documented API contracts and the implementation diverge |
| context | fork |
| agent | auditor |
| disable-model-invocation | true |
Most audits read code; this one reads documentation first and then traces each promise to every implementation path that should honor it. The bugs caught here are not concurrency or arithmetic defects — they are quiet contradictions between what the javadoc promises and what the code does.
Build a list of behavioral promises from public API docs, then trace each one to every code path that should honor it.
Sources of contracts to enumerate:
Caffeine.java — every <b>Note:</b> and <b>Warning:</b> block in a
builder method's javadoc. Pay particular attention to:
weakKeys, weakValues, softValues — equality semantics flip to
identity (==) for the configured strengthexpireAfter*, refreshAfterWrite — duration constraints, what
"expired" means at boundariesmaximumSize, maximumWeight — eviction triggering and amortizationremovalListener, evictionListener — when and how notifications fireCache.java, LoadingCache.java, AsyncCache.java, AsyncLoadingCache.java
— javadoc of every method, especially "must", "will", "guarantees",
"for any reason" language.Policy.java — every method's documented behavior.Weigher.java, Expiry.java, RemovalListener.java, RemovalCause.java
— user-facing contracts referenced by the cache..claude/rules/*.md and in internal-class javadoc across all modules (e.g.
jcache's EventDispatcher requires every publishing thread to drain via
awaitSynchronous/ignoreSynchronous; async operations must register with the
in-flight set). Enumerate each obligation, then verify every call site honors
it — including executor-thread and refresh paths that don't flow through the
obvious entry points.For each contract, record the exact wording, the configurations that activate it, and the set of operations affected.
Then trace each promise through every code path that should honor it:
Cache / LoadingCache / AsyncCacheasMap() view methods (size, isEmpty, containsKey, containsValue,
get, put, remove(k), remove(k,v), replace, compute*, merge,
equals, hashCode)asMap().keySet() / values() / entrySet() — contains, remove,
removeAll, retainAll, removeIf, iterator, spliteratorputAll, getAll, getAllPresent, invalidateAll)AsyncCache.synchronous() round-trip — does the sync view honor the same
contract as the async cache?A path that uses a different equivalence, ordering, or visibility from what the contract promises is a contract drift finding. So is a path that silently downgrades a configuration on round-trip.
Common drift patterns to check explicitly:
weakKeys/weakValues/
softValues promise identity, but view collections that use
o.equals(value) or Collection.contains(value) may apply the user's
equality semantics instead.size, isEmpty,
equals, hashCode, and iterators on the same view.removalListener documented to fire
for any cause, but async paths may drop notifications for null or
exceptional completions.compute(k, (k,v) -> v) is
documented one way but updates timestamps/weight regardless.size() documented as estimate: this is an explicit out — verify it
is actually documented as an estimate everywhere it diverges from logical
presence.synchronous()
view's asMap() may treat in-flight entries inconsistently across query,
mutation, and cardinality methods.Each finding should anchor both sides of the drift — the source of the contract (file + javadoc snippet) and the divergent implementation (file + method) — and include a minimal user-observable scenario where the docs and the code disagree.