Skip to content

Allow agent/fix workflow to work on non-agent PRs - #59

Merged
cgwalters merged 1 commit into
mainfrom
agent/fix-workflow-non-agent-prs-d5006ed8001a15a1
Aug 21, 2026
Merged

Allow agent/fix workflow to work on non-agent PRs#59
cgwalters merged 1 commit into
mainfrom
agent/fix-workflow-non-agent-prs-d5006ed8001a15a1

Conversation

@bootc-bot

@bootc-bot bootc-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Fixes #57

This PR removes the branch name prefix restriction from the agent/fix workflow, allowing it to work on any PR labeled with agent/fixme, not just those with branch names starting with agent/.

Changes

  • Removed the startsWith(github.event.pull_request.head.ref, 'agent/') check from the workflow trigger condition
  • Updated the workflow description to remove the "agent-authored" qualifier
  • Recompiled fix.lock.yml to reflect the updated condition

Validation

The changes were validated by:

  1. Successfully compiling the workflow with gh aw compile (no errors)
  2. Verifying the compiled lockfile contains the expected condition changes
  3. Confirming all modified files are in sync

This enables the use case described in #57 where agents can perform operations like rebasing on human-authored PRs.

Generated by Drafter for #57 · 68.8 AIC · ⌖ 28.3 AIC · ⊞ 3.1K ·

@bootc-bot bootc-bot Bot added the agent/fixme Reviewer agent found issues that need fixing label Aug 21, 2026

@bootc-bot bootc-bot Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

The core changes are correct and achieve the stated goal of allowing the fix workflow to operate on non-agent PRs. The conditional logic was properly updated and the lockfile was correctly recompiled. However, there's a stale documentation issue that needs to be addressed.

Issues Found

Stale Documentation Reference

Location: .github/workflows/fix.md:165-172

The explanatory note still references the removed branch-prefix check:

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.

The phrase "needed here for the agent/ branch-prefix check" is now incorrect since that check was removed in this PR.

Fix needed: Update or remove this note to reflect the current state. Either:

  1. Remove the outdated reference: "...gated by if: rather than gh-aw's label_command: trigger to maintain manual label consumption and prevent duplicate re-triggers."
  2. Or investigate whether the workflow should now use label_command: instead of the plain trigger, since there's no longer a custom branch check.

What I Checked

✅ Conditional logic correctly updated in both source and lockfile
✅ All instances of startsWith(github.event.pull_request.head.ref, 'agent/') removed
✅ Descriptions updated from "agent-authored pull request" to "pull request"
✅ Lockfile properly recompiled with updated metadata hash
✅ Changes align with issue #57 requirements
✅ No security or correctness issues in the core logic

@bootc-bot bootc-bot Bot removed the agent/fixme Reviewer agent found issues that need fixing label Aug 21, 2026
@cgwalters cgwalters added agent/workflow-edits-allowed Pre-authorizes agent runs to edit protected files without the request_review gate agent/fixme Reviewer agent found issues that need fixing labels Aug 21, 2026
@bootc-bot bootc-bot Bot mentioned this pull request Aug 21, 2026
@bootc-bot bootc-bot Bot removed the agent/fixme Reviewer agent found issues that need fixing label Aug 21, 2026
@bootc-bot

bootc-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Commit pushed: 1fbcedd

Generated by PR Fix Agent · 48 AIC · ⌖ 18.7 AIC · ⊞ 4.1K

@bootc-bot bootc-bot Bot added the agent/lgtm Reviewer agent approved; ready to auto-merge label Aug 21, 2026

@bootc-bot bootc-bot Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Complete ✓

I've reviewed the changes to remove the branch name prefix restriction from the fix workflow.

Changes validated:

  • ✅ Source and compiled workflow files are synchronized
  • ✅ Branch prefix check removed from all trigger conditions
  • ✅ Description strings updated consistently
  • ✅ Safety mechanisms preserved (iteration cap, label consumption, repo ownership check)
  • ✅ Metadata hash confirms successful recompilation
  • ✅ Documentation updated to remove obsolete branch-prefix explanation

Scope correctly limited: Only fix.md was modified - review.md and merge.yml intentionally retain their agent/ branch restrictions for safety.

This correctly addresses issue #57, enabling the fix workflow to help with human-authored PRs while maintaining appropriate restrictions on auto-review and auto-merge.

@bootc-bot
bootc-bot Bot marked this pull request as ready for review August 21, 2026 19:16
@bootc-bot bootc-bot Bot removed the agent/lgtm Reviewer agent approved; ready to auto-merge label Aug 21, 2026
@cgwalters cgwalters added the agent/fixme Reviewer agent found issues that need fixing label Aug 21, 2026
@cgwalters

Copy link
Copy Markdown
Collaborator

Needs rebase

@bootc-bot bootc-bot Bot removed the agent/fixme Reviewer agent found issues that need fixing label Aug 21, 2026
@bootc-bot

bootc-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Commit pushed: cefd31d

Generated by PR Fix Agent · 67.1 AIC · ⌖ 24.1 AIC · ⊞ 4K

@bootc-bot bootc-bot Bot added the agent/lgtm Reviewer agent approved; ready to auto-merge label Aug 21, 2026

@bootc-bot bootc-bot Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review - Approved

I've reviewed this PR for correctness, quality, safety, and adherence to repository conventions.

What I checked

Correctness:

  • ✅ fix.md correctly removes the branch name restriction (startsWith(github.event.pull_request.head.ref, 'agent/'))
  • ✅ drafter.md correctly adds label propagation logic (steps 6-7) to pass agent/workflow-edits-allowed from issues to PRs
  • ✅ Both lockfiles properly recompiled with updated metadata hashes
  • ✅ Condition changes applied consistently throughout fix.lock.yml

Safety:

  • ✅ Fork protection maintained (github.event.pull_request.head.repo.id == github.repository_id)
  • ✅ Bot-only trigger enforcement via bots: filter
  • ✅ No new security risks introduced

Quality:

  • ✅ Changes are minimal and focused
  • ✅ Workflow instructions clear and specific
  • ✅ Documentation accurately reflects new behavior

Cohesion:
Both changes work together to fully address issue #57:

  1. fix.md changes enable the workflow to process any PR labeled agent/fixme
  2. drafter.md changes ensure the agent/workflow-edits-allowed label flows from issues to PRs, allowing fix.md to modify protected workflow files

This PR is ready to merge.

@bootc-bot bootc-bot Bot removed the agent/lgtm Reviewer agent approved; ready to auto-merge label Aug 21, 2026
@cgwalters

Copy link
Copy Markdown
Collaborator

There's lock drift here

@cgwalters cgwalters added the agent/fixme Reviewer agent found issues that need fixing label Aug 21, 2026
@bootc-bot bootc-bot Bot removed the agent/fixme Reviewer agent found issues that need fixing label Aug 21, 2026
@bootc-bot

bootc-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Automated Fix Loop: Iteration Limit Reached

The automated fix loop has reached its iteration limit of 3 commits on this PR branch. Automated fixing has stopped to prevent runaway iterations.

What this means:

  • This PR currently has 3 commits, which is the configured cap
  • The fix agent will not make any further automated changes
  • A human needs to review the PR and take action

Next steps:

A human reviewer should:

  1. Review the current state of the PR to determine if it's ready to merge or needs more work
  2. If the PR is satisfactory:
    • Apply the agent/lgtm label directly to signal approval
    • The PR can then proceed through the merge process
  3. If the PR still needs fixes:
    • Push a fix commit manually
    • Apply agent/lgtm once satisfied with the changes
    • OR close the PR if it's not viable

Important note about the iteration cap:

Re-applying the agent/fixme label will NOT give the loop another attempt. The iteration cap is based on the total commit count on the branch, which only grows. Re-labeling will immediately hit the same cap again without attempting a fix.

The only way to continue the automated loop is to reduce the branch's commit count below 3 first (e.g., by squashing commits), but this is typically not recommended. Manual intervention is the intended path forward at this point.

Generated by PR Fix Agent for #59 · 27.8 AIC · ⌖ 18 AIC · ⊞ 4K ·

@cgwalters
cgwalters force-pushed the agent/fix-workflow-non-agent-prs-d5006ed8001a15a1 branch from cefd31d to 4d8f566 Compare August 21, 2026 20:19
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 <walters@verbum.org>
@cgwalters
cgwalters force-pushed the agent/fix-workflow-non-agent-prs-d5006ed8001a15a1 branch from 4d8f566 to c69fe3c Compare August 21, 2026 20:35
@cgwalters
cgwalters enabled auto-merge (squash) August 21, 2026 20:50
@cgwalters
cgwalters merged commit 12a40a6 into main Aug 21, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent/workflow-edits-allowed Pre-authorizes agent runs to edit protected files without the request_review gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for agent/fix to non-agent created PRs

1 participant