Skip to content

Fix hard-disabled enable: PopularTopicsSource param - #30

Open
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:fix/popular-topics-enable
Open

Fix hard-disabled enable: PopularTopicsSource param#30
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:fix/popular-topics-enable

Conversation

@Pitchfork-and-Torch

Copy link
Copy Markdown

Class

7 / hard-disabled enable

What is true

PopularTopicsSource can fetch topical popular tweets from Strato and tag them ForYouPopularTopics, but enable() is a literal false, so the source never runs.

Proof

  • Entry: PopularTopicsSource::source (Strato get_popular_topic_tweets, served_type ForYouPopularTopics)
  • Sink: PopularTopicsAuthorDedupFilter keeps first popular post per author; Phoenix/For You source stage would consume the vec if the source were enabled and boxed
  • Break: enable() ignored query.params and always returned false
  • Viewer effect: For You never receives this source's news/sports/tech/etc popular-topic candidates
  • Twin: TweetMixerSource / EnableTweetMixerSource (param-gated, skip in-network and cached-posts)

Change

  • home-mixer/params/param.rs: EnablePopularTopicsSource, key rust_home_mixer_enable_popular_topics_source, default false
  • home-mixer/sources/popular_topics_source.rs: enable() reads that param and clones TweetMixer in-network / cached-posts guards
  • tests: enable_returns_false_by_default, enable_returns_false_when_in_network_only

Tests

Added the two enable tests above.
cargo: cannot run in the public dump

Still open

  • Module is still an orphan on main until PR 2 merges (pub mod popular_topics_source).
  • Source is still not boxed into any candidate_pipeline sources vec. Do not wire in this PR.
  • PopularTopicsAuthorDedupFilter is also still unregistered on main until PR 2.
  • BroadcastLiveness enable is a separate class (PR 29).

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.

1 participant