t263: Fix deploying auto-recovery infinite loop#1036
Conversation
- Add deploying_recovery_attempts field to tasks table - Implement persistent counter across pulse cycles (max 10 attempts) - Add explicit error handling with fallback direct SQL - Prevent infinite recovery loops when cmd_transition fails - Reset counter on successful recovery
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Wed Feb 11 00:34:35 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |



Summary
Fixes the deploying auto-recovery infinite loop by adding a persistent loop guard, explicit error handling, and fallback direct SQL updates.
Problem
The auto-recovery logic in Step 4b had a critical flaw: the
retry_countvariable was local and reset on every pulse cycle. This allowed infinite recovery attempts across pulses:deploying→ 3 retry attempts fail → staysdeployingdeploying→ counter resets → 3 NEW attempts fail → staysdeployingAdditionally, if
cmd_transitiontofailedalso failed (line 8637), the task would remain stuck indeployingstate indefinitely.Solution
1. Persistent Loop Guard (t263)
deploying_recovery_attemptscolumn to tasks table2. Explicit Error Handling
failed3. Fallback Direct SQL
cmd_transitionfails (both todeployedand tofailed), use direct SQL UPDATEdeployingforeverChanges
Database Schema
deploying_recovery_attempts INTEGER NOT NULL DEFAULT 0to tasks tablesupervisor-helper.sh initStep 4b Auto-Recovery Logic
cmd_transitionfailsTesting
✅ All tests passed:
Integration Test Results
Impact
Related