Audit Coverage Gaps audit-coverage-gaps

Discover test coverage gaps that could hide correctness defects

Works in Claude, ChatGPT, Codex and more
Our test
—
not tested yet
GitHub stars
18k
ben-manes/caffeine
Added by
0
members
Updated
Dec 6
commit a618bb9
Content
1 file
no scripts · 2 KB
License
Apache 2.0
free to use

What our test found

Not tested yet. Our model tries every skill on a realistic request and scores the result, the most popular skills first. Until then, the safety checks on the right still apply.

View on GitHub ↗
name: audit-coverage-gaps
description: Discover test coverage gaps that could hide correctness defects
context: fork
agent: auditor
disable-model-invocation: true

Assume the existing tests miss at least one real defect.

  1. For each public method, identify the hardest-to-test edge cases:
  2. Null values (where permitted)
  3. Maximum/minimum weight
  4. Zero-duration expiration
  5. Mapping functions that return the same instance
  6. Mapping functions that throw
  7. Weighers that throw
  8. Expiry callbacks that throw
  9. CompletableFuture values (async cache edge cases)
  10. Keys/values with adversarial hashCode/equals
  1. For each edge case, trace the code path. Does the code handle it correctly?
  1. Identify combinatorially hard behavioral dimensions:
  2. Operation A on expired entry during concurrent operation B
  3. Exception in user callback X while holding lock Y
  4. GC collecting reference R between code points P and Q
  5. Fast path falls through to slow path under contention (e.g., entry appears expired on fast path, recovers under lock on slow path)
  6. Async cache: future completes between check and action (e.g., isComputingAsync returns true, but future completes before the code that depends on that check executes)
  1. For each candidate gap, provide a minimal test case with the specific cache configuration and thread interleaving needed to reach the code path.

Priority ordering:

  • Paths involving the catch-commit-rethrow pattern (doComputeIfAbsent, remap)
  • Slow paths reachable only via contention (synchronized blocks after optimistic checks)
  • Interactions between expiration and the async value lifecycle (ASYNC_EXPIRY, isComputingAsync)

Focus only on behavioral coverage gaps that could hide correctness bugs.