Misfire
advisory CI-failure explainer · real vs. flaky

Know why the build misfired.

On a red build, Misfire runs an AI investigation of the CI failure and posts a single advisory PR comment — root cause, and whether the failure is real or likely flaky. It never blocks, merges, or changes code.

.github/workflows/misfire.yml
on:
  workflow_run:
    workflows: ["CI"]
    types: [completed]
jobs:
  explain:
    if: github.event.workflow_run.conclusion == 'failure'
    steps:
      - uses: ericmhayes/misfire-ci@v0
Misfire mascot — a worried V-engine working out why it misfired
What it does

A red build goes in. An advisory comes out.

Misfire investigates over shared tools — the failing logs, the PR diff, and the test's history — then posts one comment it renders itself. You read it; nothing is blocked.

the failing run

CI · run #1472 · failure
____ test_auth_status ____
E   AssertionError: expected 'active' got 'pending'
tests/test_auth.py:42: AssertionError

# agent: get_failing_logs → get_pr_diff →
#        get_test_history → post_pr_comment

the advisory comment

🔧 Misfire — build failure analysis
Root cause: auth.py:42 changed status 'active'
→ 'pending', so test_auth_status now fails.
Category: test_assertion
Confidence: 90%

Verdict: 🔴 Likely a real failure (95%) —
passed on every recent unrelated run and
failed only on the commit under test.

— advisory only, nothing was changed or blocked.
Why it's different

Trustworthy by design

🛟

Advisory, never blocking

Its only write action is a single PR comment. It never merges, blocks, quarantines, or edits code — a Misfire bug can't break your CI.

🎲

Real vs. likely flaky

A deterministic stats layer over run history classifies the failure — a number the model is told to treat as authoritative and can't fabricate.

🔭

Logs + diff + history

An agent gathers the evidence that matters and connects the failure to the change under test — not a single-shot summary of the log tail.

Fork-PR safe

The decoupled workflow_run trigger resolves the PR from the head commit, so it works on fork PRs and can't slow your CI job.

🔒

Secret-scrubbed

Logs and the diff are redacted before they reach the model, and the comment text is sanitized against HTML/Markdown injection.

🔌

Your provider, your key

Runs on Claude or OpenAI (pick with --provider), extensible to more. Bring your own API key — Misfire never provides one. Open-source, local --no-ai mode too.

How it works

Three steps

1

Add the workflow

Drop in a workflow_run workflow that watches your CI, and add your provider's API key as a secret (you bring your own).

2

A build goes red

Misfire fires only on failures. It reads the failing logs, the diff, and the failing test's history.

3

Read the advisory

One rolling comment per PR: root cause, category, confidence, and the real-vs-flaky verdict.

open source · bring-your-own-key

Advisory-only CI failure analysis — root cause and real-vs-flaky, on your own provider and key.

Read the docs →