Skip to content

Scope encounter rankings to the analyzed log's raid phase (partition) - #12

Merged
alexandermayes merged 1 commit into
mainfrom
growth/rankings-partition
Sep 4, 2026
Merged

alexandermayes merged 1 commit into
mainfrom
growth/rankings-partition

Conversation

@alexandermayes

Copy link
Copy Markdown
Owner

Context

Follow-up user report from TBC Fresh (same user as #11):

"the dps compared to yours seems to be omega high like sunwell p5 dps, or maybe I'm just super bad 😂 Dunno if you can fetch the current top parses"

Root cause

ENCOUNTER_RANKINGS_QUERY declares $partition but no caller ever passed it, so WCL used the zone's default partition for every comparison.

Verified against the live WCL API: TBC Fresh raids have their own zone/encounter IDs (so old 2021-era parses were not the issue), but fresh zones are split into phase partitions — and they lag reality. For the SSC/TK fresh zone right now:

Partition Status Top Fury DPS (Hydross)
P1 empty
P2 default 3,896
P3 live, current 3,140

So a guild logging SSC/TK today produces a partition-3 log that got compared against partition-2's peak farm-meta parses (full SSC BiS + drums padding — the highest numbers that raid will ever see). Hence "omega high". The same mismatch hits any earlier-phase log analyzed after a phase transition.

Fix

  • Add rankings(fightIDs: $fightIDs) to both PLAYER_FULL_DATA_QUERY variants — the report's own ranking blob includes the fight's partition, and this rides the existing query (zero extra WCL round trips)
  • Extract the analyzed fight's partition and pass it to ENCOUNTER_RANKINGS_QUERY
  • Fallback: if the fight has no ranking data (wipes, unranked), pass null → WCL default (current behavior)

Comparisons are now always phase-matched to the log being analyzed — which for a current log is exactly the "current top parses" the user asked for.

Verification

  • Ran the repo's exact modified query strings against the live WCL API (client-credentials token from prod env, env file deleted after): partition extraction returns the right value for the demo report and the scoped rankings call succeeds
  • npx tsc --noEmit ✓ · changed files lint clean · tests 24/24 ✓

🤖 Generated with Claude Code

A TBC Fresh user reported comparison DPS looking "omega high, like
Sunwell p5 dps". Root cause: ENCOUNTER_RANKINGS_QUERY declares a
$partition variable but nothing ever passed it, so WCL fell back to
the zone's DEFAULT partition. Fresh zones already have multiple phase
partitions (e.g. SSC/TK: P3 exists while P2 is still the default), so
a log recorded in the current phase was compared against the previous
phase's peak farm-meta parses — the highest numbers that will ever
exist for that raid.

Fix: piggyback `rankings(fightIDs:)` on the existing player-data
queries (zero extra WCL round trips), extract the fight's partition
from the report's own ranking data, and pass it to the rankings query.
Falls back to WCL's default when the fight has no ranking data (e.g.
wipes). Verified against the live WCL API with the repo's exact query
strings: partition extraction and scoped rankings both work.

Co-Authored-By: Claude Fable 5 <[email protected]>
@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
parseforge Ready Ready Preview Sep 4, 2026 6:18pm UTC

@alexandermayes
alexandermayes merged commit 3635f69 into main Sep 4, 2026
5 checks passed
@alexandermayes
alexandermayes deleted the growth/rankings-partition branch September 4, 2026 18:20
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