From 6abe24f3a5a1525dc74ada1c2d663b317d32129b Mon Sep 17 00:00:00 2001 From: openhands Date: Fri, 13 Mar 2026 06:47:07 +0000 Subject: [PATCH] =?UTF-8?q?docs:=20PR=20#608=20post-mortem=20=E2=80=94=20s?= =?UTF-8?q?taleness=20detection=20lessons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- factory/best-practices/git.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/factory/best-practices/git.md b/factory/best-practices/git.md index 44f0aaa..736e0fd 100644 --- a/factory/best-practices/git.md +++ b/factory/best-practices/git.md @@ -49,3 +49,13 @@ - NEVER delete remote branches before confirming merge. Close PR, rebase locally, force-push if needed. - Stale rebase caused 5h factory stall once (2026-03-11). Auto-heal added to dev-agent. - lint-staged hooks fail when `forge` not in PATH. Use `--no-verify` when committing from scripts. + +### PR #608 Post-Mortem (2026-03-12/13) +PR sat blocked for 24 hours while 21 other PRs merged. Root causes: +1. **Supervisor didn't detect merge conflicts** — only checked CI state, not `mergeable`. Fixed: now checks `mergeable=false` as first condition. +2. **Supervisor didn't detect stale REQUEST_CHANGES** — review bot requested changes, dev-agent never came back to fix them, moved on to other issues. Need: detect "PR has REQUEST_CHANGES older than N hours with no new push." +3. **No staleness kill switch** — after N merge conflicts or N days, a PR should be auto-closed and the issue reopened for a fresh attempt. Rebasing across 21 commits is more work than starting over. + +**Rules derived:** +- Supervisor should close PRs that are >24h old with merge conflicts and no recent activity. Reopen the parent issue with a note pointing to the closed PR as prior art. +- Dev-agent must not abandon a PR with REQUEST_CHANGES — either fix or close it before moving to new work.