Skip to content

fix: clear recovery state on requeue_task#2

Merged
nikitaxru merged 3 commits intomainfrom
fix/requeue-clear-recovery
Mar 16, 2026
Merged

fix: clear recovery state on requeue_task#2
nikitaxru merged 3 commits intomainfrom
fix/requeue-clear-recovery

Conversation

@nikitaxru
Copy link
Copy Markdown
Contributor

@nikitaxru nikitaxru commented Mar 16, 2026

Summary

  • requeue_task (supervisor MCP tool) removed the task from the dispatched set and approved preflight, but never cleared the recovery failure counter
  • Tasks that hit max retries (retryable: false) could never be re-dispatched even after the underlying issue (e.g. missing repo config) was fixed
  • Now calls recovery.clear() to reset the failure counter, allowing the task to be picked up on the next poll

Context

QR-273 failed 3 times with "No repos configured" (config issue since fixed). After requeue_task, the orchestrator still refused to dispatch it because recovery state had retryable: false.

Test plan

  • Verify requeue_task clears recovery state by requeueing a previously-failed task
  • Confirm task gets dispatched on next poll cycle

🤖 Generated with Claude Code

…tasks

requeue_task removed the task from the dispatched set and approved
preflight, but never cleared the recovery failure counter. Tasks that
hit max retries (retryable: false) could never be re-dispatched even
after the underlying issue was fixed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cursor
Copy link
Copy Markdown

cursor bot commented Mar 16, 2026

PR Summary

Low Risk
Low risk: a small, localized change to the supervisor requeue_task tool to reset retry state, plus accompanying tests; no changes to core dispatch logic beyond passing a new callback through constructors.

Overview
Fixes supervisor requeue_task so re-queued tasks can be dispatched again by clearing the per-task recovery/failure state (in addition to removing the task from the dispatched set and re-approving preflight).

Threads a new clear_recovery_callback from OrchestratorSupervisorChatManager/build_supervisor_server, and adds focused tests covering both the callback-present and callback-absent paths. Also significantly condenses/updates CLAUDE.md guidance (style, quality, and testing rules) without runtime impact.

Written by Cursor Bugbot for commit 77bd03c. This will update automatically on new commits. Configure here.

nikitaxru and others added 2 commits March 16, 2026 16:22
Add TestRequeueTask class verifying clear_recovery_callback is invoked
on requeue, and that requeue works without it. Add info-level log when
recovery state is cleared.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@nikitaxru nikitaxru merged commit 1e1cc92 into main Mar 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant