Skip to content

Resolve active season id from the season list - #206

Open
ToxicBiohazard wants to merge 2 commits into
mainfrom
fix/active-season-from-list
Open

ToxicBiohazard wants to merge 2 commits into
mainfrom
fix/active-season-from-list

Conversation

@ToxicBiohazard

Copy link
Copy Markdown
Member

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply.

  • Bugfix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality not to work as expected).
  • Documentation Update (if none of the other choices applies).

Proposed changes

get_season_rank no longer reads SEASON_ID / CURRENT_SEASON_ID from the environment. It loads the season id from /api/v4/season/list and uses the entry with active: true (currently Season 12, id 21).

That id is then passed to /v4/user/achievement/season/{userId}/{modelId}. If the list call fails or no season is active, the rank lookup is skipped.

SEASON_ID is removed from settings and .test.env. Leftover env values are ignored.

Checklist

Put an x in the boxes that apply.

  • I have read and followed the CONTRIBUTING.md
    doc.
  • Lint and unit tests pass locally with my changes.
  • I have added the necessary documentation (if appropriate).

Additional context

The season list is ordered oldest to newest. The active season is selected by active: true, not by taking the last item.

Made with Cursor

Stop relying on SEASON_ID and use the active entry from /v4/season/list for season rank lookups.

Co-authored-by: Cursor <[email protected]>
@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.00000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.39%. Comparing base (af5d3f3) to head (9104dea).

Files with missing lines Patch % Lines
src/helpers/verification.py 85.71% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #206      +/-   ##
==========================================
+ Coverage   68.17%   68.39%   +0.21%     
==========================================
  Files          78       78              
  Lines        3702     3749      +47     
==========================================
+ Hits         2524     2564      +40     
- Misses       1178     1185       +7     

☔ View full report in Codecov by Harness.
📢 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.

Keep the season list result in memory only until the active season's end_date, then fetch the list again.

Co-authored-by: Cursor <[email protected]>
@ToxicBiohazard
ToxicBiohazard requested a review from 0xRy4n October 15, 2026 09:01

This branch has not been deployed

No deployments
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