Skip to content

chore(ranking_scorer): add negative weight assertions and clarify quote-tweet boost eligibility - #198

Open
SB2318 wants to merge 1 commit into
xai-org:mainfrom
SB2318:tidying-up-code
Open

chore(ranking_scorer): add negative weight assertions and clarify quote-tweet boost eligibility#198
SB2318 wants to merge 1 commit into
xai-org:mainfrom
SB2318:tidying-up-code

Conversation

@SB2318

@SB2318 SB2318 commented Sep 11, 2026

Copy link
Copy Markdown

Description

Fixes #196

Thank you for open-sourcing the repository! While reviewing ranking_scorer.rs and param.rs, I have analyzed five feedback items regarding parameter configurations and scoring logic:

  1. param.rs Truncation Check: Verified that param.rs is fully closed and intact through line 1173 (PhoenixScoresResultSize).
  2. pdwell Key Mapping: Confirmed that mapping "pdwell" to post_unexplored in applied_weights_map is intentional and consistent with side-effect scoring maps across the pipeline.
  3. Negative-Action Weights Sign Guard: Added a debug_assert! check in recompute_sums() to guarantee negative action weights (NotInterestedWeight, BlockAuthorWeight, etc.) remain non-positive magnitudes to prevent sign inversion misconfigurations.
  4. ShadowTrafficPhoenixClusterRates Typing: Confirmed Vec<String> is required to encode "ClusterName:Rate" key-value pairs for per-cluster rate overrides.
  5. Bidirectional Boost & Quote-Tweets: Added inline documentation to bidirectional_boost_eligible() clarifying that quote-tweets are intentionally eligible because they contain new original commentary authored by the mutual-follow user.

Changes Made

  • home-mixer/scorers/ranking_scorer.rs:
    • Added non-positive assertion guard for negative-action weights in recompute_sums().
    • Added clarifying doc comments to bidirectional_boost_eligible() for quote-tweet handling.

Checklist

  • Code changes compile cleanly.
  • Sign convention safety guard added for scoring weights.
  • Code comments updated for architectural context.

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.

[Code Review] A Few Small Improvements in ranking_scorer.rs & param.rs

1 participant