You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(llc): auto-pause overwrites a stop status; unfiled recovery logs a second failure (#21055 follow-up) #21190
Follow-ups from unresolved review threads on merge train PR #21184, member PR #21055 (issue #20202). Not blocking.
autobot-backend/llc/scheduler/auth_failure.pypause_after_auth_failure calls ControlsService.pause_agent (autobot-backend/llc/services/controls_service.py), whose UPDATE is unconditional and stores the current status as pre_pause_status. If a board member paused or terminated the agent while a run was in flight, the later auth failure overwrites that status, and a second pause makes pre_pause_status equal paused, so resume leaves it paused. The defect lives in pause_agent (the quota-exhaustion auto-pause shares it); make the transition conditional and atomic there, once.
autobot-backend/llc/scheduler/liveness_monitor.py_log_unfiled_recovery: writes a second heartbeat.failed activity entry for the same run when recovery Bug creation fails, so dashboards and filtered counts show two failures. Use a distinct action, keeping the recovery_unfiled details.
autobot-backend/llc/tests/test_work_item_hierarchy_18978.py:490: the mocked audit raises before any write, so the test passes without begin_nested(). Add a test with a real activity flush failure that checks the earlier recovery changes persist and the unfiled row does not.
Acceptance criteria
pause_agent does not overwrite a paused/terminated status or its pre_pause_status
The pause_agent overwrite race named here (an unconditional UPDATE overwriting pre_pause_status; a system pause over a terminated or operator-paused agent) is the root defect already filed as #21056, which predates #21055. #21055 adds a further trigger (the auth-failure auto-pause), not the defect itself. Fix the root once in #21056; track only the remaining #21055-specific minors here.
Activity
mrveiss commentedon Nov 8, 2026
The
pause_agentoverwrite race named here (an unconditional UPDATE overwritingpre_pause_status; a system pause over a terminated or operator-paused agent) is the root defect already filed as #21056, which predates #21055. #21055 adds a further trigger (the auth-failure auto-pause), not the defect itself. Fix the root once in #21056; track only the remaining #21055-specific minors here.