Stop Explore from ranking posts when topic hydration is missing - #157
Open
Pitchfork-and-Torch wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Bulk Explore (
topic_ids.len() > 6) is an exclusion filter. A missing topic hydration (filtered_topic_ids = None) was treated as keep.FilteredTopicsHydratoralso wroteNoneon 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.Some([])so the two cases stay distinct.Proof
is_bulk_topic_requestistopic_ids.len() > 6(Explore multi-topic page).StratoResult::Err/ empty bytes leftfiltered_topic_ids = None._ => truekept that candidate.None => false,Some([]) => true; teststest_bulk_explore_drops_hydration_miss_not_known_untaggedand updatedtest_bulk_filter_removes_only_excluded_topics.Survey
Base:
xai-org/x-algorithmmain. Head:Pitchfork-and-Torch/cursor/explore-topic-hydration-fail-open-9d2a.