Skip to content

test(node): two-holder loopback for the ranged-drive assembly path (#1506 PR2 A2 follow-up) #1897

Closed

Description

@alpergundogdu

Follow-up from #1506 PR2 (node ranged-drive loop, task A2). The pure plan/sequence/repair logic (node_origin/ranged_pull.rs::assemble over the RunSink trait) is unit-tested, and the single-source path is covered by the existing node_origin_pull suite (one holder → one run → equivalent to the old single-source drive). What remains un-exercised by any test is inside PeerRunSink::drive_run — the real buyer wiring:

  • Two real sequential lanes sharing the one buyer pool, with per-lane SettleOnDrop watermark hand-off between runs (the FakeSink bypasses all payment/ledger/settle wiring).
  • Real drive-error → RunOutcome classification (retry_disposition mapping) on the node path, including the shared-pool-exhaustion-is-terminal regime.
  • Demand-window continuity across two real lanes — argued by construction (shared served_paid/ServedPaidWait/RampPacer) but never asserted end-to-end (no test shows run 2 parking on served_paid).

Why deferred

A real two-partial-holder loopback needs a blob spanning ≥2 discovery blocks, and DISCOVERY_BLOCK_BYTES is 64 MiB with no test override — so a naive test needs a >64 MiB blob + a two-upstream harness where each advertises partial coverage, which is heavy and prone to this repo's documented pull-test CI flakiness. The sequential single-lane design removes the concurrent-draw hazard, so the review rated the residual moderate, not high and approved merge with this follow-up.

Suggested approach

Add a test-only override for DISCOVERY_BLOCK_BYTES (e.g. a #[cfg(test)] seam or a test-config parameter threaded into the coverage/planner path) so a small two-block blob suffices, then add:

  • Test A — client requests a blob held only as A:{block0} + B:{block1}; the serving node assembles from both (two sequential lanes) into a Complete blob; assert each of A and B is paid only for its block.
  • Test B — a client consuming only the first block leaves the node holding ≤ the demanded prefix (demand-window bound); assert run 2 parks on served_paid.
  • Test C — a source that stalls mid-run has its remainder re-planned to another covering holder; verified bytes not re-paid.

🤖 Generated with Claude Code

Activity

  1. moved this from Backlog to Ready in deCDNon Sep 1, 2026
  2. self-assigned this
    on Sep 1, 2026
  3. moved this from Ready to In progress in deCDNon Sep 1, 2026
  4. alpergundogdu commented on Sep 2, 2026

    @alpergundogdu
    ContributorAuthor

    Addressed in #1898 (commit `46971ace`): the two-holder ranged-assembly loopback landed in-PR rather than as a follow-up. `two_partial_holders_assemble_over_the_real_paid_path` drives the real two-lane `PeerRunSink` on one shared pool over a tiny 32 KiB blob (via a `test-support`-gated `DISCOVERY_BLOCK_BYTES` override, so no >64 MiB blob / OOM risk), asserting each holder is paid exactly its own block's bao wire, and a `Work::retire` fault test covers the anti-hang path. This issue can close when #1898 merges.

    🤖 Generated with Claude Code

  5. moved this from In progress to Done in deCDNon Sep 2, 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