Skip to content

Add schedule heartbeat check to agent-job-health to catch silent scheduling gaps - #53259

Merged
pelikhan merged 2 commits into
mainfrom
copilot/deep-report-audit-workflows-fix-schedule
Aug 17, 2026
Merged

Add schedule heartbeat check to agent-job-health to catch silent scheduling gaps#53259
pelikhan merged 2 commits into
mainfrom
copilot/deep-report-audit-workflows-fix-schedule

Conversation

Copilot AI commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

audit-workflows — the fleet's own reliability monitor — silently stopped firing for 41 days with no error, alert, or missing-data signal raised anywhere in the fleet. No workflow was watching whether the watchers themselves were still running on schedule.

Changes

  • New Phase 6 (Schedule Heartbeat Check) in agent-job-health.md: enumerates all schedule-triggered workflows, derives each one's expected cadence from its cron alias/expression, and looks up the timestamp of its most recent run (any status) via the GitHub Actions API.
  • Blind-spot detection: flags a workflow as silent when its last run exceeds 2x the expected cadence + 1 day of slack (e.g., a daily workflow silent for more than 3 days).
  • Reporting: adds a "Schedule Heartbeat" section to the published discussion summarizing any blind spots found, or stating none exist.
  • Issue creation: a detected blind spot can now trigger an issue on its own, independent of the existing failure-rate-cluster criteria; avoids duplicating already-tracked blind spots.
  • No-op / scope updates: no-op criteria and in-scope guidelines updated to reflect the new check; added an eval (schedule_heartbeat_checked) to verify the agent performs it.

This generalizes the fix beyond audit-workflows specifically — the heuristic applies to any of the ~194 schedule-triggered workflows in the fleet, closing the broader gap where no workflow monitors the monitors' own schedule health.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix audit-workflows schedule issue for reliability monitoring Add schedule heartbeat check to agent-job-health to catch silent scheduling gaps Aug 17, 2026
Copilot AI requested a review from pelikhan August 17, 2026 01:07
@pelikhan
pelikhan marked this pull request as ready for review August 17, 2026 01:13
Copilot AI balanced review requested due to automatic review settings August 17, 2026 01:13
@pelikhan
pelikhan merged commit cdba8cc into main Aug 17, 2026
@pelikhan
pelikhan deleted the copilot/deep-report-audit-workflows-fix-schedule branch August 17, 2026 01:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds schedule-heartbeat monitoring to detect workflows that silently stop running.

Changes:

  • Checks scheduled workflow cadence and reports blind spots.
  • Allows heartbeat failures to trigger deduplicated issues.
  • Adds evaluation coverage and recompiles the workflow.
Show a summary per file
File Description
.github/workflows/agent-job-health.md Adds heartbeat detection and reporting instructions.
.github/workflows/agent-job-health.lock.yml Updates generated metadata and evaluations.

Review details

Suppressed comments (2)

.github/workflows/agent-job-health.md:141

  • This guarantee conflicts with Phase 0 (lines 70–71), which gives up and calls noop when the logs MCP fails, and with line 197, which still no-ops unconditionally when logs cannot be retrieved. Because this heartbeat uses the separate GitHub Actions API, those failures must not suppress Phase 6; update both fallback paths to continue the heartbeat and report/create an issue when it finds a blind spot.
This check is independent of the last-24-hour run collection in Phase 1 and must always run, even when Phase 1 finds zero runs in the window.

.github/workflows/agent-job-health.md:138

  • Handle workflows with zero scheduled runs. The current comparison requires a timestamp, so a newly added workflow whose schedule has never fired can be omitted even after it becomes overdue. Use the Actions workflow creation time as the baseline and flag it once the same threshold is exceeded.
- Flag a **blind spot** when the gap since that last run exceeds `2x` the expected cadence plus one day of slack (for example, a daily workflow silent for more than 3 days, or a weekly workflow silent for more than 15 days).
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced


- List every workflow file with a `schedule:` trigger in `.github/workflows/*.md` frontmatter (exclude the `shared/` includes and workflows whose only trigger is `workflow_dispatch`).
- For each schedule-triggered workflow, resolve the expected cadence from its cron alias or expression (for example `daily` → 24h, `weekly` → 7d, `hourly` → 1h; for an explicit cron string, derive the implied interval).
- Use the GitHub Actions API (`list_workflow_runs` on the corresponding `.lock.yml`, any status, most recent first) to find the timestamp of the **most recent run of any kind** (not just successful runs) for that workflow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[deep-report] audit-workflows (the fleet's own reliability monitor) silently missed its schedule for 41 days

3 participants