Skip to content

Conversation

@mitp19
Copy link

@mitp19 mitp19 commented Nov 3, 2025

Implements foundation for tiered reputation scoring system where different contribution types receive different reputation weights based on effort and complexity. Implements core RSC to REP conversion logic for funding-based reputation scoring .

Key changes:

  • New system with 10 contribution types and base weights reflecting effort/complexity (low: 1-3, medium: 5-10, high: 15-20, exceptional: 30-50)
  • Added contribution_type field to ScoreChange model with indexes for efficient querying and analytics
  • migration 0104 adds new field with default value ('UPVOTE')

Key Formulas (based on community feedback):

  • Tips: $10 → 10 REP, $100 → 70 REP
  • Bounties: $150 → 49 REP, $500 → 150 REP
  • Proposals: $1K → 100 REP, $100K → 1,090 REP
  • Funders: 1.5x bonus for funding proposals

@mitp19 mitp19 marked this pull request as ready for review November 3, 2025 05:46
@mitp19 mitp19 requested a review from a team as a code owner November 3, 2025 05:46
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

score_change = cls(
algorithm_version=ALGORITHM_VERSION,
algorithm_variables=algorithm_variables,
score_after_change=current_rep,
score_change=score_value_change,

P1 Badge Populate contribution_type in citation score changes

Newly added field contribution_type is never set when creating a ScoreChange inside create_score_change_citations; the instance relies on the model default 'UPVOTE' for every citation update. This means every citation-related score change will be recorded as an upvote, making the new indexes and analytics by contribution type inaccurate and preventing downstream code from distinguishing citation events. Please assign the appropriate ContributionWeight constant when constructing the object (and backfill if needed).


score_change = cls(
algorithm_version=ALGORITHM_VERSION,
algorithm_variables=algorithm_variables,
score_after_change=current_rep,
score_change=score_value_change,

P1 Badge Populate contribution_type in vote score changes

Similarly, create_score_change_votes does not provide a contribution_type when constructing ScoreChange, so every vote-driven change is persisted with the default 'UPVOTE' regardless of whether it was an upvote or downvote. Queries against contribution_type will therefore miscount votes and the new feature flag for tiered scoring cannot distinguish different contribution categories. Set an explicit type based on the vote action to keep the data trustworthy.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.74%. Comparing base (3f11c80) to head (42de70b).
⚠️ Report is 140 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2769      +/-   ##
==========================================
- Coverage   75.79%   75.74%   -0.05%     
==========================================
  Files         522      529       +7     
  Lines       27779    28569     +790     
==========================================
+ Hits        21054    21641     +587     
- Misses       6725     6928     +203     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@yattias yattias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mitp19 code looks really good.
Practically speaking, I think we should save score in a score_v2 column to avoid potentially breaking existing functionality

@mitp19 mitp19 force-pushed the mit/add-contribution-weight-registry branch from 0e7af97 to 528fa38 Compare November 27, 2025 05:50
@sonarqubecloud
Copy link

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