← Back to PRs

#6094: auto-reply: ignore HTML comments in heartbeat check

by rudrapanchal81 open 2026-02-01 08:30 View on GitHub →
- strip single-line and multi-line HTML comments before testing heartbeat content - preserve state across lines so trailing comments don’t trigger false positives - add unit coverage for comment-only files and mixed comment/task scenarios <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR updates `isHeartbeatContentEffectivelyEmpty` to strip HTML comments (`<!-- ... -->`) before evaluating whether HEARTBEAT.md contains actionable content, including support for multi-line comments by tracking “in comment” state across lines. It also adds unit tests covering comment-only files, mixed comment/task content, and multi-line HTML comment blocks. The change fits into the auto-reply heartbeat flow by reducing false positives when HEARTBEAT.md contains only HTML comments (or comments around tasks), so the heartbeat check more accurately decides when there is meaningful work to do. <h3>Confidence Score: 4/5</h3> - This PR is likely safe to merge; changes are small, localized, and covered by new unit tests. - The logic change is confined to comment-stripping within `isHeartbeatContentEffectivelyEmpty` and is exercised by added tests for single-line and multi-line HTML comments plus mixed content. Main remaining risk is semantic: stripping `<!-- -->` sequences could remove intended literal content if users include them in tasks, so clarifying intended behavior with an additional test would improve confidence. - src/auto-reply/heartbeat.ts <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</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