autopilot(qa): bounce to dev instead of halt; stop after 3 #51

Merged
ffaerber merged 1 commits from fix/autopilot-bounce into main 2026-07-04 22:21:52 +02:00
Owner

Implements the maintainers autopilot QA policy.

Before: @qa emitted MERGE_PR (approve) or HALT_AUTOPILOT (any problem -> remove label, hand to human). It was explicitly told never to bounce.

After:

  • @qa never edits/fixes code. It emits MERGE_PR (approve) or BOUNCE: @<dev> after describing exactly what to change.
  • A BOUNCE re-triggers the named dev to fix (via AGENT_TOKEN), tagged autopilot fix attempt N/3, then a dev push auto-re-triggers @qa to re-verify — a self-correcting loop.
  • After 3 bounces the autopilot stops (removes the autopilot label) and asks @ffaerber.
  • HALT_AUTOPILOT remains, but only for problems a dev cant fix (ambiguous request / needs a human decision).

Files: run-agent.sh (QA prompt) + publish.sh (bounce handling, 3-strike counter, dev-fix -> re-verify trigger, marker stripping).

Verified locally: BOUNCE target parsing (@junior/@senior/@lead) and the counter (attempts 1/3, 2/3, 3/3, then HALT).

Note: I kept MERGE_PR as QAs approve action (thats how autopilot completes) — "@qa cant change code" read as "cant fix/edit; must bounce", not "cant merge an approved PR". Say if youd rather a separate merge step.

Implements the maintainers autopilot QA policy. **Before:** @qa emitted MERGE_PR (approve) or HALT_AUTOPILOT (any problem -> remove label, hand to human). It was explicitly told never to bounce. **After:** - @qa never edits/fixes code. It emits `MERGE_PR` (approve) or `BOUNCE: @<dev>` after describing exactly what to change. - A BOUNCE re-triggers the named dev to fix (via AGENT_TOKEN), tagged `autopilot fix attempt N/3`, then a dev push auto-re-triggers @qa to re-verify — a self-correcting loop. - After **3 bounces** the autopilot stops (removes the `autopilot` label) and asks @ffaerber. - `HALT_AUTOPILOT` remains, but only for problems a dev cant fix (ambiguous request / needs a human decision). Files: `run-agent.sh` (QA prompt) + `publish.sh` (bounce handling, 3-strike counter, dev-fix -> re-verify trigger, marker stripping). Verified locally: BOUNCE target parsing (@junior/@senior/@lead) and the counter (attempts 1/3, 2/3, 3/3, then HALT). Note: I kept MERGE_PR as QAs approve action (thats how autopilot completes) — "@qa cant change code" read as "cant fix/edit; must bounce", not "cant merge an approved PR". Say if youd rather a separate merge step.
ffaerber added 1 commit 2026-07-04 22:18:02 +02:00
Per maintainer: @qa must never change code — it only accepts a PR or sends it back to the dev with
precise instructions. Replaces the halt-on-any-problem behavior with a bounce loop:

- QA prompt: emit MERGE_PR (approve), or `BOUNCE: @<dev>` after spelling out exactly what to change.
  HALT_AUTOPILOT is now only for problems a dev can't fix (needs a human decision).
- publish.sh: on BOUNCE, re-trigger the named dev (via AGENT_TOKEN) with "autopilot fix attempt N/3".
  Count prior attempts from the PR thread; at 3 it stops (removes the label) and hands to @ffaerber.
- publish.sh: after a dev pushes a fix (resume), auto-re-trigger @qa to re-verify — closing the loop
  (dev fix -> qa re-check -> merge or bounce again).
- Updated the initial @qa trigger wording (bounce, not halt).

Verified: BOUNCE target parsing and the 3-strike counter (attempts 1/3,2/3,3/3 then HALT).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ffaerber merged commit 5a9dba64fb into main 2026-07-04 22:21:52 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gitea/agents#51