mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-16 19:59:26 +00:00
The real cause of the 13.3 replay wall. Every cache publication called `_make_room`, which listed and stat'ed every entry to total the cache size, and a push publishes one answer per question -- 22,125 on a WordPress plugin. Measured on the live replay cache: one scan 0.68 s at 12,238 entries, ~70 minutes spent scanning by then, ~2.3 hours to finish the evidence pass. The engine was idle while the Python process sat at 83% CPU; the 13/31/51-minute portions were the quadratic growing. The scan is now remembered, keyed by the cache root's modification stamp: our own publications and evictions update the tally in place, and any change another process makes moves the stamp and forces a rescan, so the size limit stays exact under concurrent pushes. Lock stripes are created up front so their first use never invalidates the tally. Eviction order and lease handling are unchanged. Controls: 61 publications (one a same-key replacement) take exactly one scan and the tally equals a fresh scan; a second writer on the same root forces a rescan and the limit holds. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo