mirror of
https://github.com/stablyai/orca.git
synced 2026-11-16 10:58:10 +00:00
* fix(plugins): don't count time asleep as worker idle time The idle reaper measured idleness with the wall clock, so after a sleep longer than the reap window its first sweep reaped every worker before their own timers could fire. A sweep gap well past the 60s interval now starts a fresh idle window. * fix(plugins): count a sleep before the first idle sweep as asleep, not idle Start the reaper's sleep-detection clock when the first worker starts, so the first sweep after waking can see the gap even if no sweep ran before the lid closed. * fix(plugins): keep worker manager under max-lines and restore real timers after sleep tests Move the idle-candidate filter into PluginWorkerIdleClock so the rebased manager stays within the 300-line lint cap, and reset fake timers after the idle-reap tests so the sleep-before-first-sweep case does not leak them. --------- Co-authored-by: petersindex <287557875+petersindex@users.noreply.github.com> Co-authored-by: Neil <neil@stably.ai>