Skip to content

Keep the rebase conflict resolver's trust-read timeout over a later stop #174

Open

Description

@mchwang

Problem

When the rebase conflict resolver's issue-trust read fails with its own timeout or with gh's answer, and a cancel, shutdown or the rebase work deadline is pending when the resolver's error is handled, Rebaser.#resolveConflict reports the pending stop instead of the resolver's error.

In runner/rebase.ts, the resolver's catch runs abortExpired(); controller.signal.throwIfAborted(); throw error;. So a trust read that timed out at 12 s, followed by "Task cancelled.", "Server shutdown." or the rebase deadline while gh is still stopping, settles the preparation as failed with the stop's text, not the timeout or gh's answer.

This conflicts with AGENTS.md: "Preserve the original timeout, cancellation, and shutdown reason through every layer."

Context

Found during #48 (PR #171). That PR keeps the first stop reason in the gateways, the merge coordinator, the server's trust read, merge preparation and publish admission. It left this path unchanged: it is F5/F6 code, and docs/implementation/merge-queue.md names it as a follow-up.

Acceptance

  • The resolver's own timeout (timedOut()) or gh's answer (ghAnswered(), from github/timeout.ts and github/run-with-input.ts) that came before the stop is reported and recorded as the preparation's failure reason.
  • A stop that came first is still reported as the stop.
  • Retained resource ownership (RebaseResourcesUnsettled) keeps its current precedence.
  • Race regressions for each order, asserting the interleaving each one names, and the durable preparation record.
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions