runner_health_rca
Flag problematic CI runners and queue bottlenecks: identifies offline, stale, or paused runners, long-queued jobs, and tag saturation, returning counts to guide RCA.
Instructions
[READ] Flag offline/stale/paused runners, long-queued jobs, tag saturation.
The flagship capacity RCA: pulls the runner fleet, flags each runner that is offline, stale (no contact for stale_contact_min minutes) or paused, lists jobs queued past queue_sec, and computes per-tag saturation (queued jobs vs online unpaused runners). Every flag carries its numbers. Pass 'runners' / 'queued_jobs' for pure analysis, or a target to pull the fleet live.
Args: stale_contact_min: Minutes since last contact at which a runner is stale. queue_sec: Seconds a job may wait before being flagged (default 300). saturation_ratio: Flagged queued jobs per online runner at which a tag is saturated (default 2.0). runners: Injected rows {id, description, status, paused, online, tags, contactedAt}; skips the live pull. queued_jobs: Injected rows {id, name, queuedDurationSec, createdAt, tags}. target: Server target name from config; omit for the default.
Returns dict: {runnersEvaluated, flaggedRunners, longQueuedJobs, saturatedTags, thresholds, note}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | ||
| runners | No | ||
| queue_sec | No | ||
| queued_jobs | No | ||
| saturation_ratio | No | ||
| stale_contact_min | No |