Skip to content

tests: no integration test for the range pull-through path (#985) verifying that a cdn/client/v1 byte-range request on a cache miss fetches only the requested range from origin and correctly assembles bao-verified output #990

Closed

Description

@alpergundogdu

PR #985 wires range_pull into origin adapters and the cache engine, but there is no end-to-end test that issues a byte-range request against a cold cache, confirms the origin received a range request, and verifies the delivered bytes match the slice of the full blob.


Filed via GitDailyReporterBot

Activity

  1. added
    kind:test
    on Jun 24, 2026
  2. github-actions commented on Jun 24, 2026

    @github-actions

    🎯 Triage report

    PR #985 wires range_pull into origin adapters and the cache engine but ships with no end-to-end coverage. This issue requests a targeted integration test that exercises the full cold-cache → range-request-to-origin → BAO-verified delivery path on cdn/client/v1. The success criteria are explicit and the scope is tightly bounded to one feature area.

    📊 Assessment

    Dimension Value Reasoning
    Type Task Test authoring task with well-defined acceptance criteria; no design decisions required
    Labels medium added (existing: technical, testing) Test coverage gap on recently-wired feature; not blocking but should close soon after #985 lands
    Coding agent Suitable Requirements are precise: cold cache → byte-range request → assert origin got a ranged fetch → assert delivered bytes match expected slice → assert BAO verification passes. Scope is self-contained in the cache crate test harness

    🔗 Similar issues

    💡 Notes and suggestions

    What the test must cover (from the issue body):

    1. Cold-cache scenario — ensure the blob is absent from the local iroh-blobs store before the request.
    2. Range request propagation — use a mock or instrumented origin adapter to assert that the upstream fetch used an HTTP Range: header matching the requested byte range.
    3. Byte slice correctness — compare the delivered payload against the expected slice of the known full blob.
    4. BAO verification — confirm the bao-verified decode step passes (i.e., the hash tree proof is consistent with the slice).

    Suggested test structure (in crates/cache/):

    #[tokio::test]
    async fn range_pull_cold_cache_e2e() {
        // 1. Spin up a mock HTTP origin that records received Range headers
        // 2. Configure a CacheEngine with an HttpOrigin pointing at the mock
        // 3. Ensure cache is empty (fresh iroh-blobs store)
        // 4. Issue a cdn/client/v1 byte-range request for [offset, offset+len)
        // 5. Assert mock received exactly one request with matching Range header
        // 6. Assert returned bytes == blob[offset..offset+len]
        // 7. Assert BAO verification did not error
    }

    Useful reference points in the codebase:

    Open question for reviewers: If #985 is still open/unmerged, this test can be developed in the same PR. If #985 already merged, a follow-up PR is appropriate.

    Generated by Agentic Triage for issue #990 · ◷

    Add this agentic workflows to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/issue-triage.md@94ec5db57374c5b04a4b8eef8b4413f9af44d63f
    
  3. self-assigned this
    on Jun 26, 2026
  4. thiras commented on Jun 27, 2026

    @thiras
    Contributor

    Closed by #1007 (merged as 2dba333). The end-to-end coverage lives in crates/node/tests/origin_range_pull.rs: cold_range_request_pulls_only_the_range_from_origin issues a cdn/client/v1 byte-range request against a cold cache and asserts the origin received exactly one ranged GET (zero whole-blob GETs), the delivered bytes equal the requested slice, and the blob stays partial — plus resume-to-end, out-of-bounds-reject, no-outboard fallback, and unauthorized-request coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind:testprio:medium

Type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions