Skip to content

Stop RankingScorer from ranking posts with no Phoenix heads - #142

Closed
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:cursor/phoenix-ranker-fail-closed-372c
Closed

Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:cursor/phoenix-ranker-fail-closed-372c

Conversation

@Pitchfork-and-Torch

Copy link
Copy Markdown

Bug

Phoenix lookup miss, missing scoring_sequence, or overflow past PHOENIX_CLIENT_MAX_CANDIDATES leaves every Phoenix head None. RankingScorer::apply treated that as 0, then offset_score wrote Some(NEGATIVE_SCORES_OFFSET). TopKScoreSelector only drops score == None. Those posts still ranked.

Some(0.0) is a real Phoenix prediction and still ranks.

This is not #3 (ranker xDS). This is not #31 (author-size IPS). This is not a taste weight tweak.

Five-line proof

  • Entry: PhoenixScorer / predictions.candidate_scores leave all heads None on miss
  • Sink: PhoenixCandidatePipeline scorers [PhoenixScorer, RankingScorer, VMRanker] then TopKScoreSelector (score.unwrap_or(NEG_INFINITY))
  • Break: apply(None) = 0 plus offset wrote a finite rank for an unscored post
  • Viewer effect: For You could serve a tweet Phoenix never scored, including overflow and no-sequence requests
  • Twin: scorer update_all already skips Err; prediction failure already returned Err

Change

  • RankingScorer and PhoenixScoresRankingScorer: no heads -> score / weighted_score stay None
  • PhoenixScorer: missing scoring_sequence returns Err so update_all does not stamp empty scores or last_scored_at_ms

Tests

  • Default heads: score unset
  • Some(0.0) favorite: still ranks
  • Mixed slate: only the unscored candidate is unset
  • Missing sequence: Err, not Ok(default)

cargo test cannot run. Public dump has no home-mixer crate manifest.

Fork PR: none

Missing Phoenix scores used to become 0 and then NEGATIVE_SCORES_OFFSET,
so lookup misses and a missing scoring_sequence still made TopK. Leave
score unset so TopK drops them. Some(0.0) still ranks.
@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
Pitchfork-and-Torch deleted the cursor/phoenix-ranker-fail-closed-372c branch September 18, 2026 00:33
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