Skip to content

Redrive doesn't move the failed run's pending inbound messages to the successor #1013

Closed

Description

@rmcdaniel

Problem

Redrive copies the source run's message cursor to the successor (MessageStreamCursor::transferCursor), but not the source's pending inbound messages. An inbound row keeps the workflow_run_id of the run that was current when it arrived. inbox()->receive() in the successor reads only rows with the successor's workflow_run_id. So a message that was still pending on the failed source at redrive time is never received by the successor.

Continue-as-new handles this with MessageService::transferMessagesToContinuedRun(). Redrive has no equivalent.

Reproduction

The workflow awaits go, receives one message from chat, runs an activity, sends a reply, then runs a failing activity.

  1. Signal go, send m1, and run the tasks. The run consumes m1, then fails.
  2. Send m2. It lands on the failed source run as pending.
  3. Redrive.

The successor finishes, and m2 stays pending on the source run. A successor that receives again at a later step gets null instead of m2.

General's interim review of #1012 found this; it predates #1012. In #1012's redrive test, the assertion that "m2 stays pending" records the current behavior. It is not a requirement.

Expected

At redrive, the source's pending inbound messages for its instance move to the successor, the same way continue-as-new transfers them. They are then received in order after the reused prefix.

Notes

Activity

  1. added
    kind:defectA public product behavior is incorrect
    priority:P2Normal-priority product work
    status:triageAwaiting maintainer classification
    on Nov 4, 2026
  2. added
    status:in-progressApproved work is actively being implemented or validated
    and removed
    status:triageAwaiting maintainer classification
    on Nov 4, 2026
  3. rmcdaniel commented on Nov 4, 2026

    @rmcdaniel
    MemberAuthor

    Shipped in Workflow 2.20.2: tag 2.20.2 → b3ba0c7 (merge of #1023; the merge tree equals the cleared head tree dffe7d01). The GitHub Release is marked latest, and Packagist resolves b3ba0c7. General verified the release independently. https://github.com/durable-workflow/workflow/releases/tag/2.20.2

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

    kind:defectA public product behavior is incorrectpriority:P2Normal-priority product workstatus:in-progressApproved work is actively being implemented or validated

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions