Skip to content

Approved PR stuck on conflicts reported as awaiting review #3886

Open

Description

@sentry-junior

#3796 was approved on 2026-11-19 at 22:36Z, with auto-merge turned on 14s later. It has been conflicted since (GraphQL mergeable: CONFLICTING, REST mergeable_state: dirty). Junior missed this in two ways: its recurring status reports kept calling the PR "waiting for review", and the merge conflict check never woke the child agent that watches the PR. The PR sat unmerged for about a day until the approver noticed.

Status reporting

  • A recurring Junior report checked each PR with gh api repos/getsentry/junior/pulls/<n> --jq '[.state,.merged,.draft]'. That returned open false false and showed neither reviewDecision, auto_merge, nor mergeable/mergeable_state.
  • The report's own timer intent carried "ref: Remove isRecord and ban Record type guards #3796 in review" forward from one run to the next. Each run repeated that label instead of reading the review state again, so open was taken to mean "awaiting review".
  • Neither the report nor any other path told the approver that the approved, auto-merge PR was blocked on a conflict.

Merge conflict event never delivered

Raised by @BYK.

via @BYK.

--

View Session [Sentry]

Activity

  1. sentry-junior commented on Nov 20, 2026

    @sentry-junior
    ContributorAuthor

    Update after resolving the conflict on #3796 (merge commit e74491c45):

  2. sentry-junior commented on Nov 20, 2026

    @sentry-junior
    ContributorAuthor

    Root cause of the missing pull_request.merge_conflict for #3796: the merge conflict check worked, but the child Conversation that owns the Watch was paused by the consecutive automated-turn limit. Every conflict Event was dropped at delivery, and nobody was told.

    Evidence (production, release 0.310.0)

    • From 2026-11-19 19:00Z, automated_turn_limit.notice.skipped (reason: missing_location) is logged for agent:51817049a1b103db334188c909eec59b on every delivery attempt. The child had run 25 Watch Turns since 15:59Z, which is maxConsecutiveAutomatedTurns.
    • The webhooks for ref: Remove isRecord and ban Record type guards #3796 at 22:35:14, 22:35:39, 22:36:30 (the approval) and 22:41:28 each read the PR (GET pulls/3796), then read the conflict history (POST /graphql, which runs only when the PR is dirty), and then log the skip for that Conversation. The approval itself is a Quiet Event and skips the limit, so the skip in the 22:36:30 trace is the conflict Event. The policy returned "fix", and the Event was published.
    • The heartbeat conflict checks after the push from chore(api): Parse response schemas only in jsonResponse #3818 log the same skip in their traces from 22:40Z on, and keep doing so until 11-20 20:44Z.
    • No merge conflict check errors were logged. The GitHub heartbeat often went over its 25s budget in this window (plugin.heartbeat.failed), but it still reached ref: Remove isRecord and ban Record type guards #3796.

    Why it stayed silent

    • admitAutomatedTurn refuses Watch Events after 25 automated Turns in a row. Only a person's Turn or a parent message resets the count.
    • For a root, the pause posts a Slack notice and a person replies. A child has no Location, so postAutomatedTurnLimitNoticeForConversation skips the notice and releases the claim. Its parent never learns that the child stopped, so it never sends the message that would reset the count. The Watch stays active, but every Event it matches is dropped.

    The fix belongs in core's automated-turn limit notice (tell the parent of a paused child once, so it can message the child to continue), not in merge-conflict-checks/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions