feat(autofix): auto-escalate to Codex when basic autofix insufficient#277
Merged
feat(autofix): auto-escalate to Codex when basic autofix insufficient#277
Conversation
When a PR has: - autofix:applied or autofix label (basic autofix ran) - Gate still failing - No explicit autofix config in PR body - No agent:codex label This change automatically adds agent:codex and autofix:escalated labels to enable Codex to attempt more complex fixes beyond ruff/black. Auto-escalated PRs get at most 2 Codex attempts (vs 3 for agent-initiated PRs) to limit resource usage for automatically escalated fixes. Closes #266 (Gap #2)
Contributor
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements auto-escalation from basic autofix (ruff/black) to Codex when basic fixes are insufficient to resolve Gate failures. When a PR has basic autofix applied but CI still fails, the workflow now automatically adds the agent:codex label to enable Codex assistance.
Key Changes:
- Auto-escalation logic detects when basic autofix ran but Gate workflow failed
- Automatically adds
agent:codexandautofix:escalatedlabels to trigger Codex - Limits auto-escalated PRs to 2 Codex attempts (vs 3 for agent-initiated PRs)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
Author
|
@codex fix comment |
When rate limited, the fallback was setting docker_changed='true' which causes the docker smoke test to run. But if there's no Dockerfile in the repo (like the Workflows repo itself), this causes spurious failures. Change the fallback to docker_changed='false' since: 1. Docker changes are less common than code changes 2. Missing a docker test on rare rate-limited PRs is better than failing CI on repos that don't use Docker 3. The workflow_changed='true' fallback still ensures workflow tests run
|
Summary
Testing
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Automated Status Summary
Scope
Tasks
Acceptance criteria
Head SHA: 44d7419
Latest Runs: ❔ in progress — Gate
Required: gate: ❔ in progress