Skip to content

Stop engagement-count store errors from zeroing For You rank features - #181

Open
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:cursor/magellan-ranking-eng-counts-ff33
Open

Stop engagement-count store errors from zeroing For You rank features#181
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:cursor/magellan-ranking-eng-counts-ff33

Conversation

@Pitchfork-and-Torch

Copy link
Copy Markdown

Dragonfly Err in EngagementCountsHydrator was coerced to an empty HashMap. Every candidate then got Ok(CachedCounts::default()). CachedHydrator caches Ok for 60s. as_tweet_info unwrap_or(0) stamps Phoenix InputBuffer and Thompson sampling as if the post had no favs, replies, or views.

Proof

  • Entry: EngagementCountsHydrator::hydrate_from_client (get_engagement_counts)
  • Sink: PostCandidate::as_tweet_info -> Phoenix stamp_engagement_counts; AuthorColdStart Thompson (view_count_on_home, fav_count)
  • Break: unwrap_or_else empty map -> Ok(default) -> Moka insert
  • Viewer: a viral post ranks like a zero-engagement post for up to 60s after a store blip; the whole slate can collapse together
  • Twin: LanguageCodeHydrator and MediaInfoHydrator return Err on store error, so update_all skips and the cache does not store empties

This is not #171/#177 (notes). Not #172 (author diversity retweeter key). Not #173 (safemodel). Not #174 (UserCred). Not #175/#176 (cache mutual-follow / Phoenix rescore). Not #142 (empty Phoenix heads). Not #22 (cold-start thresholds). Not #21 (DPP missing embeddings).

Fix: on client Err, return Err for candidates that need a fetch. CachedHydrator does not insert. update_all leaves existing counts. Successful per-id misses stay Ok(default), same as a tweet with no row.

Tests cover store Err (no zero stamp), no cache poison, cached-post ineligible preserve, and successful miss unchanged.

cargo test cannot run here. Public dump has no Home Mixer manifest. Standalone rustc model of the stamp path passed 4/4.

Dragonfly Err was coerced to an empty map, then Ok(default) counts.
CachedHydrator cached those zeros for 60s and Phoenix unwrap_or(0)
ranked the slate as if nobody engaged.

Co-authored-by: Jon Bailey <Pitchfork-and-Torch@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants