From 797dc23d530f712934351d5342f97acac7e66137 Mon Sep 17 00:00:00 2001 From: Fabrizio Ferri Benedetti Date: Tue, 14 Apr 2026 14:30:25 +0200 Subject: [PATCH 1/3] Remove compile-check workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The lock file drift check creates more friction than it prevents — particularly for Dependabot PRs, which always fail CI because Dependabot can't run `make compile`. Trust contributors to recompile. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/compile-check.yml | 40 ----------------------------- 1 file changed, 40 deletions(-) delete mode 100644 .github/workflows/compile-check.yml diff --git a/.github/workflows/compile-check.yml b/.github/workflows/compile-check.yml deleted file mode 100644 index 76bb24e..0000000 --- a/.github/workflows/compile-check.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Compile check - -on: - pull_request: - paths: - - '.github/workflows/gh-aw-*.md' - - '.github/workflows/gh-aw-*.lock.yml' - - '.github/workflows/gh-aw-fragments/**' - -permissions: - contents: read - -jobs: - compile-check: - name: Verify lock files are up to date - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - name: Detect gh-aw version from lock files - id: detect-version - run: | - version=$(head -1 .github/workflows/gh-aw-*.lock.yml | grep -oP '"compiler_version":"v\K[^"]+' | head -1) - echo "version=v${version}" >> "$GITHUB_OUTPUT" - - - name: Install gh-aw - run: gh extension install github/gh-aw --pin ${{ steps.detect-version.outputs.version }} - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Compile - run: gh aw compile - - - name: Check for uncommitted changes - run: | - if ! git diff --quiet .github/workflows/*.lock.yml; then - echo "::error::Lock files are out of date. Run 'make compile' and commit the changes." - git diff --stat .github/workflows/*.lock.yml - exit 1 - fi From 7a0323db440b050bdf06634a8aeedd989a584591 Mon Sep 17 00:00:00 2001 From: Fabrizio Ferri Benedetti Date: Tue, 14 Apr 2026 14:33:01 +0200 Subject: [PATCH 2/3] Add pre-commit hook to compile gh-aw workflows Runs `gh aw compile` locally when workflow source files change, so lock file drift is caught before it reaches CI. Co-Authored-By: Claude Opus 4.6 (1M context) --- .pre-commit-config.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f4ec946..956d8dd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,3 +23,12 @@ repos: hooks: - id: actionlint exclude: '\.lock\.yml$' + + - repo: local + hooks: + - id: compile-workflows + name: compile gh-aw workflows + language: system + entry: gh aw compile + files: '\.github/workflows/gh-aw-.*\.md$|\.github/workflows/gh-aw-fragments/' + pass_filenames: false From d4a39d878add322e7d2de3ed1dfe5f099c3ac5d4 Mon Sep 17 00:00:00 2001 From: Fabrizio Ferri Benedetti Date: Tue, 14 Apr 2026 14:35:12 +0200 Subject: [PATCH 3/3] Install gh-aw in pre-commit CI workflow So the compile-workflows hook runs in CI too, replacing the dedicated compile-check workflow. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/pre-commit.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 14b7246..8f4542e 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -17,4 +17,8 @@ jobs: - uses: actions/setup-python@v6 with: python-version: "3.x" + - name: Install gh-aw + run: gh extension install github/gh-aw + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - uses: pre-commit/action@v3.0.1