Skip to content

pr-validator: a transient GitHub API timeout in the auto-close step fails a PASS run and skips Enable auto-merge #227

Open

Description

@aitrawog

Observed on opencharly/opencharly#604, run 39852528036, head ff409ea:

  • The review engine produced ## Review — PASS, and the Parse verdict step succeeded.
  • The next step, Auto-close (max attempts; eval verdicts only), failed on GET /repos/opencharly/opencharly/issues/604/comments?per_page=100 with HttpError: Connect Timeout Error (UND_ERR_CONNECT_TIMEOUT, 500 after 10063 ms, retries: 0).
  • The run concluded failure, Enable auto-merge was skipped, and the PR now carries a failed required check beside a PASS verdict.

Mechanism. The auto-close step is a bookkeeping step that runs after the verdict is decided. A connection failure from the self-hosted runner to api.github.com throws an unhandled error, and that error decides the job's conclusion. So an infrastructure fault is reported exactly like a gate failure, and the one PASS that should arm auto-merge is lost.

Blast radius. Every PR whose run hits a transient API fault in that step: a PASS turns into a red required check, which then needs a manual REST re-run or a new push.

Root-fix direction (for the owners to decide):

  • An API failure in the auto-close bookkeeping should be classified and reported as infrastructure, like the existing Verdict class: infra path, rather than failing the job.
  • Alternatively, the step's API calls should be made against a declared readiness deadline rather than a single attempt.

Found while landing opencharly/opencharly#604; that PR itself continues by a fresh push.

Agent: design-unify
Assisted-by: Claude Code Claude Opus 5.5 (analysed on a live system)

Activity

  1. aitrawog commented on Oct 30, 2026

    @aitrawog
    ContributorAuthor

    Adding a second instance to this issue — the ARM step this time, not the auto-close step.

    Observed on opencharly/plugin-box#60, run 39852021984, head 7e4d5fd:

    • The review engine produced ## Review — PASS (2026-10-22T20:58:07Z) and the Parse verdict step succeeded.
    • The LAST step, Enable auto-merge, failed on its own GraphQL call: POST /graphql - 500 with id UNKNOWN in 10057ms, then RequestError [HttpError]: Connect Timeout Error (retries: 0).
    • The run concluded failure, so autoMergeRequest is null and the PR carries a red required check beside a PASS verdict.

    What this adds to the blast radius. This issue's root-fix direction is written for the auto-close step. #60 is the sibling instance in the arm step: there was no eval verdict to auto-close on, so the auto-close step never ran, and the fault landed one step later — on the arm step's own enablePullRequestAutoMerge GraphQL mutation. Both steps are post-verdict bookkeeping, and both decide the job's conclusion on an unhandled API error. So the class is wider than the one step this issue names: any post-verdict API call in the job can convert a PASS into a red required check.

    Why it matters that nobody noticed for 8 days. The org's check-stalled-automerge.sh cannot see this shape. It selects only ARMED+BEHIND, ARMED+DIRTY, and NON_RESOLVING conclusions (CANCELLED, TIMED_OUT, STALE, STARTUP_FAILURE, ACTION_REQUIRED) — a COMPLETED/FAILURE conclusion is deliberately out of scope, because a red PR is supposed to be read. So the shape "PASS verdict + red required check + unarmed auto-merge" is invisible to the detector by design, and #60 sat for eight days with a correct change that could not land.

    The same two remedies apply, and neither is step-specific. Classify a post-verdict API failure as infrastructure (the engine already has a Verdict class: infra path), or make the call against a declared readiness deadline instead of a single attempt. This instance's arm step uses retries: 0, so it had no second attempt.

    Agent: pb60-routing-comment
    Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (analysed on a live system)

  2. added
    category:verification
    type:fix
    on Nov 23, 2026
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

    category:verificationtype:fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions