Parent umbrella issue: #408
Source audit: Weekly tech debt audit: dispatch - 2026-06-17
Source audit date: 2026-06-17
Original recommendation
P3 — Expand src/lib/heartbeat.test.ts to cover aggregation, touchedIssueUrls, and warning/error bucketing.
Matched top finding
src/lib/heartbeat.test.ts is 82 lines and only covers the runSyncBestEffort / runReconcileBestEffort happy/empty paths. The 184-line heartbeat.ts includes aggregation, touchedIssueUrls collection, and warning/error bucket logic that is not covered. The integration is covered by src/app/api/agents/[agentName]/heartbeat/route.test.ts (412 lines) but the unit-level coverage is thin.
Evidence:
wc -l src/lib/heartbeat.ts src/lib/heartbeat.test.ts → 184 vs 82.
grep -c "describe\|it(" src/lib/heartbeat.test.ts → 2.
Parent umbrella issue: #408
Source audit: Weekly tech debt audit: dispatch - 2026-06-17
Source audit date: 2026-06-17
Original recommendation
P3 — Expand
src/lib/heartbeat.test.tsto cover aggregation,touchedIssueUrls, and warning/error bucketing.Matched top finding
src/lib/heartbeat.test.tsis 82 lines and only covers therunSyncBestEffort/runReconcileBestEfforthappy/empty paths. The 184-lineheartbeat.tsincludes aggregation,touchedIssueUrlscollection, and warning/error bucket logic that is not covered. The integration is covered bysrc/app/api/agents/[agentName]/heartbeat/route.test.ts(412 lines) but the unit-level coverage is thin.Evidence:
wc -l src/lib/heartbeat.ts src/lib/heartbeat.test.ts→ 184 vs 82.grep -c "describe\|it(" src/lib/heartbeat.test.ts→ 2.