feat(actions): a failed run is no longer a dead end — re-run, and surface the AI healer #5560
ccantynzAI Reviewcommented 5d ago
AI Triage
(no summary)
Priority: medium Risk area: mixed
Suggested labels: (no label suggestions) Suggested reviewers: (no reviewer suggestions)
Suggestions only — nothing has been applied. The PR author stays in control.
gluecron[bot]🤖 botAI Reviewcommented 5d ago
AI review unavailable
The platform's AI balance is exhausted, so AI generation is temporarily unavailable. Nothing was lost. You can queue this as a repair for the internal agent from the repository's Health page, or try again once the balance is restored. The PR is otherwise unchanged.
Cross-repo impact
See what breaks downstream if this PR merges.
⮌ Merged
This pull request was merged into main.
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts
Split out of #5559 — this commit was pushed eight minutes after that PR merged, so it missed the train. Its parent (
83cd6f9) is already in main, so this is a clean single-commit diff.The problem
The workflow run detail page had exactly one action — Cancel — and it renders only while a run is still in flight. So a failed run offered nothing at all: you could read the job logs, and that was the entire surface.
Verified against production rather than the source alone: the only
<form>elements on the failed-run page were global search and the repo star button.Re-run
Re-runs the same workflow at the same commit, not at the branch head.
That distinction is the whole point. Re-running a failure asks a question about that commit — was it flaky, or is it really broken? Quietly answering it about different code would make a green run mean nothing.
Refuses while a run is still queued or running: two runs racing on one commit isn't a re-run, and Cancel is the verb for that — it sits right beside it.
AI failure analysis
lib/ai-ci-healer.tsalready root-causes failed runs and opens patch PRs on a five-minute autopilot tick, recordingai.ci.healedorai.ci.gave_upagainst the run id.None of it was surfaced anywhere. A failure that had been analysed and judged unfixable looked identical to one nothing had ever looked at — the platform was doing real work and showing no evidence of it, which is the same "advertises liveness, proves deadness" shape we've fixed elsewhere.
The page now reads the marker and says which happened, links the PR when there is one, and offers Analyse failure to run the same call on demand instead of waiting for a tick.
healOneRunis internally idempotent (it no-ops when a marker exists), so a double submit cannot open two PRs.It degrades honestly. With no
ANTHROPIC_API_KEYthe panel says so plainly and names re-run and the job logs as what you actually have, rather than rendering a button that would quietly do nothing.Verification
bun run typecheckcleanrequireAuth+ owner-checked, so they classify as guarded with no allowlist entry neededCoverage, stated plainly: the guard test covers their auth, but the handlers have no behavioural test. That surface needs a database and CI strips
DATABASE_URLby design. Flagging it rather than shipping a weak test that looks like coverage.Deliberately not built
🤖 Generated with Claude Code