You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stale type name in selection.rs test comment: ReputationEngine::score() does not exist #1464
crates/node/src/selection.rs (in score_negative_reputation_clamps_to_floor) reads:
// Defensive: ReputationEngine::score() returns f32 in [0,1], but if a// bug produces a negative we must still not panic and must clamp.
ReputationEngine exists nowhere in the workspace — that comment is its only occurrence (grep -rn ReputationEngine crates/ adr/). The real producer is LocalReputation::score (crates/reputation/src/local.rs:255), and it returns f64, not f32; the narrowing happens later at peer_reputation (crates/node/src/node_origin.rs:2293).
Noticed while reviewing #1461, which adds a sibling comment ~30 lines below that names the real type and return type — so the file now contradicts itself. Left out of that PR to keep its diff to the ceiling clamp.
Fix: // Defensive: LocalReputation::score() is in [0,1] by construction, but if a.
Activity
refactor(selection): name the reputation ceiling, fix stale docs, add…