Credit ratings to the author, and less to aggregator feeds

A rating on an article that arrived only via an aggregator (HN, Lobsters,
Reddit, Scour) used to count fully against that aggregator feed. Now the
aggregator feed gets a quarter of the credit and the article's author gets
the full credit, so future articles by the same author from any feed carry
the history. The feed signal is the mean over rated direct feeds and the
rated author.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QVPagF6jfDv78CC5Jv2wp4
This commit is contained in:
2026-09-07 17:34:40 +00:00
co-authored by Claude Fable 5.1
parent 72b32dc69b
commit a52f4123dd
3 changed files with 152 additions and 25 deletions
+8 -2
View File
@@ -58,7 +58,8 @@ pub fn routes() -> Router<AppState> {
pub struct FeedCredit {
pub feed_id: FeedId,
pub feed_title: String,
/// `value × decay / n` over the article's `n` direct feeds.
/// `value × decay / n` over the article's `n` direct feeds, reduced for an
/// aggregator-only article.
pub credit: f64,
}
@@ -97,7 +98,12 @@ pub fn contribution(
let feed_credits = if rating.label == "cleared" || feeds.is_empty() {
Vec::new()
} else {
let credit = weight / feeds.len() as f64;
let feed_weight = if article.is_some_and(crate::discovery::aggregator_only) {
weight * signals::AGGREGATOR_FEED_SHARE
} else {
weight
};
let credit = feed_weight / feeds.len() as f64;
feeds
.iter()
.map(|feed_id| FeedCredit {