Skip to content
This repository was archived by the owner on Oct 11, 2026. It is now read-only.

fix(ei-compare): reach full parity on ranger pet spawns (-28) - #209

Merged
Roddygithub merged 1 commit into
mainfrom
fix/ei-ranger-pet-parity-28
Aug 12, 2026
Merged

Roddygithub merged 1 commit into
mainfrom
fix/ei-ranger-pet-parity-28

Conversation

@Roddygithub

Copy link
Copy Markdown
Owner

Objectif

Parité 100 % avec Elite Insights sur le skill rotation -28 ("Ranger Pet Spawned") : 0 missing / 0 extra sur les 35 logs (avant : 2 missing / 11 extra).

Changements (libs/gw2_analytics/src/gw2_analytics/ei_compare.py)

  1. Whitelist _JUVENILE_PET_SPECIES (65 espèces) — miroir exact de RangerHelper.JuvenilePetIDs d'EI, remplace le filtre par nom qui incluait à tort le phénix (25131, absent de la liste EI).
  2. Gate -28 sur activeRangerPets != null — EI ne crédite un -28 que si la relation master/minion est résolue (m.Master != null). Élimine les 11 extra (char-swap / instances partagées).
  3. Tolérance slice 2000 ms avant slice_lo pour les casts -28, aligné sur le comportement de slicing d'EI. Corrige les 2 missing.

Vérification

  • Corpus 35 logs : -28 absent des deltas rotation.
  • pytest libs/gw2_analytics : 326 passed.
  • Ruff + ruff-format : OK (pre-commit).
  • Commit signé DCO (Signed-off-by).

Elite Insights credits the -28 "Ranger Pet Spawned" rotation entry only
for minions whose species is in its static JuvenilePetIDs list (65
species) AND whose master relationship was resolved (activeRangerPets !=
null). Two fixes bring parity to 0 missing / 0 extra across the 35-log
corpus (was 2 missing / 11 extra):

- Replace the name-based juvenile-pet filter (which wrongly included
  the phoenix 25131, absent from EI's list) with the exact
  _JUVENILE_PET_SPECIES whitelist mirrored from RangerHelper.cs.
- Gate -28 casts on player.get("activeRangerPets") being non-null,
  mirroring EI's MinionSpawnCastFinder which requires m.Master != null.
- Keep -28 casts that land within 2000ms before slice_lo, matching EI's
  time-slice tolerance.

Signed-off-by: Roland Salardon <r.salardon@gmail.com>
@Roddygithub
Roddygithub merged commit 553b40c into main Aug 12, 2026
11 checks passed
@Roddygithub
Roddygithub deleted the fix/ei-ranger-pet-parity-28 branch August 12, 2026 00:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant