Skip to content

Fix Champion Mastery and Summoner equality for PUUID-only data#470

Open
mospira wants to merge 1 commit into
meraki-analytics:masterfrom
mospira:fix/puuid-first-summoner-identity
Open

Fix Champion Mastery and Summoner equality for PUUID-only data#470
mospira wants to merge 1 commit into
meraki-analytics:masterfrom
mospira:fix/puuid-first-summoner-identity

Conversation

@mospira

@mospira mospira commented Jun 29, 2026

Copy link
Copy Markdown

Summary

Summoner identity handling PUUID-first and fixes the current Riot API response shape where Summoner-V4 no longer reliably returns legacy id / accountId fields. I believe this Cass should largely treat PUUID as canonical identity, in accordance with Riot's changes.

Addresses:

Changes

  • Summoner.id and Summoner.account_id now return None after a successful load when Riot omits those legacy fields, instead of triggering ghost loading errors.
  • Summoner.__eq__ now compares identity by puuid first, then legacy id, then legacy accountId.
  • Champion Mastery query construction now uses PUUID-backed queries when available and avoids forcing summoner.id.
  • Champion Mastery RiotAPI, ghost-store, transformer, and cache key paths now accept PUUID-only data.
  • ChampionMastery.summoner now preserves puuid from mastery data and only falls back to legacy summonerId when present.

Notes on Test Strategy

The new regression tests are intentionally offline because the existing tests/examples still need more retooling around Riot’s PUUID/Riot ID migration. Many current live tests still call stale paths like get_summoner(name=...) or Summoner(name=...), which fail before reaching this bug fix.

These offline tests directly model the modern Riot response shape: PUUID is present, while legacy id / accountId may be absent. That makes the regression deterministic and keeps this PR focused on the PUUID identity bug rather than the larger test-suite/API migration.

Scope

This is a minimal compatibility fix. It does not attempt to modernize every deprecated summoner-name or summoner-ID path in the project.

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