Skip to content

Agent must verify PR passes CI and has no merge conflicts before handing off #10

@oscarvalenzuelab

Description

@oscarvalenzuelab

Summary

When the agent submits a PR, it must verify the PR is in a mergeable state before considering the task done:

  1. All CI checks / tests pass — if any fail, the agent should fix the issues and push again
  2. The PR has no merge conflicts with the base branch — if it does, the agent should resolve them

Motivation

  • Avoid handing off broken PRs that humans then have to triage
  • Catch merge conflicts early while the agent still has context
  • Reduce back-and-forth between the agent and reviewers

Acceptance criteria

  • After pushing a PR, the agent polls CI status until checks complete
  • If CI fails, the agent investigates, fixes, and pushes new commits (up to a reasonable retry limit)
  • Agent checks mergeable / mergeStateStatus via gh pr view and resolves conflicts if found
  • Task is only marked complete when PR is green AND conflict-free

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions