fix(autofix): prevent clean mode label race condition#274
Conversation
The 'Ensure autofix label present' step was adding the opt_in_label (default: autofix:clean) unconditionally. Since this label is the same as clean_label, it caused ALL autofix runs to be in clean mode, even for PRs with non-cosmetic failures like mypy errors or test failures. Changes: 1. Skip adding opt_in_label when it equals clean_label (the clean mode flag should only be added by gate workflow when cosmetic-only failure detected) 2. Change default opt_in_label from 'autofix:clean' to 'autofix' to make the distinction clear between trigger labels and mode flags This fixes the race condition where autofix runs in clean mode before gate can determine if the failure is truly cosmetic. Fixes: autofix:clean label being added before CI completes
Automated Status SummaryHead SHA: 3a9c55b
Coverage Overview
Coverage Trend
Updated automatically; will refresh on subsequent CI/Docker completions. Keepalive checklistScopeNo scope information available Tasks
Acceptance criteria
|
There was a problem hiding this comment.
Pull request overview
This PR fixes a race condition where the autofix workflow was incorrectly entering clean mode for all runs, including those with non-cosmetic failures like mypy errors or test failures. The root cause was that the workflow was adding the autofix:clean label (which triggers clean mode) before the gate workflow could determine if the failure was actually cosmetic-only.
Key Changes:
- Changed default
opt_in_labelfromautofix:cleantoautofixto distinguish the opt-in trigger label from the clean mode flag - Added conditional logic to skip adding the opt-in label when it equals the clean mode label, preventing premature clean mode activation
- Updated input description to clarify that
opt_in_labelshould differ fromclean_label
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Automated Status Summary
Scope
Tasks
Acceptance criteria
Head SHA: 12aca2c
Latest Runs: ⏳ queued — Gate
Required: gate: ⏳ queued