Skip to content

fix: pulse monitoring loop heartbeat prevents watchdog kill#4587

Merged
marcusquinn merged 1 commit intomainfrom
bugfix/pulse-heartbeat-log
Mar 14, 2026
Merged

fix: pulse monitoring loop heartbeat prevents watchdog kill#4587
marcusquinn merged 1 commit intomainfrom
bugfix/pulse-heartbeat-log

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Mar 14, 2026

Summary

The wrapper's progress detector kills the pulse LLM session if the log file doesn't grow for 600s. The monitoring loop's sleep 60 produces no output, so after ~10 minutes of sleeping + checking slots, the detector sees "no progress" and kills a productive session. This causes the batch-and-idle pattern where workers dispatch, finish, and then nothing refills slots until the next full cycle.

Fix: Add an echo heartbeat line before each sleep 60 in the monitoring loop instructions (pulse.md). The LLM writes a one-liner with cycle number, active workers, and elapsed time — giving the watchdog the progress signal it needs while keeping all dispatch intelligence in the LLM.

Evidence

Production logs show repeated Pulse cold-start stalled for 600s — no first output — killing entries, followed by active 0/24, deficit 100% on the next cycle. The monitoring loop was being killed before it could refill slots.

Summary by CodeRabbit

  • New Features
    • Added heartbeat logging to the monitoring loop that displays cycle number, active worker count, and elapsed time before each pause interval.

The wrapper's progress detector kills the pulse session if the log file
doesn't grow for 600s. The monitoring loop's sleep 60 produces no output,
so the detector sees 'no progress' and kills a productive session. Adding
an echo before each sleep keeps the detector happy while the LLM retains
full control of dispatch decisions.
@gemini-code-assist
Copy link

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions github-actions bot added the bug Auto-created from TODO.md tag label Mar 14, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 14, 2026

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

Adds a heartbeat log message to the monitoring loop's sleep step in the pulse script. The log line outputs cycle count, active/total worker counts, and elapsed time before the 60-second sleep interval, providing visibility into monitoring loop health and cadence.

Changes

Cohort / File(s) Summary
Monitoring Loop Instrumentation
.agents/scripts/commands/pulse.md
Added heartbeat log output prior to sleep cycle, capturing monitoring loop metrics (cycle, active/total workers, elapsed time) for observability.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

bug

Poem

💓 A heartbeat echoes in the loop,

Tick-tock, the pulse beats true,

Workers dance, the seconds fly,

Logging health before we sleep,

A-grade automation stays alive. ⚡

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main fix: adding a heartbeat log to prevent watchdog timeout during the pulse monitoring loop's sleep periods.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfix/pulse-heartbeat-log
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 413 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sat Mar 14 04:16:22 UTC 2026: Code review monitoring started
Sat Mar 14 04:16:22 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 413

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 413
  • VULNERABILITIES: 0

Generated on: Sat Mar 14 04:16:25 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

@marcusquinn marcusquinn merged commit 3d805fd into main Mar 14, 2026
25 of 26 checks passed
@marcusquinn marcusquinn deleted the bugfix/pulse-heartbeat-log branch March 14, 2026 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Auto-created from TODO.md tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant