{"slug": "ci-watchdog-the-autonomous-ci-minutes-spend-sentinel-with-open-ai-failure-triage", "title": "CI Watchdog — The Autonomous CI Minutes & Spend Sentinel with Open AI Failure Triage", "summary": "A developer built CI Watchdog, an open-source GitHub App and SaaS platform that autonomously cancels redundant GitHub Actions runs and triages failed builds using open-weight AI models such as Gemma and Gemini 3.8 Flash. The tool pairs a pure, side-effect-free rule engine (SUPERSEDED, RUNAWAY_DURATION, MISSING_CONCURRENCY, STALE_ON_CLOSE) with an AI investigator that returns root cause, failed step, category, and remediation steps, plus a human approval queue and ROI calculator modeling runner costs from $0.008/min on Ubuntu to $0.160/min on Apple Silicon. The TypeScript monorepo uses Turborepo and pnpm, with a Node.js webhook service on Render and a Next.js 16 dashboard on Vercel.", "body_md": "An autonomous GitHub App and SaaS platform that stops wasted CI spend before it hits your invoice, and automatically diagnoses broken builds using open-weight AI.\n\nEvery developer has that one friend or team lead who dreads the 20th of the month: the day GitHub sends the notification:\n\n**\"You have used 100% of your included GitHub Actions minutes.\"**\n\nI built **CI Watchdog** for my friend and engineering teammate, who was constantly battling ballooning CI bills and jammed pipeline queues on open-source and startup projects.\n\n**The problems:**\n\n**The solution:**\n\n`concurrency` blocks and generates 1-click YAML fixes.\n| Route | Feature | Description | \n|---|---|---|\n| `/app` | Control Room Overview | Live and dry-run minutes-saved counters, real-time system status indicators, and weekly savings charts. | \n| `/app/investigations` | AI Investigations | Instant root-cause diagnostic cards generated by Gemma / Gemini 3.8 Flash, with failure hypotheses, log evidence snippets, and recommended next steps. | \n| `/app/decisions` | Decision Engine & CSV Export | Full searchable decision history with rule and status filters, plus 1-click CSV download for engineering management reports. | \n| `/app/approvals` | Human Approval Queue | First-N quota approval flow with 1-click **Approve** and**Deny** buttons. | \n| `/app/digest` | Interactive ROI Calculator | Real-time savings simulator modeling monthly minute volume and runner tiers (see pricing below). | \n\n**Runner pricing used in the ROI calculator:**\n\n| Runner | Cost per minute | \n|---|---|\n| Ubuntu | $0.008 | \n| Windows | $0.016 | \n| macOS | $0.080 | \n| Apple Silicon (M-series) | $0.160 | \n\nThe entire codebase is open-source and structured as a high-performance TypeScript monorepo using **Turborepo** and **pnpm**:\n\n| Path | Description | \n|---|---|\n| `apps/watchdog` | Event-driven Node.js background service deployed on Render. Connects to the GitHub App webhook stream, processes workflow states, runs the pure rule engine, and coordinates AI triage. | \n| `apps/dashboard` | Next.js 16 (Turbopack) dashboard deployed on Vercel with Shadcn UI, Auth.js (OAuth with GitHub & Google), and real-time state synchronization. | \n| `config/watchdog.yml` | Declarative team policies with per-repository overrides. | \n\nThe rule engine (`apps/watchdog/src/rules/`) was designed to be 100% pure with zero side effects. Given the current run, sibling runs, historical durations, and workflow YAML, it evaluates four rules:\n\n| Rule | Behavior | \n|---|---|\n| `SUPERSEDED` | Cancels older runs queued on the same ref when a newer commit arrives. | \n| `RUNAWAY_DURATION` | Compares running jobs against historical p95 execution times and alerts/cancels if a job hangs. | \n| `MISSING_CONCURRENCY` | Scans workflow ASTs and alerts if jobs lack top-level concurrency cancellation blocks. | \n| `STALE_ON_CLOSE` | Immediately terminates active pipelines when a PR is merged or closed. | \n\nWhen a workflow concludes with a failure, CI Watchdog activates the AI investigator:\n\n| Field | Description | \n|---|---|\n| `rootCause` | Explicit technical diagnosis (e.g., missing Docker service container, database port refusal). | \n| `failedStep` | Exact bash command or step name that exited non-zero. | \n| `category` | One of: Infrastructure, Configuration, Test, or Code. | \n| `nextSteps` | Concrete remediation actions. | \n\nAutomated cancellation can be intimidating for developers, so I implemented strict safety rails:\n\n`main`, `master`, or `release/*` branches.\nOpen innovation is what makes a tool like CI Watchdog possible without compromising developer trust:\n\n*Built with ❤️ during Hacktoberfest. If your team is burning minutes on redundant CI runs, give CI Watchdog a spin!*", "url": "https://wpnews.pro/news/ci-watchdog-the-autonomous-ci-minutes-spend-sentinel-with-open-ai-failure-triage", "canonical_source": "https://dev.to/devtushark/ci-watchdog-the-autonomous-ci-minutes-spend-sentinel-with-open-ai-failure-triage-43gd", "published_at": "2026-10-05 03:38:55+00:00", "updated_at": "2026-10-05 03:42:45.738937+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "mlops", "ai-products"], "entities": ["CI Watchdog", "GitHub", "Gemma", "Gemini 3.8 Flash", "Turborepo", "pnpm", "Render", "Vercel"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/ci-watchdog-the-autonomous-ci-minutes-spend-sentinel-with-open-ai-failure-triage", "markdown": "https://wpnews.pro/news/ci-watchdog-the-autonomous-ci-minutes-spend-sentinel-with-open-ai-failure-triage.md", "text": "https://wpnews.pro/news/ci-watchdog-the-autonomous-ci-minutes-spend-sentinel-with-open-ai-failure-triage.txt", "jsonld": "https://wpnews.pro/news/ci-watchdog-the-autonomous-ci-minutes-spend-sentinel-with-open-ai-failure-triage.jsonld"}}