Skip to content

feat(ci): Add CI failure RCA dispatch workflow - #110471

Closed
hubertdeng123 wants to merge 2 commits into
masterfrom
ci-failure-rca-workflow
Closed

hubertdeng123 wants to merge 2 commits into
masterfrom
ci-failure-rca-workflow

Conversation

@hubertdeng123

Copy link
Copy Markdown
Contributor

Adds a workflow_dispatch workflow that automatically scans recent CI failures and performs root cause analysis using a Claude Code agent running inside a Coder workspace.

Motivation: When CI is broken and deploys are blocked, engineers spend significant time manually triaging failures — checking if they're flaky tests, code regressions, or infrastructure issues. This automates that investigation across multiple failures at once, identifying patterns and prioritizing action items.

How it works:

  1. Collect — Scans recent failed runs (configurable 5-20) across backend/frontend/acceptance workflows. Collects job-level failure details and cross-failure stats (most failing jobs, failures by branch).
  2. Analyze — Spins up a Coder workspace via coder/setup-action, SSHs in, and runs Claude Code with a structured prompt. The agent checks out failing commits, reads test code, attempts reproduction, and produces a structured JSON report with root causes ranked by blast radius.
  3. Report — Creates a GitHub issue with the RCA findings, and optionally posts to Slack for deploy-blocked severity.

Configurable inputs:

  • failure_count (5-20): How many recent failures to analyze
  • workflow_filter: all / backend / frontend / acceptance
  • branch_filter: Scope to a specific branch (e.g. master)
  • severity: deploy-blocked / flaky-investigation / general
  • notify_slack: Force Slack notification

Required secrets: CODER_SESSION_TOKEN, CI_FAILURES_SLACK_WEBHOOK (optional)

Modeled after the Coder preview workspace pattern in #109729.

Adds a workflow_dispatch workflow that scans recent CI failures (configurable
5-20), spins up a Coder workspace, and runs a Claude Code agent to perform
root cause analysis across multiple failures. Produces structured reports
with cross-failure pattern analysis, prioritized action items, and posts
results as GitHub issues and optionally to Slack.

Uses coder/setup-action for CLI setup and authentication.
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 11, 2026
GitHub Actions output is sufficient for now. Removes the notify_slack
input, Slack webhook secret dependency, and the Slack posting step.
@getsantry

getsantry Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you add the label WIP, I will leave it alone unless WIP is removed ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry Bot added the Stale label Apr 2, 2026
@getsantry getsantry Bot closed this Apr 10, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 25, 2026

This branch was successfully deployed

1 active deployment
Preview — 115ca10e Deployed Mar 11, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant