Аудит конечных автоматов на гонки и ABA
testing
audit-state-machine is a Claude Code skill that builds complete transition tables for the cache's explicit state machines and checks every reachable interleaving for illegal transitions, missed transitions (lost wakeups), and ABA problems. Three machines are covered: drain status (IDLE / REQUIRED / PROCESSING_TO_IDLE / PROCESSING_TO_REQUIRED), node lifecycle (alive → retired → dead), and async-value lifecycle. For each machine the skill traces transition sites, opaque and CAS access patterns, and correctness under the Java Memory Model — not merely sequential consistency. The drain/maintenance path is the priority target after a recent change that introduced inline-assist when the write buffer is full; checks include lost wakeup on the PROCESSING_TO_IDLE→IDLE CAS, double-schedule races, opaque-read staleness, and pacer coupling. Each finding includes a thread-by-thread interleaving, the illegal or missed transition, the observable consequence (wedged cache, stranded future, resurrected dead node), and a Fray skeleton when the interleaving cannot be resolved statically.
- #state-machine
- #concurrency
- #synchronization
- #maintenance-cycle
- #auditing