mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-31 08:13:11 +03:00
A single OSError from _save_store() (disk full, permission change, locked file) escaped _on_timer's try/finally and killed the asyncio timer task, because _arm_timer() sits outside the block. All scheduled jobs silently stopped until restart or a manual re-arm via add_job/update_job/remove_job. Move _arm_timer() into the finally block and guard the whole tick body (including _load_store, which can persist during agent-binding migrations) so a transient persistence failure is logged and retried on the next tick instead of killing the scheduler. Add test_save_store_failure_does_not_kill_scheduler to cover the failure path that existing tests (which mock _arm_timer) never exercised.