From cd5f05008b63e6d4f7c472cd30097c6588ee889f Mon Sep 17 00:00:00 2001 From: openhands Date: Sat, 21 Mar 2026 05:05:02 +0000 Subject: [PATCH] =?UTF-8?q?supervisor:=20learned=20=E2=80=94=20Push=20CI?= =?UTF-8?q?=20vs=20PR=20CI=20mismatch=20=E2=80=94=20agent=20picks=20wrong?= =?UTF-8?q?=20pipeline=20number?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supervisor/best-practices/dev-agent.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/supervisor/best-practices/dev-agent.md b/supervisor/best-practices/dev-agent.md index 7b65d50..b11d1dd 100644 --- a/supervisor/best-practices/dev-agent.md +++ b/supervisor/best-practices/dev-agent.md @@ -65,3 +65,9 @@ When push CI passes but PR CI fails (e.g., a duplicate-detection step only runs Symptom: PR CI=failure but dev-agent phase=awaiting_review, status shows 'waiting for CI + review'. Fix: inject the CI failure info into the Claude session with agent_inject_into_session, pointing to the duplicate blocks and telling Claude to fix + push + write PHASE:awaiting_ci. The phase-handler's awaiting_review loop checks for phase file mtime changes every 5 min and will re-enter the main loop automatically. + +### Push CI vs PR CI mismatch — agent picks wrong pipeline number +When the phase-handler injects 'CI failed' with a push pipeline number (e.g. #622), the agent checks that push pipeline, finds it passed, and concludes 'CI OK' — setting PHASE:awaiting_review despite the PR pipeline (#623) being the one that actually failed. +Root cause: the injected event does not always carry the correct pipeline number. +Symptom: agent in awaiting_review with PR CI=failure and push CI=success. +Fix: inject with explicit pipeline #623 (the pull_request event pipeline), point to the failing step and the specific duplicate blocks to fix. Use: woodpecker_api /repos/4/pipelines?event=pull_request (or look for event=pull_request in recent pipelines list) to find the correct pipeline number before injecting.