Audit Iteration audit-iteration

Analyze concurrent iteration and view consistency guarantees

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 · 1 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-iteration
description: Analyze concurrent iteration and view consistency guarantees
context: fork
agent: auditor
disable-model-invocation: true

Analyze the concurrent iteration and view behavior of the cache.

Assume at least one view operation can observe inconsistent state under concurrent modification. If your analysis yields zero findings, re-examine expired-but-present entries and dead/retired node visibility — explain specifically why no user-observable inconsistency is possible.

View operations to analyze:

  • asMap().entrySet/keySet/values() iteration
  • asMap().forEach()
  • asMap().size()
  • asMap().containsValue()
  • Snapshot operations (policy().eviction().hottest/coldest)

For each:

  1. What consistency guarantee? (Snapshot? Weakly consistent? Sequentially consistent?)
  2. Can iteration observe:
  3. A retired or dead node?
  4. An entry whose key/value has been garbage collected?
  5. An expired but not-yet-cleaned-up entry?
  6. A node with inconsistent key/value (key from one version, value from another)?
  7. Can concurrent put/remove/compute cause the iterator to:
  8. Skip an entry that existed for the entire iteration?
  9. Return the same entry twice?
  10. Throw ConcurrentModificationException?
  11. Does wrapping ConcurrentHashMap iterators introduce issues CHM wouldn't have?

For each issue: construct a concrete interleaving and state whether it violates the documented contract or is expected weakly-consistent behavior.