You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci: deterministic autorevert on red main CI (RQ-AUTOREVERT pilot) - #114
Pilot for RQ-AUTOREVERT. No model, no new secrets, GITHUB_TOKEN only with job-scoped permissions.
workflow_run on CI and Release, main pushes only. First failure reruns failed jobs once (flake guard); a second failure with the previous main run green names head_sha as culprit.
Kill switch: 2 autorevert PRs in 24h opens an autorevert-paused issue and stops.
Opens revert PR, enables --auto --squash, dispatches CI on the branch so required checks report (workflow_dispatch is the documented GITHUB_TOKEN exception).
Release failures open an issue only.
Self-test: workflow_dispatch with run_id prints the DECISION line and opens nothing. Local dry run: green run gives skip conclusion=success; failed run 39017327540 gives rerun-failed.
Activation needs the repo setting 'Allow GitHub Actions to create and approve pull requests' (currently off on all 7 repos). Until then only the dry-run path is useful. Spec: phantom-work/ci-efficiency/autorevert-spec.md
Summary by CodeRabbit
New Features
Failed continuous integration runs can now be automatically retried or reverted through a proposed change.
Release failures and revert conflicts are reported for follow-up.
Automatic reversions pause when safeguards are reached, helping prevent repeated or unsuitable changes from proceeding.
The recovery process can also be started manually for a selected run.
The change adds a GitHub Actions workflow and script for failed-run handling. The script checks run and commit eligibility, reruns failed jobs on a first attempt, and can create an automatic revert pull request or an issue.
Changes: Autorevert handling
Layer / File(s)
Summary
Workflow entry and run classification .github/workflows/autorevert.yml, .github/scripts/autorevert.sh
The workflow handles qualifying failed runs and manual dispatches. The script processes release failures and filters other runs by event type and branch.
Eligibility and automation limits .github/scripts/autorevert.sh
The script checks pause status, first-attempt failures, prior run results, commit eligibility, existing autorevert pull requests, and the 24-hour pull-request threshold.
Revert and follow-up .github/scripts/autorevert.sh
After the checks, the script reports a dry-run decision or reverts the commit, creates and auto-merges a pull request, and dispatches the workflow on the revert branch. A revert conflict creates an issue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pilot for RQ-AUTOREVERT. No model, no new secrets, GITHUB_TOKEN only with job-scoped permissions.
Activation needs the repo setting 'Allow GitHub Actions to create and approve pull requests' (currently off on all 7 repos). Until then only the dry-run path is useful. Spec: phantom-work/ci-efficiency/autorevert-spec.md
Summary by CodeRabbit