Skip to content

fix(client,cli): report every pool replacement a pull made, for a blob fetch too #2519

Closed

Description

@thiras

Problem

The #2517 fix reports a bundle pull's first-pass replacement from the recovery gate. Two gaps remain.

1. decdn get of a blob reads the replacement from the error only

fetch.rs::next_pass takes the replacement from the pass's error (downcast_ref::<PoolReplaced>). A late lane build's escrow folds over a PoolReplaced ([fold_late_escrow]), so the replacement survives only as text. The command then prints no "reclaim it with: decdn pool reclaim" note for the closed pool. A bundle pull reads RecoveryGate::replaced for this case; a blob fetch does not.

2. A second-pass replacement is not reported

When the first pass's replacement runs the rest again, a second replacement (new pool 1 → new pool 2) ends the pull "funding needed". BundleOutcome::replaced holds only the first one, so new pool 1, which this pull funded at the full working deposit, gets no reclaim note. It appears only in the error text. The same holds for decdn get of a blob.

No funds are lost: each replacement records the new pool before it returns. The user is not told that a closed pool may hold a balance to reclaim.

Fix direction

  1. In next_pass, also read recovery.replaced() before start_next_pass, and print the reclaim note for a replacement the error does not carry. Run the work again only on a PoolReplaced stop.
  2. Report every replacement a pull made: for example BundleOutcome::replaced: Vec<PoolReplaced>, and one reclaim note per closed pool.

Checks

  • A blob fetch whose late escrow folds over a PoolReplaced prints the reclaim note, and runs no second pass.
  • A pull whose second pass replaces the pool again names both closed pools.

Found in the review of the #2508/#2513/#2515/#2517 batch.

Activity

  1. added
    kind:bug
    rust
    prio:low
    on Oct 18, 2026
  2. self-assigned this
    on Oct 18, 2026
  3. added
    area:payments
    on Oct 18, 2026
  4. moved this from Backlog to In progress in deCDNon Oct 18, 2026
  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:bugprio:lowrust

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions