Аудит арифметических ошибок в коде кэша
testing
audit-arithmetic is a Claude Code skill that performs a systematic audit of arithmetic and boundary bugs in Caffeine cache code. Running in fork context with a dedicated auditor agent and no direct model invocation, it starts from the assumption that at least one bug exists in the reviewed code. The skill checks off-by-one errors, incorrect inequality direction, int/long overflow including nanoTime arithmetic, implicit narrowing or widening conversions, sign errors, sentinel value collisions, counter drift over long-running caches, timer wheel modular arithmetic, FrequencySketch counter saturation and reset, hill climber log-ratio density calculations, adaptive window partition denominators, stride and commitment rung tables, and sign conventions in UpdateTask when weights approach Integer.MAX_VALUE. Each suspected defect must be supported by a concrete input, a step-by-step evaluation trace, and a clear expected-vs-actual comparison.
- #cache
- #arithmetic
- #overflow
- #boundary-conditions
- #auditing