Repository navigation
fix(dispatcher): retry 后不应被旧 PR 卡住 - #42
Merged
Merged
Conversation
Found by running the documented recovery path: `ai-decide retry` on a conflicting AI PR re-armed the issue, but the dispatcher skipped it with "handled/running/pr open" because an open PR existed for ai/issue-N. The maintainer had no way out except closing the PR by hand. Labels are the source of truth: `retry` removes ai-pr (and friends) and adds `ai`, so "ai present, no handled label" means "run again". The rerun force-pushes onto the same branch, which updates the existing PR in place (createPr already falls back to the open PR), and auto-merge is armed on it. `handledByLabels()` is exported and covered by a test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
实测文档里的恢复路径发现:
ai-decide retry把 Issue 重新排队后,dispatcher 仍然因为「已有 open PR」而跳过(skip ... (handled/running/pr open)),维护者只能手动关 PR。改为以标签为准:
retry会移除ai-pr/ 等并重新加ai,所以「有ai且无 handled 标签」= 要求重跑;重跑会 force-push 同一个分支,直接更新已有 PR(createPr本来就会回退到已有 PR),并重新 arm auto-merge。新增
handledByLabels()导出 + 2 个测试。