Skip to content

Stop InNetwork from skipping cache hits and leaving a stale VF stamp - #136

Closed
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:cursor/in-network-cache-hit-stamp-6710
Closed

Stop InNetwork from skipping cache hits and leaving a stale VF stamp#136
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:cursor/in-network-cache-hit-stamp-6710

Conversation

@Pitchfork-and-Torch

@Pitchfork-and-Torch Pitchfork-and-Torch commented Sep 7, 2026

Copy link
Copy Markdown

Bug

#128#132 leftover. InNetworkCandidateHydrator.enable was !has_cached_posts. #131 called that out and left it.

FollowedUserIdsQueryHydrator still runs on a cache hit. InNetwork is a local HashSet lookup. Redis keeps the old in_network for 180s. VFCandidateHydrator still runs and buckets TimelineHome vs TimelineHomeRecommendations from that stamp.

  • Unfollow a DoNotAmplify / NSFW HP author: cache still says Home. Recs Drop does not fire.
  • Follow someone: cache still says OON. Recs Drop fires on a followee.
  • Cache miss that stamped OON on author_id = 0 (Stop For You from stamping OON before TES fills author_id #128), then TES filled the author: the Redis row keeps in_network = false. Cache hit never restamps.

CoreData stays skipped. TES is an RPC. Tweet author_id does not change. #132 already covers NightOwl already_hydrated. Gizmoduck stays skipped. VF still applies NSFW on the restamped safety level.

Not #128 (order). Not #131 (TES overwrite). Not #132 (already_hydrated).

Fix

One file, home-mixer/candidate_hydrators/in_network_candidate_hydrator.rs.

enable is always true.

Tests

  • enable is true on has_cached_posts
  • Cached Home stamp after unfollow becomes OON
  • Cached Recs stamp after follow becomes Home
  • Followed / unfollowed miss path unchanged

cargo test cannot run. Public dump has no Home Mixer manifest. Same control flow compiled and run as a rustc model: 6/6 passed (old gate keeps the stale stamp; new gate restamps).

FollowedUserIds is request-fresh. InNetwork is a local HashSet lookup.
Skipping it on has_cached_posts kept Redis in_network for 180s, so VF
fetched TimelineHome or Recs from a follow graph that was already stale.

Co-authored-by: Jon Bailey <Pitchfork-and-Torch@users.noreply.github.com>
@Pitchfork-and-Torch

Copy link
Copy Markdown
Author

Duplicate of #135 (same enable=true on cache hits). Prefer #135 as the ship vehicle.

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