Skip to content

node: buyer-side payment failures and local timeouts are recorded as upstream Unreachable — poisons honest providers' reputation locally and over gossip #857

Closed

Description

@thiras

Severity: MEDIUM — from the 2026-06-10 full-repository review (#831/#834 surface).

Location

crates/node/src/node_origin.rs:406-418 — every non-HashMismatch stream_fetch error, including voucher rejection (e.g. our own stale nonce per #852, or deposit exhaustion) and our own pull_timeout, maps to Outcome::Unreachable, feeding local_rep.record and an uptime_observed: Some(false) report into the gossiped ObservationBuffer (node_origin.rs:473).

Impact

Combined with #852, a buyer systematically down-scores and publicly defames every provider it has ever successfully pulled from. Even after #852 is fixed, a mis-sized local timeout or any self-inflicted payment error tars the counterparty network-wide via reputation gossip.

Not a duplicate

No open issue covers outbound-report outcome classification; #831/#834 are the features themselves.

Fix direction

Classify errors: voucher-rejection and channel/payment errors should record no negative observation (matching the existing channel-open-failure arm); only connect/transport failures should map to Unreachable.

Activity

  1. added
    kind:bug
    prio:medium
    rust
    on Jun 10, 2026
  2. github-actions commented on Jun 10, 2026

    @github-actions

    🎯 Triage report

    The stream_fetch error path in node_origin.rs:406-418 uses a catch-all Outcome::Unreachable mapping for every non-HashMismatch failure, including buyer-side faults (stale nonce from #852, deposit exhaustion, local pull timeout). This feeds both local EWMA reputation scoring and a gossiped uptime_observed: Some(false) report, causing the buyer to actively defame providers network-wide for errors it caused itself. The fix direction is already known — align payment/voucher error arms with the existing channel-open-failure arm (which already skips negative observations).

    📊 Assessment

    Dimension Value Reasoning
    Type Bug Incorrect error-to-outcome classification with concrete network-wide reputation side effects
    Labels bug, medium, rust (existing — unchanged) All three are accurate; no additional labels needed
    Coding agent Suitable Precise file/line location given, fix direction clear (match existing channel-open-failure arm), error variant taxonomy is bounded within stream_fetch's return type

    🔗 Similar issues

    💡 Notes and suggestions

    Fix scope — crates/node/src/node_origin.rs:406-418

    The existing channel-open-failure arm is the precedent: it explicitly skips recording a negative observation because the failure is self-inflicted. The same logic needs to apply here.

    Suggested sub-task checklist:

    • Enumerate all error variants returned by stream_fetch and classify each as either provider-side (connect/transport/hash) or buyer-side (voucher rejection, stale nonce, deposit exhaustion, local timeout)
    • Add explicit match arms for buyer-side errors that skip local_rep.record and suppress the uptime_observed: Some(false) gossip entry (or set it to None)
    • Only retain Outcome::Unreachable for connect/transport failures where the provider is genuinely unreachable
    • Add or extend a unit test that fires a voucher-rejection error and asserts no negative reputation record or gossip report is produced

    Sequencing note: this bug is independently fixable without waiting for #852. Even with #852 fixed, a mis-sized pull_timeout or a legitimately exhausted deposit will still hit the wrong arm. Fixing them in parallel is safe; fixing this one first is also fine.

    Gossip amplification risk: the ObservationBuffer at line 473 means incorrect negative reports are broadcast to peers, potentially affecting provider selection network-wide before any local-only correction. This makes the bug's real blast radius larger than the single-node EWMA score alone — worth noting in the PR description.

    Generated by Agentic Triage for issue #857 · sonnet46 511.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 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind:bugprio:mediumrust

Type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions