From 84f7c99680891458349ab76966e47ec28382d515 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 6 Feb 2026 09:34:58 +0000 Subject: [PATCH] fix: prevent ruff-autofix failures on non-HEAD commits and exclude uv.lock Add concurrency group to ruff-autofix workflow so that when multiple commits are pushed (e.g. PR merge), only the latest run proceeds and stale runs are cancelled. This prevents push failures when the workflow runs on a commit that is no longer the branch HEAD. Also add uv.lock to ruff's exclude list in pyproject.toml since uv generates lock files that trigger ruff violations. https://claude.ai/code/session_01YFmaXoosHkGyN3uEF3k54F --- template/.github/workflows/ruff-autofix.yml | 4 ++++ template/pyproject.toml | 3 +++ 2 files changed, 7 insertions(+) diff --git a/template/.github/workflows/ruff-autofix.yml b/template/.github/workflows/ruff-autofix.yml index a8497ca..a501cb9 100644 --- a/template/.github/workflows/ruff-autofix.yml +++ b/template/.github/workflows/ruff-autofix.yml @@ -5,6 +5,10 @@ on: branches: - "**" +concurrency: + group: ruff-autofix-{% raw %}${{ github.ref }}{% endraw %} + cancel-in-progress: true + permissions: contents: write diff --git a/template/pyproject.toml b/template/pyproject.toml index a47f01e..ec297ab 100644 --- a/template/pyproject.toml +++ b/template/pyproject.toml @@ -49,6 +49,9 @@ fail_under = 100 show_missing = true skip_covered = true +[tool.ruff] +exclude = ["uv.lock"] + [dependency-groups] dev = [ "pytest>=9.0.2",