Rehydrate block and author-label bits on cached For You posts - #156
Open
Pitchfork-and-Torch wants to merge 1 commit into
Open
Rehydrate block and author-label bits on cached For You posts#156Pitchfork-and-Torch wants to merge 1 commit into
Pitchfork-and-Torch wants to merge 1 commit into
Conversation
BlockedBy, Gizmoduck, and Quote hydrators skipped on Redis slate cache hits, so author_blocks_viewer, quoted_author_blocks_viewer, and NSFW author labels stayed up to 180s stale. Always enable them. On a cache hit Quote only refreshes blocked-by from ids already on the candidate so a TES miss cannot wipe quoted_user_id. 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.
Bug
BlockedByHydrator,GizmoduckCandidateHydrator, andQuoteHydratorall useenable = !has_cached_posts.MutedUserIdsQueryHydrator/BlockedUserIdsQueryHydratorstill run on a cache hit. The lists are current.AuthorSocialgraphFiltercan drop a newly muted or viewer-blocked author from those lists. It cannot recomputeauthor_blocks_viewer,quoted_author_blocks_viewer, ornsfw_author— those bits were written up to 180s earlier.VFCandidateHydratoris post-selection.OONNsfwSimclustersFilterreadsnsfw_authorbefore scoring. A newly labeled SimClusters author keepsSome(false)and stays in the slate.CachedPostsQueryHydratorsetshas_cached_postswhen Redis returns at least 500 posts. TTL is 180s.This is not #135 (in_network bit). Not #125 (gizmoduck origin / miss). Not #137 (socialgraph RPC fail-open).
Five-line proof
BlockedByHydrator/GizmoduckCandidateHydrator/QuoteHydrator(enable = !has_cached_posts)AuthorSocialgraphFilter(author_blocks_viewer/quoted_author_blocks_viewer);OONNsfwSimclustersFilter(nsfw_author == Some(true))in_networkfrom the live follow list on the same cache hitFix
Always enable.
updateoverwrites the cached bits.On a cache hit,
QuoteHydratordoes not re-call TES. It keepsquoted_tweet_id/quoted_user_idalready on the candidate and only refreshesquoted_author_blocks_viewer. A TES miss therefore cannot wipe the quoted author id.Tests
enableis true on cache hit and miss (all three hydrators)Some(true)→false, newly blocking →truetrue; previously blocking →falseStandalone decision-table harness (same enable + filter predicates): 14 assertions passed.
cargo testcannot run here. Public dump has no Home Mixer manifest.Fork PR: none