GH#3637: refactor(supervisor): extract _cleanup_eval_checkpoint() helper#4410
Conversation
…637) Address gemini-code-assist DRY suggestion from PR #4398 review. The eval checkpoint cleanup pattern was duplicated across Phase 0.7, Phase 1c, and Phase 4b. Extract into a shared _cleanup_eval_checkpoint() helper function to eliminate the repetition and improve maintainability. Also removes redundant 2>/dev/null suppression after the [[ -f ]] guard, as the bot noted this masks real errors (e.g. permissions) once file existence is already confirmed.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Review skipped — only excluded labels are configured. (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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: Fri Mar 13 07:59:27 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
|
Merged by supervisor pulse. All checks passing, review gate passed (coderabbitai). Resolves GH#3637. |



Summary
Addresses the unresolved inline review suggestion from gemini-code-assist on PR #4398.
The bot flagged (medium priority) that the eval checkpoint cleanup pattern was duplicated across three recovery phases and suggested extracting it into a shared helper function following the DRY principle. It also noted that
2>/dev/nullis redundant after a[[ -f ]]existence check and can mask real errors (e.g. permissions).Changes
_cleanup_eval_checkpoint()helper (after_update_task_heartbeat(), ~line 562): takestask_idandphase_name, removes the checkpoint file if it exists, logs vialog_verbose. Removes the redundant2>/dev/nullsuppression as the bot recommended._cleanup_eval_checkpoint "$stale_id" "Phase 0.7"_cleanup_eval_checkpoint "$stuck_id" "Phase 1c"_cleanup_eval_checkpoint "$orphan_id" "Phase 4b"(guard onorphan_status == "evaluating"preserved)Verification
bash -n pulse.sh→ Syntax OKgrep -n _cleanup_eval_checkpoint_diagnose_stale_root_cause()(~line 271) is intentionally left as-is (it checks for the file's existence to emit a diagnosis, not to delete it)Closes #3637