feat(merge): implement failure handling for single-PR merge-chains #9809

Open
opened 2026-04-15 16:15:27 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Commit Message: feat(merge): implement failure handling for single-PR merge-chains
  • Branch: feat/merge-chain-single-pr-failure

Background and Context

When a merge-chain containing exactly one PR fails revalidation, that PR should be surfaced for investigation rather than retried indefinitely. This is the base case of the recursive split-and-retry strategy: once a chain cannot be split further (it contains only one PR), the failure must be attributed to that specific PR and escalated for human review.

Parent Epic: #9757

Expected Behavior

When this issue is complete, single-PR chain failures are detected, the failed PR is removed from the queue and flagged for investigation, a clear error message indicates which PR failed and why, and no infinite retry loop occurs.

Acceptance Criteria

  • Single-PR chain failure is detected and distinguished from multi-PR failures
  • Failed PR is removed from the queue and flagged for investigation
  • Clear error message indicates which PR failed and the reason (CI output reference)
  • No infinite retry loop — the PR is not re-queued after single-PR failure
  • Unit tests cover detection, removal, flagging, and error messaging

Subtasks

  • Implement detection of single-PR chain failure condition
  • Implement removal of failed PR from the queue
  • Implement flagging mechanism (status update, notification, or log entry)
  • Implement clear error message with PR reference and failure reason
  • Ensure no re-queue path exists for single-PR failures
  • Write unit tests for all failure handling paths
  • Commit implementation on branch feat/merge-chain-single-pr-failure

Definition of Done

This issue is closed when:

  • Single-PR chain failures are detected and the PR is flagged for investigation
  • No infinite retry loop is possible for single-PR failures
  • Error messages clearly identify the failing PR and reason
  • Unit tests pass with coverage >= 97%
  • A pull request is submitted, reviewed, and merged to master
  • All acceptance criteria above are independently verified

Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planning-pool-supervisor

## Metadata - **Commit Message**: `feat(merge): implement failure handling for single-PR merge-chains` - **Branch**: `feat/merge-chain-single-pr-failure` ## Background and Context When a merge-chain containing exactly one PR fails revalidation, that PR should be surfaced for investigation rather than retried indefinitely. This is the base case of the recursive split-and-retry strategy: once a chain cannot be split further (it contains only one PR), the failure must be attributed to that specific PR and escalated for human review. **Parent Epic**: #9757 ## Expected Behavior When this issue is complete, single-PR chain failures are detected, the failed PR is removed from the queue and flagged for investigation, a clear error message indicates which PR failed and why, and no infinite retry loop occurs. ## Acceptance Criteria - [ ] Single-PR chain failure is detected and distinguished from multi-PR failures - [ ] Failed PR is removed from the queue and flagged for investigation - [ ] Clear error message indicates which PR failed and the reason (CI output reference) - [ ] No infinite retry loop — the PR is not re-queued after single-PR failure - [ ] Unit tests cover detection, removal, flagging, and error messaging ## Subtasks - [ ] Implement detection of single-PR chain failure condition - [ ] Implement removal of failed PR from the queue - [ ] Implement flagging mechanism (status update, notification, or log entry) - [ ] Implement clear error message with PR reference and failure reason - [ ] Ensure no re-queue path exists for single-PR failures - [ ] Write unit tests for all failure handling paths - [ ] Commit implementation on branch `feat/merge-chain-single-pr-failure` ## Definition of Done This issue is closed when: - Single-PR chain failures are detected and the PR is flagged for investigation - No infinite retry loop is possible for single-PR failures - Error messages clearly identify the failing PR and reason - Unit tests pass with coverage >= 97% - A pull request is submitted, reviewed, and merged to `master` - All acceptance criteria above are independently verified ## Links - **Blocks**: #9757 --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planning-pool-supervisor
Author
Owner

🏷️ Triage Decision — [AUTO-OWNR-3]\n\nStatus: Verified\n\nIssue Type: Feature (v3.2.0 merge-chain epic) \nMoSCoW: Must Have — Single-PR failure handling is core to merge-chain reliability \nPriority: High\n\nRationale: Handling failures in single-PR merge-chains is essential for the merge-chain system to be reliable. Must Have for the merge-chain epic.\n\nLabels to apply: State/Verified, MoSCoW/Must have, Priority/High, Type/Feature\n\n---\nAutomated by CleverAgents Bot\nAgent: automation-tracking-manager

## 🏷️ Triage Decision — [AUTO-OWNR-3]\n\n**Status:** ✅ Verified\n\n**Issue Type:** Feature (v3.2.0 merge-chain epic) \n**MoSCoW:** Must Have — Single-PR failure handling is core to merge-chain reliability \n**Priority:** High\n\n**Rationale:** Handling failures in single-PR merge-chains is essential for the merge-chain system to be reliable. Must Have for the merge-chain epic.\n\n**Labels to apply:** State/Verified, MoSCoW/Must have, Priority/High, Type/Feature\n\n---\n**Automated by CleverAgents Bot**\nAgent: automation-tracking-manager
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#9809
No description provided.