Skip to content

cleanup: dead public surface and stale lint suppressions #1563

Closed

Description

@thiras

Dead public surface and stale lint suppressions, all verified at HEAD (b2a9651). Grouped because each is a small mechanical fix; split anything that grows.

  • StreamRequest::requested_len() (crates/protocol/src/client.rs:234-245): #[must_use] pub const fn whose doc says consumers should read the range through it rather than re-deriving the byte_len == 0 sentinel — zero callers repo-wide, while ~9 serving-side sites re-derive the sentinel inline (handlers/client/dispatch.rs:416,446,468,586,720,927, handlers/client/fill.rs:354, cache/src/engine.rs:2624,2653, bao-range/src/lib.rs:245,251). Route them through it or delete it.
  • GossipService::spawn(_endpoint: Endpoint, …) (crates/gossip/src/service.rs:195-204): owned Endpoint param is _-discarded, with #[allow(clippy::needless_pass_by_value)] (:192) hiding it; the caller clones a real endpoint for nothing (runtime/mod.rs:2023-2032). Drop the param (also shrinks an 8-arg signature).
  • AdminState::signer (crates/node/src/admin.rs:100-101): #[allow(dead_code)] // Wired in #406; consumed by #319 / #327 — never read; handlers use voucher_signer instead (:842). Remove field + allow.
  • Stale suppression on ProgressiveSource::LocalOutboard (crates/node/src/handlers/client/source.rs:36-43): comment says "not yet constructed outside this module's own tests"; it is constructed in the production serve path at handlers/client/window.rs:403 since feat: serve-side stream-while-store for http/s3 via publisher outboard (#1130) #1528. Remove the #[allow(dead_code)] + comment before it masks real deadness.
  • Blanket #![allow(dead_code)] (crates/common/src/config/resolved.rs:7, "Fields will be consumed by the node runtime"): pre-runtime leftover that lets truly-dead resolved fields compile silently forever. Remove; add per-field allows where still needed.
  • CacheEngine::stats() (crates/cache/src/engine.rs:337, impl :2327-2330): hardcoded bytes_stored: 0, blob_count: 0 stub whose stated consumer (gossip) never materialized; zero callers, and both stated preconditions (eviction, accounting) have since landed. Wire real accounting or delete — a consumer wired later would silently read zeros.
  • crates/node/src/probe_client.rs (:14): line-for-line duplicate of decdn_client_pull::probe::probe_once; its own comment says the blocker for collapsing is gone (node already depends on client-pull as client_requester). Collapse to one impl.
  • decdn-node run --publisher-registry-address / DECDN_PUBLISHER_REGISTRY_ADDRESS (crates/common/src/cli/run.rs:105-110): accepted, parsed, zero-address-rejected (config/mod.rs:1244-1266) — then read by nothing in the daemon (only the config validate summary; the CLI publish path resolves its address via chain_ctx, not ResolvedBlockchain). Drop the flag from RunArgs or document it as validate-only.
  • RESUBSCRIBE_FAILED_LABEL (crates/gossip/src/service.rs:43, Protocol/gossip robustness & DoS hardening (peer-table cap, reconnect sender, frame padding, I/O classification) #577 H2): verify the counter is actually incremented on the resubscribe-failure path, not just declared.

Activity

  1. added
    rust
    prio:low
    on Aug 1, 2026
  2. alpergundogdu commented on Aug 3, 2026

    @alpergundogdu
    Contributor

    Resolved by #1581 (merged, commit 373401e). The multi-issue "Closes" line only auto-closed the first number; closing manually.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    prio:lowrust

    Type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions