Skip to content

fix(client): a bundle pull drops sibling entries mid-drain, losing a late escrow and allowing exit 75 #2509

Closed

Description

@thiras

Problem

A bundle pull drops sibling entries in the middle of their drain of late lane builds.

run_groups returns on the first settle that ends the pull. That drops the buffer_unordered stream, and with it every other group's acquire future, including one that is in its 30 s drain_builds.

  • A late escrow that was already collected is lost. A sibling's drain may already hold an EscrowUntracked from a build whose receipt was read. That build's entry is no longer in the run's UnconfirmedEscrows handle, so nothing names its tx.
  • A plain give-up can still exit 75. Every entry shares the progress clock, so all groups give up together. A group with no late builds returns its GaveUp at once and wins, and the group with the late escrow is dropped. The command exits 75 ("rerun to resume"), and the rerun escrows again.
  • Builds still in flight drop mid top-up. The handle names those, but the drain does not run for them.

first_open has the same shape: its select! drops an in-flight lane build when the give-up fires, with no drain.

Fix direction

  • When one group ends the pull, stop the others and let each acquire finish its drain (bounded by BUILD_DRAIN) before run_groups returns. Fold any late escrow into the pull's error, as fold_late_escrow does for one fetch.
  • Give first_open the same drain on its give-up path.

Checks

  • A bundle pull in which one entry gives up while a sibling's late build ends with EscrowUntracked exits nonzero, not 75, and names that tx.

Also noted (low)

Found in the #2500 review (comment-analyzer and silent-failure passes). This behavior existed before #2500.

Activity

  1. added
    kind:bug
    rust
    area:payments
    on Oct 17, 2026
  2. self-assigned this
    on Oct 18, 2026
  3. moved this from Backlog to In progress in deCDNon Oct 18, 2026
  4. added a commit that references this issue on Oct 18, 2026
    36c8239
  5. moved this from In progress to Done in deCDNon Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:paymentskind:bugrust

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions