Skip to content

node: probe-failure reputation penalty is applied with no peer identifier, no labeled metric, and no score surface #1987

Closed

Description

@yigitdot

Severity: MEDIUM — the only failure class that costs a peer reputation is the one an operator cannot attribute. Verified against main @ 8b437de.

Location

crates/node/src/node_origin/mod.rs:942-947:

Err(err) => {
    debug!(%err, "node-origin: probe failed; scoring provider unreachable");
    record_outcome(deps, pk, &Outcome::Unreachable);
    return None;
}

The log line carries %err only — no node_id, no provider_addr, no socket address, no relay — at debug!, invisible under the default RUST_LOG=info. It is the site that applies a fully negative reputation sample (crates/reputation/src/local.rs:402).

Nothing downstream recovers it:

  • crates/node/src/metrics.rs:658, :720, :725 — node_pull_success / node_pull_corruption / node_pull_unreachable are bare unlabeled Counters. The same file uses Family<StreamLabels, Gauge> (:164) and Family<ProbeHoldUnavailableLabels, Counter> (:243), so the pattern is available and not used here.
  • No reputation metric is declared: all 18 "reputation" mentions in metrics.rs are doc prose.
  • LocalReputation::snapshot() (crates/reputation/src/local.rs:331) has only #[cfg(test)] callers. Drop aggregated reputation; make ADR 008 reputation local-only #1419 deliberately removed admin_v1_reputation and decdn node reputation, so there is no RPC or CLI view either.

By contrast, every peer-attributable arm of classify_pull_failure (node_origin/mod.rs:2353+) does log %provider_addr — but those arms are all reputation-neutral. The two warn! arms (OurDeadLane :2441, OurLocalFault :2530) are about this node, not the peer.

Impact

decdn_node_pull_unreachable_total climbs and an operator cannot ask which peer, which host, or what the resulting local scores are. Combined with #1986 the penalty can land on a node that was merely rate-limiting, and nothing records that it happened.

The classification itself is correct: #857 established that only connect/transport failures map to Unreachable, and that is what ships. This issue is about the penalty being unobservable, not about the verdict.

Fix direction

  • Add %pk (and provider_addr where resolvable) to the probe_candidate failure log; consider info! or a dedicated target, since the line applies a score change.
  • Label the three node_pull_* counters by provider (Family<_, Counter>), matching probe_hold_unavailable.
  • Whether a local-score view should return (a read-only admin RPC, or a per-peer gauge) is a separate decision — Drop aggregated reputation; make ADR 008 reputation local-only #1419 cut it alongside the aggregated tier, and re-adding it needs its own justification rather than riding in here.

Activity

  1. added
    kind:bug
    prio:medium
    area:node
    on Sep 11, 2026
  2. self-assigned this
    on Sep 14, 2026
  3. moved this from Backlog to In progress in deCDNon Sep 14, 2026
  4. moved this from In progress to Done in deCDNon Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:nodekind:bugprio:medium

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions