Skip to content

Make X like velocity a lift-only trending signal - #871

Merged
NielsRogge merged 1 commit into
mainfrom
claude/x-lift-only-trending
Nov 3, 2026
Merged

NielsRogge merged 1 commit into
mainfrom
claude/x-lift-only-trending

Conversation

@NielsRogge

@NielsRogge NielsRogge commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #867. The trending score now treats X like velocity as a lift, not a linear blend:

score = 100 × max(0.5·G + 0.5·H, w_x · X)

Why

A read-only preview on 2026-11-03 used the 12:50 production components at the agreed X weight of ⅓. Only 29 of about 2,200 scored papers carry X data. The linear blend capped every other paper at 66.7, so X-tracked papers took ranks 1–5, CaPtain at 3 likes/h among them (it jumped from rank 119 to rank 4). Under lift-only, papers without X keep their score, and only truly viral posts break in. Sparks of Weight-Space Programming at 3,000 likes/h goes from rank 265 to first.

Changes

  • composite_score computes max(GitHub/HF blend, x_weight × X). GitHub and HF keep 0.5 each.
  • PWC_TRENDING_X_WEIGHT now scales the lift and accepts [0, 1], where 1 is the full lift. It stays 0 (off) in production until the Nov 5 comparison. The env key and its plumbing are unchanged.
  • Updated the docstrings, the CRON README and the pwc-cron-health probe.

Validation

  • pytest backend/tests/test_trending_formula.py backend/tests/paper/test_trending_scores.py backend/tests/deployment/test_cron_environment.py backend/tests/deployment/test_host_env_credentials.py: 84 passed, 1 failed. The failure is the link_google_scholar_profiles 3h timeout contract, which already fails on main.
  • ruff check / ruff format --check are clean.

With the weight at 0, this changes no live score.

🤖 Generated with Claude Code


Note

Medium Risk
Changes how paper trending ranks behave once X weight is above zero, affecting the public trending feed; at default weight 0, scores are unchanged.

Overview
Paper trending no longer linearly blends X like velocity with GitHub and Hugging Face. The composite score is now 100 × max(0.5·G + 0.5·H, w_x · X), so papers without linked X posts keep their GitHub/HF ranking, and only a strong X rank can raise the score (including to the top when w_x = 1).

PWC_TRENDING_X_WEIGHT scales that lift and is validated on [0, 1] ( 1 is allowed; previously rejected). Default 0 means no live behavior change until production turns X on.

Docs for the cron README and refresh_x_post_likes probe describe lift-only semantics; unit and cron tests assert that X never lowers a score and that weight 1 is accepted.

Reviewed by Cursor Bugbot for commit c534897. Bugbot is set up for automated code reviews on this repo. Configure here.

Few papers have a linked X post (29 of ~2,200 scored papers on
2026-11-03), so the linear blend capped every paper without one at 2/3 of
the scale and let X-tracked papers with 3 likes/hour outrank today's top
papers. The score is now max(GitHub/HF score, weight x X rank): papers
without X keep their score and a viral post can lift a paper to the top.
PWC_TRENDING_X_WEIGHT now scales the lift in [0, 1] and stays 0 (off).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NielsRogge
NielsRogge merged commit 64e78dd into main Nov 3, 2026
4 checks passed
@NielsRogge
NielsRogge deleted the claude/x-lift-only-trending branch November 3, 2026 13:24
@NielsRogge

Copy link
Copy Markdown
Collaborator Author

Status 2026-11-03: live in production (64e78dd). PWC_TRENDING_X_WEIGHT is still unset (0), so no ranking has changed.

Still open:

  1. About Nov 5: send the user a read-only top 30 comparison, the current ranking against weight 1 (score = 100·max(0.5G+0.5H, X)).
  2. On the user's approval only: set PWC_TRENDING_X_WEIGHT=1 in /etc/paperswithcode/trending-cron.env, then check the next calculate_paper_trending_scores run.
  3. Then a frontend PR: remove the "trending (X)" tab, redirect /x-trending to /, and remove GET /papers/x-trending. Keep the admin PUT and the paper_x_trending table.

NielsRogge added a commit that referenced this pull request Nov 5, 2026
X like velocity now lifts papers in the main trending score (#867, #871,
PWC_TRENDING_X_WEIGHT=1 since 2026-11-05), so the separate tab is gone:
/x-trending redirects to /, and GET /papers/x-trending,
XTrendingService.feed() and papersApi.xTrending are removed. The admin
PUT /papers/x-trending/{day} and the paper_x_trending table stay for the
sheet routine and curation priority.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@NielsRogge

Copy link
Copy Markdown
Collaborator Author

Done 2026-11-05: the user approved weight 1, and PWC_TRENDING_X_WEIGHT=1 is set in production. The 08:45 UTC score run put paper 131739 first on the homepage. The trending (X) tab was removed in #885 (live in production as d7e7c1c). Nothing remains open.

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