Skip to content

Rescore cached For You posts when the action sequence is newer - #176

Open
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:cursor/cache-stale-phoenix-scores-cd1e
Open

Rescore cached For You posts when the action sequence is newer#176
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:cursor/cache-stale-phoenix-scores-cd1e

Conversation

@Pitchfork-and-Torch

Copy link
Copy Markdown

Cache hits still hydrate a fresh UAS scoring sequence, then PhoenixScorer disabled itself whenever has_cached_posts was set. RankingScorer kept blending the Redis-frozen Phoenix heads (VQV, dwell, fav) for the full 180s TTL, so For You order ignored videos the viewer just finished or skipped.

Proof

  • Entry: ScoringSequenceQueryHydrator writes query.scoring_sequence on every request, including cache hits.
  • Sink: PhoenixScorer.enable / RankingScorer.compute_weighted_parts (vqv_score, dwell, fav) into For You score.
  • Break: enable() returned false on has_cached_posts, so last_scored_at_ms heads older than metadata.last_modified_epoch_ms / last_sequence_time never refreshed.
  • Viewer: after a VQV or skip, pull-to-refresh still ranks the same cached slate as if those actions never happened.
  • Twin: metadata.length already gates new-user cluster selection in this same scorer; cache skip is the only path that ignores a newer sequence.

Fix: keep the Redis candidate cache, but run Phoenix again when any cached last_scored_at_ms is missing or older than the hydrated sequence. Unchanged cache hits stay skipped. Missing sequence stays skipped so update() cannot wipe cached heads with Default scores.

Cache hits still hydrate a fresh UAS sequence, but PhoenixScorer skipped
inference whenever has_cached_posts was set. Frozen VQV/dwell/fav heads
then ranked For You for up to 180s after the viewer finished or skipped
videos. Rescore when last_modified_epoch_ms or last_sequence_time is
newer than a cached last_scored_at_ms.

Co-authored-by: Jon Bailey <Pitchfork-and-Torch@users.noreply.github.com>
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