From c69fe3cfc798d812a576f7138d29b47605de2c38 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 21 Aug 2026 16:19:03 -0400 Subject: [PATCH] fix: Allow fix workflow on non-agent PRs Permit the fix iteration loop to address any same-repository pull request labeled agent/fixme, rather than silently skipping human-authored branches. Keep the prompt documentation and compiler-owned lock metadata synchronized with that behavior. Fixes: #57 Assisted-by: AI Signed-off-by: Colin Walters --- .github/workflows/fix.lock.yml | 13 ++++++------- .github/workflows/fix.md | 16 ++++++---------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/.github/workflows/fix.lock.yml b/.github/workflows/fix.lock.yml index af509f5..f5d05a6 100644 --- a/.github/workflows/fix.lock.yml +++ b/.github/workflows/fix.lock.yml @@ -1,4 +1,4 @@ -# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"1ca03aeaba21a98c0281ed6b2b276ee71ad6359d4c80f9651f85b9ab5cbfa82f","body_hash":"a56233d53ce1d403009c4c9edab85ba96661bbc596ded0e9796f9661dddb3538","compiler_version":"v0.81.6","strict":true,"agent_id":"claude","agent_model":"claude-sonnet-4-5-20250929","engine_versions":{"claude":"2.1.191"}} +# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"a4e8d62e66a88b16b1dad4347cec7f02a3e6aa12add84e551a04df566eb8805a","body_hash":"0fbfc3fbc0807f772a018575030a42d521742afe6de3775c4b40218329478da8","compiler_version":"v0.81.6","strict":true,"agent_id":"claude","agent_model":"claude-sonnet-4-5-20250929","engine_versions":{"claude":"2.1.191"}} # gh-aw-manifest: {"version":1,"secrets":["ANTHROPIC_API_KEY","GH_AW_APP_PRIVATE_KEY","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/cache/restore","sha":"27d5ce7f107fe9357f9df03efb73ab90386fccae","version":"v5.0.5"},{"repo":"actions/cache/save","sha":"27d5ce7f107fe9357f9df03efb73ab90386fccae","version":"v5.0.5"},{"repo":"actions/checkout","sha":"9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0","version":"v7.0.0"},{"repo":"actions/create-github-app-token","sha":"bcd2ba49218906704ab6c1aa796996da409d3eb1","version":"v3.2.0"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"ba6380cc6e5be5d21677bebe04d52fb48e3abec7","version":"v0.81.6"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.27.11","digest":"sha256:979723c628182da7729333f2208bb249fd25ddee579645cf9a3892d681a929c7","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.27.11@sha256:979723c628182da7729333f2208bb249fd25ddee579645cf9a3892d681a929c7"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.11","digest":"sha256:807e4831999b44513b0a66e5859d478dc4da7ae74ab1918cec967d513f95bf9d","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.11@sha256:807e4831999b44513b0a66e5859d478dc4da7ae74ab1918cec967d513f95bf9d"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.27.11","digest":"sha256:ff27ea0525ad953a6adee28a5fbe9d2e22be47dbec755c15767af4ea3f91df7d","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.27.11@sha256:ff27ea0525ad953a6adee28a5fbe9d2e22be47dbec755c15767af4ea3f91df7d"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.30","digest":"sha256:35625d1a2269b1238606078c879f59a91cffc4ac33eb54bf39c6418822c1a8be","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.30@sha256:35625d1a2269b1238606078c879f59a91cffc4ac33eb54bf39c6418822c1a8be"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b","pinned_image":"ghcr.io/github/gh-aw-node@sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b"},{"image":"ghcr.io/github/github-mcp-server:v1.4.0","digest":"sha256:2afb26356481d1a350e14544a6e160f7f7ec1561a1ea309b823665abf0309036","pinned_image":"ghcr.io/github/github-mcp-server:v1.4.0@sha256:2afb26356481d1a350e14544a6e160f7f7ec1561a1ea309b823665abf0309036"}]} # This file was automatically generated by gh-aw (v0.81.6). DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md # @@ -23,7 +23,7 @@ # # For more information: https://github.github.com/gh-aw/introduction/overview/ # -# Fix-iteration agent. When review.md flags an agent-authored pull request +# Fix-iteration agent. When review.md flags a pull request # with the 'agent/fixme' label, this agent reads the reviewer's feedback and # pushes follow-up commits to the same branch, closing the # code -> review -> fix loop. @@ -78,8 +78,8 @@ jobs: - add_working_label - pre_activation if: > - needs.pre_activation.outputs.activated == 'true' && ((github.event.label.name == 'agent/fixme' && - startsWith(github.event.pull_request.head.ref, 'agent/')) && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id)) + needs.pre_activation.outputs.activated == 'true' && ((github.event.label.name == 'agent/fixme') && (github.event_name != 'pull_request' || + github.event.pull_request.head.repo.id == github.repository_id)) runs-on: ubuntu-slim permissions: actions: read @@ -1487,7 +1487,7 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: WORKFLOW_NAME: "PR Fix Agent" - WORKFLOW_DESCRIPTION: "Fix-iteration agent. When review.md flags an agent-authored pull request\nwith the 'agent/fixme' label, this agent reads the reviewer's feedback and\npushes follow-up commits to the same branch, closing the\ncode -> review -> fix loop." + WORKFLOW_DESCRIPTION: "Fix-iteration agent. When review.md flags a pull request\nwith the 'agent/fixme' label, this agent reads the reviewer's feedback and\npushes follow-up commits to the same branch, closing the\ncode -> review -> fix loop." HAS_PATCH: ${{ needs.agent.outputs.has_patch }} with: script: | @@ -1640,8 +1640,7 @@ jobs: pre_activation: if: > - (github.event.label.name == 'agent/fixme' && - startsWith(github.event.pull_request.head.ref, 'agent/')) && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id) + (github.event.label.name == 'agent/fixme') && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id) runs-on: ubuntu-slim env: GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }} diff --git a/.github/workflows/fix.md b/.github/workflows/fix.md index a4aa381..d6d5e24 100644 --- a/.github/workflows/fix.md +++ b/.github/workflows/fix.md @@ -1,6 +1,6 @@ --- description: | - Fix-iteration agent. When review.md flags an agent-authored pull request + Fix-iteration agent. When review.md flags a pull request with the 'agent/fixme' label, this agent reads the reviewer's feedback and pushes follow-up commits to the same branch, closing the code -> review -> fix loop. @@ -11,8 +11,7 @@ on: bots: ["${{ vars.GH_AW_APP_BOT_SLUG }}"] if: | - github.event.label.name == 'agent/fixme' && - startsWith(github.event.pull_request.head.ref, 'agent/') + github.event.label.name == 'agent/fixme' # gh-aw's default `pull_request`-triggered concurrency group is keyed only by # workflow name + PR number, not by which label fired the run. That's fine @@ -164,13 +163,10 @@ The `agent/fixme` label was applied to pull request meaning it found something that needs to change. Note: this workflow uses a plain `pull_request: types: [labeled]` trigger -gated by `if:` rather than gh-aw's `label_command:` trigger, because -`label_command:` combined with a custom top-level `if:` (needed here for -the `agent/` branch-prefix check) silently drops its own label-name match -condition, which would make this workflow fire on *any* label added to an -`agent/`-branch PR. So the label must be consumed manually: this workflow -removes `agent/fixme` itself via `remove-labels` (step 1 below) so it can't -cause a duplicate re-trigger. +rather than gh-aw's `label_command:` trigger to maintain manual label +consumption and prevent duplicate re-triggers. The label must be consumed +manually: this workflow removes `agent/fixme` itself via `remove-labels` +(step 1 below) so it can't cause a duplicate re-trigger. ## Your task