-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requestrecipe:implementationRoute: proceed directly to implementationRoute: proceed directly to implementationstagedImplementation staged and waiting for promotion to mainImplementation staged and waiting for promotion to main
Description
Problem
The auto_merge ingredient (default "true") in implementation and remediation recipes is described as "Enroll the PR in the merge queue automatically after checks pass." This couples auto-merge to merge queue availability.
In route_queue_mode, when auto_merge == "true":
- If
queue_available == true→ enables auto-merge and waits for queue (enable_auto_merge→wait_for_queue) - If
queue_available == false→ routes torelease_issue_success(implementation) /confirm_cleanup(remediation) — PR is left unmerged
This means repos without a merge queue never get their PRs merged automatically, even though the recipe's intent is to merge after CI and review pass.
Desired Behavior
When auto_merge is "true", the recipe should merge the PR regardless of whether a merge queue exists:
- Merge queue present: Current behavior —
gh pr merge --squash --autoenrolls in the queue,wait_for_merge_queuepolls until merged/ejected. - No merge queue:
gh pr merge --squash --autoshould still be called. GitHub handles this natively —--autowaits for required status checks then merges directly without needing a queue. The recipe should poll for merge completion (PR state =merged) rather than callingwait_for_merge_queue.
The merge queue is largely irrelevant to the agent workflow because:
- The agent already waits for CI and review to pass before attempting merge
- If a concurrent merge introduces a conflict, the agent can resolve it and re-push
gh pr merge --squash --autodelegates queue-vs-direct to GitHub's branch ruleset automatically
Scope
implementation.yaml: Updateroute_queue_modeto add a direct-merge path whenqueue_available == falseinstead of skipping torelease_issue_successremediation.yaml: Same change — direct-merge path when no queue- Ingredient description: Update
auto_mergedescription from "Enroll the PR in the merge queue" to "Automatically merge the PR after checks pass" - Merge completion polling: For the no-queue path, poll PR state for
merged(similar to whatmerge-prskill does withgh pr view --json state,mergedAt) - Ejection/conflict handling: Ensure the no-queue path handles merge failures (e.g., conflict from concurrent merge) with the same resolve-and-retry pattern used in the queue path
Follows from #381 which added the auto_merge ingredient.
Requirements
ROUTE — Recipe Routing Updates
- REQ-ROUTE-001: When
auto_mergeis"true"andqueue_availableis"false", bothimplementation.yamlandremediation.yamlmust route to a direct-merge step instead of skipping to cleanup/release. - REQ-ROUTE-002: The direct-merge step must invoke
gh pr merge --squash --autoto enable GitHub-native auto-merge regardless of merge queue presence. - REQ-ROUTE-003: The direct-merge path must poll PR state for
mergedcompletion rather than callingwait_for_merge_queue.
FAIL — Failure Handling
- REQ-FAIL-001: The direct-merge path must handle merge failures (e.g., conflicts from concurrent merges) with a resolve-and-retry pattern analogous to the queue ejection path.
- REQ-FAIL-002: If the direct merge fails due to a non-conflict error, the recipe must route to the same cleanup/release path used by the queue timeout case.
DESC — Ingredient Description
- REQ-DESC-001: The
auto_mergeingredient description in bothimplementation.yamlandremediation.yamlmust be updated to reflect that it controls automatic merging after checks pass, not specifically merge queue enrollment.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestrecipe:implementationRoute: proceed directly to implementationRoute: proceed directly to implementationstagedImplementation staged and waiting for promotion to mainImplementation staged and waiting for promotion to main