Repository navigation
Description
Context
Follow-up to #326. The reputation vertical (engine + gossip transport + node wiring) is in place, and the inbound path is being made live by the settlement-indexer + admin_v1_reputation follow-up (live reporter weights + observability). Two pieces of ADR 008 / ADR 001 coverage remain, and both are blocked on the node-to-node cache-miss pull-through orchestration not yet existing in production.
Verified test-only (no production call site today):
client_requester::stream_fetch,buyer_channel::open_or_reuse_channel,dht/lookup::find_providers,selection::rank_candidates- no node-side peer-probing task (only
probe_relayfor relay reachability + thedecdn probeCLI) CacheEnginepull-through fetches from origins only — there is noNodeOrigin/pull-from-peer branchcdn/client/v1handler returnsNotFoundon cache miss (crates/node/src/handlers/client.rs:476); the discover→select→open-channel→pull→populate orchestration is explicitly deferred (crates/node/src/runtime/mod.rs:~839, "needs provider-discovery (ADR 001/022)")
Scope (this issue)
Once the pull-through orchestration exists, wire:
-
Outbound report capture (ADR 008 §Local Score + §Gossip Protocol). Construct
LocalReputation(currently constructed nowhere) and, at the node-as-client pull site, record anOutcome(Delivered{bytes,elapsed}/Corruption/Unreachable) about the upstream provider into bothLocalReputation::record(provider, outcome)and the reputationObservationBuffer::observe(provider, metrics). This is what makes the node actually emitReputationReports (the publisher already runs; the buffer is currently never fed). Also feed reachability from the node-side probe path if/when one exists. -
Selection consumes the combined score (ADR 001 node selection). Populate
selection::Candidate.reputationfromdecdn_reputation::combined_score(local.score(peer), network.score(peer, now), cfg)at the provider-selection site (thefind_providers→rank_candidatescall path), so reputation finally influences which upstream nodes get picked (the1/max(reputation,0.1)²penalty already exists inselection.rs).
Blocked by
The node-to-node cache-miss pull-through orchestration (ADR-022 delivery): a NodeOrigin/pull-from-peer branch + the cache-miss hook that discovers providers, selects one, opens a buyer channel (BuyerChannelService::open_or_reuse_channel, already bootstrapped but idle), pulls via stream_fetch, and populates the cache. Related: #763 (buyer-channel robustness, "gated on the not-yet-wired cache-miss hook"), #746 (pull-through integration test).
Acceptance criteria
- A node that pulls a blob from an upstream provider records a local outcome and queues an outbound
ReputationReport, which peers receive and aggregate. - Provider selection for cache-miss pulls ranks candidates using the combined local+network reputation score.
References
- ADR 008 §Local Score Calculation, §Gossip Protocol
- ADR 001 §Node Selection Algorithm
- Implement network reputation gossip aggregation (ReputationReport) #326 (parent),
crates/node/src/reputation_wiring.rs"Known limitations"
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
github-actions commentedon Jun 6, 2026
🎯 Triage report
This is a well-specified follow-up to #326 that closes the remaining two ADR 008/ADR 001 gaps in the reputation subsystem: (1) making nodes actually emit
ReputationReports by feeding the currently-idleObservationBufferfrom pull-through outcomes, and (2) routing the combined reputation score into provider selection so the1/max(reputation,0.1)2penalty inselection.rshas real data. Both pieces are hard-blocked on the node-to-node cache-miss pull-through orchestration, which does not yet exist in production (thecdn/client/v1handler returnsNotFoundon cache miss today). Labels and blocking relationships are correctly stated; the code pointers are verified.📊 Assessment
technical,blocked,rust,prod-blockingare all accurate; existing labels cover the issue well🔗 Similar issues
💡 Notes and suggestions
What is already in place (nothing needs to be written from scratch):
ObservationBuffer::observe()andLocalReputation::record()exist incrates/reputation/; the gossip publisher runs but its buffer is never fed.selection::rank_candidatesand the1/max(reputation,0.1)2penalty are already inselection.rs;Candidate.reputationjust needs to be populated.BuyerChannelService::open_or_reuse_channelandstream_fetchare bootstrapped but idle.decdn_reputation::combined_score(local, network, cfg)is the public combinator to call at the selection site.Implementation checklist once the pull-through orchestration lands:
LocalReputationinreputation_wiring.rs(currently constructed nowhere) and inject it into the pull-through path.NodeOrigin/pull-from-peer branch), recordOutcome::Delivered { bytes, elapsed }/Corruption/Unreachableinto bothLocalReputation::record(provider, outcome)andObservationBuffer::observe(provider, metrics).find_providers → rank_candidatescall site, populateselection::Candidate.reputationfromdecdn_reputation::combined_score(local.score(peer), network.score(peer, now), cfg).ReputationReportreceivable by peers, and (b) selection order reflects the combined score.Ordering note: #746 (pull-through integration test) and this issue share the same unlock condition. Whoever lands the pull-through orchestration should coordinate so reputation wiring and the integration test land together or in quick succession — otherwise the integration test will exercise a code path where
Candidate.reputationis still zeroed.Add this agentic workflows to your repo
To install this agentic workflow, run
feat(node): node-to-node cache-miss pull-through + outbound reputation (
feat(node): node-to-node cache-miss pull-through + outbound reputation (
feat: network reputation gossip aggregation + settlement indexer (#326)…
Merge origin/main into feat/831-node-pull-through-reputation
feat(node): node-to-node cache-miss pull-through + outbound reputation (
thiras commentedon Jun 10, 2026
Implemented and merged in #834 (squash
c602c52onmain): node-to-node cache-miss pull-through + outbound report capture and selection-consumes-reputation. Closing as fully resolved.docs(node): drop issue-number refs (#858, #831) from PR comments
docs(node): restore issue-number refs (#852, #858, #831) in comments
fix(node): feed RegionAccountant on delivered node→node pulls (#858) (#…
fix(node): address PR review — displaced doc/attr, timeout metering, …
feat(node): complete reactive origin pull-through — decouple local po…