Scope encounter rankings to the analyzed log's raid phase (partition) - #12
Merged
Merged
Conversation
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]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Follow-up user report from TBC Fresh (same user as #11):
Root cause
ENCOUNTER_RANKINGS_QUERYdeclares$partitionbut 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:
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
rankings(fightIDs: $fightIDs)to bothPLAYER_FULL_DATA_QUERYvariants — the report's own ranking blob includes the fight'spartition, and this rides the existing query (zero extra WCL round trips)ENCOUNTER_RANKINGS_QUERYnull→ 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
npx tsc --noEmit✓ · changed files lint clean · tests 24/24 ✓🤖 Generated with Claude Code