← Back to PRs

#12365: test(heartbeat): don't skip empty HEARTBEAT.md for cron wake events

by tyclaudius-ai open 2026-02-09 05:48 View on GitHub →
docs gateway stale
Adds regression test to ensure cron wake events (reason=cron:*) are not skipped by the empty-HEARTBEAT.md optimization.\n\nContext: #11766 <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR updates the heartbeat documentation to clarify that an empty `HEARTBEAT.md` currently causes heartbeat runs to be skipped, and notes common scenarios (e.g., bootstrap creating an empty file) and workarounds. It also adds a regression test in `src/infra/heartbeat-runner.returns-default-unset.test.ts` to assert that when the wake reason is `cron:*`, `runHeartbeatOnce` should not apply the “empty HEARTBEAT.md” optimization and should still run the heartbeat (including calling `getReplyFromConfig` and sending the configured outbound message). <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk. - Changes are limited to a documentation clarification and a targeted regression test. The new test matches the current `runHeartbeatOnce` behavior (cron reasons bypass the empty-HEARTBEAT skip) and does not introduce production code changes. - No files require special attention <!-- greptile_other_comments_section --> <sub>(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!</sub> **Context used:** - Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8)) - Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13)) <!-- /greptile_comment -->

Most Similar PRs