Skip to content

Recompute in_network on cached For You posts - #135

Open
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:cursor/cache-hit-stale-in-network-eadf
Open

Recompute in_network on cached For You posts#135
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:cursor/cache-hit-stale-in-network-eadf

Conversation

@Pitchfork-and-Torch

Copy link
Copy Markdown

Bug

InNetworkCandidateHydrator.enable is !has_cached_posts.

FollowedUserIdsQueryHydrator still runs on a cache hit. The follow list is current. The hydrator is a set lookup on author_id. Skipping it keeps the in_network bit written up to 180s earlier.

VFCandidateHydrator buckets on in_network.unwrap_or(false). Stale Some(true) after unfollow is fetched at TimelineHome. Recs-only Drop does not run (DO_NOT_AMPLIFY, SPAM_HIGH_RECALL, NSFW_HIGH_RECALL, civic-integrity, and the rest of the Recs table). OONRetweetReplyFilter and OONNsfwSimclustersFilter also need Some(false).

CachedPostsQueryHydrator sets has_cached_posts when Redis returns at least 500 posts. TTL is 180s.

This is the leftover called out on #131. Not #128 (TES-before-InNetwork order). Not #117 (QuoteHydrator graph miss).

Fix

Always enable. Recompute from the live follow list. update overwrites the cached bit.

Tests

  • enable is true on cache hit and miss
  • cache-hit hydrate + update: newly followed → true, unfollowed → false, self → true

Standalone decision-table harness (same enable + VF bucket predicate): 6 assertions passed.

cargo test cannot run here. Public dump has no Home Mixer manifest.

FollowedUserIdsQueryHydrator still runs on cache hits. Skipping
InNetworkCandidateHydrator left the cached in_network bit in place
after follow/unfollow, so VF kept using TimelineHome for a just-
unfollowed author.
@Pitchfork-and-Torch
Pitchfork-and-Torch force-pushed the cursor/cache-hit-stale-in-network-eadf branch from 8424514 to 902a06f Compare September 8, 2026 23:12
@Pitchfork-and-Torch

Copy link
Copy Markdown
Author

Parking this intern-stack PR per operator GitHub cleanup (2026-09-08). Hunt notes remain local. Not a reject of the class.

@Pitchfork-and-Torch

Copy link
Copy Markdown
Author

Reopened. This was a serving-path hunt PR parked by mistake during the 2026-09-08 intern-stack cleanup. Not a reject of the class. Leaving it for xAI review.

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