ワンクリックで
audit-map-contract
Audit ConcurrentMap and Map contract compliance for asMap() view
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Audit ConcurrentMap and Map contract compliance for asMap() view
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Audit the adaptive window hill-climber and region-resize logic for implementation defects (not algorithm quality)
JSR-107 (JCache) spec-conformance audit
Audit explicit state machines (drain status, node lifecycle, async-value lifecycle) for illegal or missed transitions
Heavyweight history-mining bug audit. Walks the caffeine module's git history chronologically (oldest to HEAD), maintains a forward-tracked issue database, and surfaces concerns introduced by past commits that were never resolved. Catches bugs that snapshot mining cannot — half-fixes invisible from current state, latent+trigger pairs across multi-commit interactions, and partial refactors. Slow (model/effort-dependent; ~24h on Opus + max effort) and rare-run (every several months or before a major release).
Differential audit comparing matched code paths that should behave identically. Spawns one auditor per sibling pair (sync/async, bounded/unbounded, view consistency, bulk vs single, generated node variants, read fast vs slow, adapter conformance) and requires a concrete witness scenario where the two paths diverge observably.
Find places where documented API contracts and the implementation diverge
| name | audit-map-contract |
| description | Audit ConcurrentMap and Map contract compliance for asMap() view |
| context | fork |
| agent | auditor |
| disable-model-invocation | true |
Audit compliance with java.util.concurrent.ConcurrentMap and java.util.Map contracts.
Map contract: equals/hashCode consistency, putAll atomicity (if weigher throws mid-batch), replaceAll per-entry atomicity, containsValue consistency.
ConcurrentMap contract: compute/computeIfAbsent/merge atomicity ("mapping function applied at most once"), getOrDefault on expired entries, forEach with concurrent mutations, compute returning null (should remove entry).
Null handling: NullPointerException at correct points for null keys/values. Mapping functions returning null (compute→remove, merge→remove). putIfAbsent(key, null) behavior.
Entry/EntrySet contracts: Map.Entry.setValue() write-through, entrySet remove/contains checking both key AND value, snapshot vs live entries.
Collection view contracts: keySet().remove() removing from cache, values().remove() semantics, views backed by cache (bidirectional changes).
Cache semantics interaction: expired-but-present entries visible via asMap()? Collected weak keys visible? asMap() operations triggering listeners? asMap().put() vs cache.put() differences (access time, stats, refresh)?
For each violation: quote the JDK contract requirement, show actual behavior, provide a test case.