Problem
When a cherry-pick PR is created with AI-resolved conflicts, the ai-resolved-conflicts label is added AFTER PR creation via add_to_labels. This creates a race condition:
gh pr create creates the PR on GitHub
- GitHub immediately fires
pull_request.opened webhook
- Webhook handler checks for
ai-resolved-conflicts label — label doesn't exist yet
- Auto-verify and auto-merge proceed because the label is missing
- Only after does the cherry-pick handler add the label via PyGithub
Additionally, set_pull_request_automerge() has NO check for ai-resolved-conflicts label at all.
Expected Behavior
Cherry-pick PRs with AI-resolved conflicts should NOT be auto-verified or auto-merged, since they require manual review.
Observed Behavior
PR #350 in RedHatQE/mtv-api-tests was auto-verified and auto-merged despite having AI-resolved conflicts.
Deliverables
Problem
When a cherry-pick PR is created with AI-resolved conflicts, the
ai-resolved-conflictslabel is added AFTER PR creation viaadd_to_labels. This creates a race condition:gh pr createcreates the PR on GitHubpull_request.openedwebhookai-resolved-conflictslabel — label doesn't exist yetAdditionally,
set_pull_request_automerge()has NO check forai-resolved-conflictslabel at all.Expected Behavior
Cherry-pick PRs with AI-resolved conflicts should NOT be auto-verified or auto-merged, since they require manual review.
Observed Behavior
PR #350 in RedHatQE/mtv-api-tests was auto-verified and auto-merged despite having AI-resolved conflicts.
Deliverables
--labelflags togh pr createcommand for cherry-pick PRs so labels are present from creationai-resolved-conflictscheck inset_pull_request_automerge()