Skip to content

tests: no integration test for cdn/client/v1 node-to-node paid pull-through covering cache miss, upstream payment channel creation, and simultaneous client streaming #746

Closed

Description

@alpergundogdu

The cdn/client/v1 handler was implemented in PR #733 but there is no integration test that exercises the full node-to-node paid pull-through path: a client requesting a blob not in the local cache, the node opening a payment channel to an upstream node, and streaming the blob to the client simultaneously. This scenario is the critical revenue and correctness path for the multi-hop case.


Filed via GitDailyReporterBot

Activity

  1. added
    prio:critical
    kind:test
    on May 31, 2026
  2. github-actions commented on May 31, 2026

    @github-actions

    🎯 Triage report

    Missing integration test for the cdn/client/v1 paid pull-through path: cache miss → upstream payment-channel open → simultaneous blob streaming to client. This is the critical revenue/correctness path for multi-hop, flagged poc-blocking. The handler was shipped in PR #733 but no end-to-end test exercises the full three-phase flow, leaving correctness of the payment + streaming interaction unverified.

    📊 Assessment

    Dimension Value Reasoning
    Type Task Implementing a missing test suite; no bug or design decision needed
    Labels unchanged (critical, technical, testing, poc-blocking) Already accurately reflect scope and urgency
    Coding agent Suitable Scope is well-defined: spin up two in-process nodes, trigger a cache-miss request, assert payment channel is opened and blob arrives correctly; no architectural decisions required
    💡 Notes and suggestions

    Test structure sketch

    1. Spin up two decdn-node instances in-process (or via tokio::test) — an upstream node with the blob already cached, and a downstream node with an empty cache.
    2. Connect a mock client to the downstream node using the cdn/client/v1 ALPN.
    3. Assert the downstream node opens a payment channel to the upstream node (incentive crate).
    4. Assert the downstream node streams blob bytes to the client simultaneously (no full-fetch-then-forward).
    5. Assert the downstream node records payment vouchers correctly.

    Key files to look at

    Edge cases worth covering

    • Upstream node unreachable / channel open fails → downstream should return error to client cleanly
    • Partial stream / client disconnect mid-transfer → payment channel not left open indefinitely
    • Hash mismatch on received bytes from upstream

    Suggested sub-tasks

    • Add a two-node test harness helper (reusable across future integration tests)
    • Happy-path: cache miss, channel open, blob delivered, vouchers correct
    • Sad-path: upstream unreachable
    • Sad-path: client disconnects mid-stream

    Generated by Agentic Triage for issue #746 · sonnet46 352.8K · ◷

    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 4, 2026
  4. thiras commented on Jun 10, 2026

    @thiras
    Contributor

    In-scope test coverage closed by #827 (node-to-node pull-through sad-path cases); the happy-path two-hop test landed earlier in #813, and the runtime orchestration #827 noted as deferred has since landed in #834. Closing as resolved.

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

Metadata

Metadata

Assignees

Labels

kind:testprio:critical

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions