Summary
When a PR is created with just a bootstrap commit (minimal or no code), autofix runs and finds "no changes required". It then adds the `autofix:clean` label per line 878-880:
if (!changed) {
desired.add(cleanLabel); // cleanLabel = 'autofix:clean'
}
When the real code is pushed (with formatting issues), autofix re-runs but now sees the `autofix:clean` label and enters clean mode which only does a cosmetic sweep.
Root Cause
Timeline example from Manager-Database PR #55:
- 21:52:57 - Bootstrap commit created (empty/minimal code)
- 21:54:03 - First autofix runs, finds "no changes" → adds `autofix:clean` label
- 22:02:12 - Real code pushed with black formatting issues
- 22:02:34 - Second autofix runs, but now in clean mode (due to label) → finds "Clean-mode cosmetic sweep found no changes"
- Gate fails because black formatting issues were never fixed
Impact
- PRs created by Codex agent often have this problem since they start with bootstrap commits
- Users have to manually remove the `autofix:clean` label to trigger a full autofix
Proposed Fix
Option A: Do not add `autofix:clean` label when autofix finds no changes
Option B: Remove `autofix:clean` label when new commits are pushed
Option C: Detect bootstrap commits and skip label management
Related
Also related: Autofix only targets hardcoded paths (src, tests, tools, streamlit_app, .github/scripts) - projects with different structures like `api/`, `adapters/`, `etl/` are not checked.
Summary
When a PR is created with just a bootstrap commit (minimal or no code), autofix runs and finds "no changes required". It then adds the `autofix:clean` label per line 878-880:
When the real code is pushed (with formatting issues), autofix re-runs but now sees the `autofix:clean` label and enters clean mode which only does a cosmetic sweep.
Root Cause
Timeline example from Manager-Database PR #55:
Impact
Proposed Fix
Option A: Do not add `autofix:clean` label when autofix finds no changes
Option B: Remove `autofix:clean` label when new commits are pushed
Option C: Detect bootstrap commits and skip label management
Related
Also related: Autofix only targets hardcoded paths (src, tests, tools, streamlit_app, .github/scripts) - projects with different structures like `api/`, `adapters/`, `etl/` are not checked.