feat: make lint-fix target + working lint-autofix workflow (split 5/6 of #125)#134
Merged
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
❌ Too Many Files Changed ❌ PR Too Large 📋 Best Practices for Large Changes
🚫 This PR is blocked from merging until size limits are met. |
AGENTS.md, .cursorrules, and docs/CI_PIPELINE.md all document and instruct agents/contributors to run `make lint-fix` to autofix lint failures, and describe `make lint` as the check-only ruff+mypy gate that mirrors CI. Neither existed: the Makefile only had a `lint` target that already mutated the tree via `ruff check . --fix` + `ruff format .` and never ran mypy, so it did not actually match what CI enforces, and `make lint-fix` didn't exist at all. - `make lint` now runs `ruff check .` (no --fix) + `ruff format --check .` + `mypy engine/` -- the same non-mutating checks CI runs, so a clean `make lint` locally is a reliable predictor of a passing CI lint job. - `make lint-fix` is the new autofix entry point: `ruff check . --fix` + `ruff format .` (matches the long-documented but missing command). - `make check` (full local gate) keeps its previous autofix-then-verify behavior for convenience, just relabeled for clarity. Co-authored-by: Igor Beylin <cryptoxdog@users.noreply.github.com> (cherry picked from commit 77c5dd4)
…workflow .github/workflows/auto-fix-adr.yml (triggered on push to develop / workflow_dispatch) called `python ci/auto_fix_adr.py` and `python ci/check_imports.py`, but the ci/ directory does not exist anywhere in this repo, so the workflow could never run successfully. Ruff already mechanically enforces (and can --fix) the same class of issues that workflow targeted: sorted __all__ (RUF022), Optional[T] -> T | None (UP045), datetime.now() -> datetime.now(UTC) (UP017/DTZ003), zip(strict=True) (B905), unused/unsorted imports (F401/I001), etc. -- see [tool.ruff.lint] in pyproject.toml. Add .github/workflows/lint-autofix.yml: same trigger/safety model (develop push + workflow_dispatch, never pushes directly to a protected branch, opens a PR via peter-evans/create-pull-request instead), but running `ruff check . --fix` + `ruff format .`, with a syntax-validation step and a check that ruff has no remaining autofixable violations before opening the PR. Skips opening a PR when there is nothing to fix. Document both the new workflow and `make lint-fix` as the two ways to autofix lint violations in docs/CI_PIPELINE.md. Co-authored-by: Igor Beylin <cryptoxdog@users.noreply.github.com> (cherry picked from commit 9cd837d)
…issions - on.push.branches, checkout ref, and PR base changed develop -> main: this repository has no develop branch, so the workflow could never fire and its checkout/PR base would have failed if it did. - permissions.contents: read -> write: peter-evans/create-pull-request must push the autofix branch, which requires contents: write per the action's documentation (pull-requests: write alone is insufficient). - Documented the GITHUB_TOKEN limitation: PRs created with the default token do not trigger push/pull_request workflows; a GitHub App token or PAT secret is needed if autofix PRs must run the normal CI suite.
cryptoxdog
force-pushed
the
feat/lint-autofix-workflow
branch
from
July 22, 2026 21:20
836d0d0 to
3c9c400
Compare
|
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.


Summary
Makefile and automation improvements extracted from #125 (commits 77c5dd4 and 9cd837d).
Changes
make lintnow matches CI's blocking gate (check-only:ruff check,ruff format --check,mypy engine/); newmake lint-fixtarget performs the mutations.github/workflows/auto-fix-adr.yml— it depended onci/auto_fix_adr.pyandci/check_imports.py, neither of which exists in this repo, so it failed on every run.github/workflows/lint-autofix.yml— runs Ruff autofix on push todevelopor on demand, and opens a PR with the results (never pushes directly to a protected branch;contents: read+ PR-based flow)Verification
See #130 for the full split-series map replacing #125.