Skip to content

Stop Explore from ranking posts when topic hydration is missing - #157

Open
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:cursor/explore-topic-hydration-fail-open-9d2a
Open

Stop Explore from ranking posts when topic hydration is missing#157
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:cursor/explore-topic-hydration-fail-open-9d2a

Conversation

@Pitchfork-and-Torch

Copy link
Copy Markdown

Problem

Bulk Explore (topic_ids.len() > 6) is an exclusion filter. A missing topic hydration (filtered_topic_ids = None) was treated as keep. FilteredTopicsHydrator also wrote None on a successful empty lookup, so a Strato miss and a real untagged post were the same value.

TopicIdsFilter runs before VF. Withheld Sports/Politics posts whose topic row failed to load still ranked on Explore.

This is not #122 (Phoenix request-side bitmap). Same class, later gate.

Change

  • None = fetch/decode miss → drop on bulk Explore (fail closed).
  • Some([]) = successful lookup, no topics → still allowed as untagged filler.
  • Successful hydrator decodes now write Some([]) so the two cases stay distinct.

Proof

  1. is_bulk_topic_request is topic_ids.len() > 6 (Explore multi-topic page).
  2. Hydrator StratoResult::Err / empty bytes left filtered_topic_ids = None.
  3. Bulk match arm _ => true kept that candidate.
  4. TopicIdsFilter is pre-rank; VF is post-selection — withheld topics occupied Explore slots.
  5. After: None => false, Some([]) => true; tests test_bulk_explore_drops_hydration_miss_not_known_untagged and updated test_bulk_filter_removes_only_excluded_topics.

Survey

Base: xai-org/x-algorithm main. Head: Pitchfork-and-Torch/cursor/explore-topic-hydration-fail-open-9d2a.

Bulk Explore (more than six topic IDs) treated a missing topic hydration
as "keep". A Strato miss then let withheld Sports/Politics posts rank
on the Explore page. None is now fail-closed; Some([]) stays untagged
filler. Successful lookups write Some([]) so the two cases stay distinct.

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