Skip to content

test(node): prove the reclaim sweep returns when a reclaim receipt never arrives #2495

Closed

Description

@thiras

Problem

No test proves that the reclaim sweep returns when a reclaim receipt never arrives.

#2492 bounded the receipt wait in reclaim_once (crates/node/src/buyer_pool.rs) with await_receipt(pending, Some(RECEIPT_TIMEOUT)). A lapse warns "reclaim sweep: reclaim receipt not read; the next sweep retries" and meters decdn_buyer_reclaim_failures_total.

The only test of that arm, an_unreadable_sweep_reclaim_receipt_logs_the_tx (crates/node/src/buyer_pool/tests.rs), uses a mock Asserter. The receipt read fails at once, so the test passes with or without the bound. If the bound is removed, one dropped reclaim stalls the hourly sweep again, and no test fails.

Fix direction

Add a paused-clock test on ScriptedRpc::parked_receipt (decdn-incentive test-util). The reclaim sends, and its receipt never arrives. sweep_reclaimable_once must return after RECEIPT_TIMEOUT.

ScriptedRpc leaves every unscripted call pending. The test must script what the sweep reads before the send: getPool (an eth_call) and the chain-head read. A call it does not answer parks the sweep before the receipt wait.

Checks

  • The test passes with the bound.
  • The test fails, by a timeout or by hanging, when await_receipt takes None. Do this mutation check by hand.
  • The row stays, and decdn_buyer_reclaim_failures_total is 1.

Follow-up from the #2492 review.

Activity

  1. self-assigned this
    on Oct 17, 2026
  2. assigned and unassigned on Oct 17, 2026
  3. moved this from Backlog to In progress in deCDNon Oct 18, 2026
  4. 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

No labels
No labels

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions