Skip to content

Wire in staged-but-unconnected mechanisms (reputation evict, ext-seam encode, probe-constant dedup, admin surfaces) #1844

Closed

Description

@alpergundogdu

A codebase-wide mechanism sweep found a handful of items that were built for a real consumer but never connected. Unlike the dead code (being deleted separately), each of these has a payoff when wired:

  1. Call LocalReputation::evict periodically. crates/reputation/src/local.rs — the method's own doc says "call periodically" and nothing does, so the per-peer score map grows for the daemon's lifetime. One spawn_periodic entry in crates/node/src/runtime/mod.rs fixes it. Eviction is information-lossless by design (requires near-neutral score AND 26 weeks idle).

  2. Use encode_store_request in the DHT client. crates/node/src/dht/client.rs:77 hand-builds DhtMessage::Store and encodes it with encode_message, bypassing the ext-seam helper in crates/protocol/src/dht.rs:305 — while the receive-side twin (parse_store_request_ext) is live in handlers/dht.rs:792. If a Tier-1 StoreRequestExt field is ever added (ADR 013), the hand-built path silently won't encode it. ~3-line change restores seam symmetry.

  3. Deduplicate the origin-probe default constants. crates/cache/src/origin_probe.rs:28-40 (DEFAULT_ORIGIN_PROBE_TTL / _NEGATIVE_TTL / _TIMEOUT / _MEMO_CAPACITY) are shadowed by a parallel set in crates/common/src/config/mod.rs:201-217. Values currently agree but nothing binds them — the exact drift DEFAULT_MAX_PROBE_HOLDS was moved into decdn-config-types to prevent (crates/cache/src/probe_hold.rs:32-38, CLI binary-split regression: publisher links cache crate (iroh-blobs/AWS SDK) #578). Same treatment here.

  4. Wire ContentDenylist::chain_origin_count into the admin surface. crates/node/src/content_deny.rs:130 is documented "For telemetry and the admin surface" but neither admin.rs nor metrics.rs calls it. Either add it to admin_v1_status (operator visibility into how many origins are chain-denied) or remove it.

  5. Add a decdn node slashes subcommand. admin_v1_slashes is implemented server-side (crates/node/src/admin.rs:755) and e2e-tested (crates/e2e/tests/slash_appeal.rs), but NodeCommand has no variant for it — an operator must source slash IDs elsewhere before decdn appeal slash --slash-id. This is the most user-visible gap of the set.

  6. (Optional, pairs with 4/5) Expose LocalReputation::snapshot via admin_v1_status or decdn node top for peer-score visibility; otherwise remove it.

Found during the mechanism inventory sweep (internal: analysis/mechanism-inventory.html).

Activity

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

Metadata

Metadata

Assignees

Labels

area:cliarea:nodekind:choreprio: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