Preserve role-specific VF results for primary and ancillary posts - #90
Open
yinkev wants to merge 1 commit into
Open
Preserve role-specific VF results for primary and ancillary posts#90yinkev wants to merge 1 commit into
yinkev wants to merge 1 commit into
Conversation
Keep TimelineHome and TimelineHomeRecommendations results separate until the candidate role is known. Primary posts use their lane, ancestors and quotes use Recommendations, and retweets use TimelineHome. Preserve the one-map helper used by the Following pipeline and add regression coverage for a post that is both an in-network primary and an out-of-network quote target. 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.
Follow-up to #55 by @Pitchfork-and-Torch. This keeps the role-specific lookup proposed there and adapts it to the current
TweetVisibilityAPI and the newer Following hydrator call site.Bug
The exported implementation now inserts
TimelineHomeresults afterTimelineHomeRecommendations, which correctly stops a Recommendations verdict from overwriting an in-network primary. The two result sets are still collapsed into one map keyed only by post ID, however, and that same map is reused for ancestor and quote checks.A post can occupy both roles in one selected batch:
Pis an in-network primary.Qis an out-of-network quote ofP.TimelineHome(P)isInterstitial.TimelineHomeRecommendations(P)isDrop.TimelineHomeRecommendations(Q)isAllow.The current merge keeps the correct primary verdict for
P, butQalso sees thatTimelineHomeverdict when checking its quoted post.Q.drop_ancillary_postsis thereforefalseeven though the quoted-post check was requested atTimelineHomeRecommendations.Fix
Keep the two safety-level result maps separate until the candidate role is known:
TimelineHome;TimelineHomeRecommendations;TimelineHomeRecommendations;TimelineHome.The existing one-map
should_drop_ancillarysignature remains intact forVFFollowingCandidateHydrator, which only fetchesTimelineHome; it delegates with the same map for both arguments.Tests
Pretains its Home interstitial whileQreceives the Recommendations ancillary drop.mainwithSome(false)instead ofSome(true)forQ.drop_ancillary_posts.cargo clippy --all-targets -- -D warnings,rustfmt --check, andgit show --checkpass.The public export does not include a Home Mixer Cargo manifest, so the full internal target still needs to run in X's build environment.