Skip to content

dev-inf: add CI failure auto-fixer for autosolver PRs#164699

Merged
trunk-io[bot] merged 1 commit intocockroachdb:masterfrom
ajstorm:ajstorm/autosolve-ci-fixer
Mar 9, 2026
Merged

dev-inf: add CI failure auto-fixer for autosolver PRs#164699
trunk-io[bot] merged 1 commit intocockroachdb:masterfrom
ajstorm:ajstorm/autosolve-ci-fixer

Conversation

@ajstorm
Copy link
Copy Markdown
Collaborator

@ajstorm ajstorm commented Mar 2, 2026

Summary

  • Add a new workflow (pr-autosolve-ci.yml) that automatically analyzes and fixes CI failures on autosolver PRs
  • When Essential CI fails on a fix/issue-* branch with the o-autosolver label, collects failure details (annotations, logs), runs Claude to diagnose and fix PR-caused failures, and pushes the fix
  • Loop prevention via [autosolve-ci-fix] comment counting (max 2 attempts)
  • Distinguishes PR-caused failures from flaky tests and pre-existing issues
  • Shares concurrency group with comment addresser to prevent simultaneous pushes
  • Replicates all security checks from comment addresser (workflow file modification block, symlink check)

Epic: none
Release note: None

🤖 Generated with Claude Code

@trunk-io
Copy link
Copy Markdown
Contributor

trunk-io Bot commented Mar 2, 2026

😎 Merged successfully - details.

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@ajstorm ajstorm force-pushed the ajstorm/autosolve-ci-fixer branch from 372adf0 to 09f48a3 Compare March 3, 2026 13:49
@ajstorm ajstorm requested a review from rickystewart March 3, 2026 13:50
@ajstorm ajstorm marked this pull request as ready for review March 3, 2026 13:50
@ajstorm ajstorm requested a review from a team as a code owner March 3, 2026 13:50
Copy link
Copy Markdown
Collaborator

@rickystewart rickystewart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When #164972 is merged, please rebase on top of it. You will also need to apply similar changes to the pr-autosolve-ci.yml file, namely changes to the runs-on, getting/cleaning up the EngFlow keys and populating .bazelrc.user, and setting AUTOMATION=1 to anything that may run ./dev.

Add a new workflow (`pr-autosolve-ci.yml`) that automatically analyzes
and fixes CI failures on autosolver PRs. When Essential CI fails on a
`fix/issue-*` branch with the `o-autosolver` label, this workflow
collects failure details (annotations, logs), runs Claude to diagnose
and fix PR-caused failures, and pushes the fix.

Key features:
- Loop prevention: max 2 fix attempts via `[autosolve-ci-fix]` comment
  counting
- Failure classification: distinguishes PR-caused failures from flaky
  tests and pre-existing issues
- Shared concurrency group with the comment addresser to prevent
  simultaneous pushes
- Same security checks as comment addresser (workflow file modification
  block, symlink check)

Epic: none
Release note: None

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ajstorm ajstorm force-pushed the ajstorm/autosolve-ci-fixer branch from 09f48a3 to a216789 Compare March 6, 2026 15:04
@ajstorm
Copy link
Copy Markdown
Collaborator Author

ajstorm commented Mar 6, 2026

/trunk merge

Thanks for the review Ricky!

@trunk-io trunk-io Bot merged commit 5d7d43d into cockroachdb:master Mar 9, 2026
37 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants