🐛 fix: homogenize basic-energy images on TCGdex sm1#648
Merged
Conversation
CardEnricher::BASIC_ENERGY_IMAGES now points all 9 basic-energy fallbacks at TCGdex sm1/164-172 (the only TCGdex-deployed set with all 9 colors including Fairy). Single CDN, single artwork era — replaces the previous mix of pokemon.com (MEE) and pokemontcg.io (sm1 Fairy) URLs. A two-pass data migration heals already-enriched decks: a narrow URL match for synthetic energy- fallback rows, plus a JOIN-based update for real TCGdex printings tagged with PTCG Live energy-only set codes (MEE/SVE/SME/XYE/BWE) — those carried legacy SVE pokemon.com art or the 404-prone assets.tcgdex.net/en/me/mee/* URLs and now map to sm1 by color. DEFAULT_BASIC_ENERGY_PRINTINGS (minified export / printed labels) is intentionally left unchanged — the MEE 1-8 setCode identifier is user-visible on physical labels and a separate decision.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Summary
CardEnricher::BASIC_ENERGY_IMAGESnow points all 9 basic-energy fallback URLs at TCGdexsm1/164–172(the only TCGdex-deployed set with every basic-energy color including Fairy). Single CDN, single artwork era, replaces the previous mix ofassets.pokemon.com(MEE) +images.pokemontcg.io(sm1 Fairy hires).Version20260528230443heals already-enriched decks with two passes:energy-…printings).card_printingoncard_identityand remaps every printing whoseset_codeis one of the PTCG-Live energy-only codes (MEE/SVE/SME/XYE/BWE) and whose identity name is a basic-energy name. This catches rows that carried legacy SVE pokemon.com art or the 404-proneassets.tcgdex.net/en/me/mee/*URLs.data/basic_energies.json— added TCGdex URLs to the 9 canonical sm1 entries (additive;defaultForMinifiedflags untouched).docs/technicalities/basic_energy_images.md— clarifies the deliberate split between the image-fallback map (now sm1) and the minified-export defaults (still MEE — thesetCodeidentifier is rendered on physical labels and is a separate decision).testEnrichBasicEnergyCreatesSyntheticPrintingFromStaticMapupdated to assert the new sm1 URL.Visual tradeoff
Basic-energy art reverts from the 2025 MEE/SVE "Basic" banner artwork to the 2017 Sun & Moon base set artwork — the price of homogeneity today, since TCGdex still returns 404 for
assets.tcgdex.net/en/sv/sve/*andassets.tcgdex.net/en/me/mee/*(re-verified 2026-05-28). Once TCGdex deploys MEE artwork, the 8 non-Fairy fallbacks can be moved back to modern art in a follow-up.Out of scope
ENERGY_SET_IMAGES(the exactSVE|N/MEE|Nmap) is untouched — TCGdex still doesn't host that artwork.DEFAULT_BASIC_ENERGY_PRINTINGS(minified export, mosaic, Cardmarket, printed labels) is untouched — itssetCodeidentifier is user-visible on physical labels.Test plan
make cs-fixcleanmake phpstan0 errorsmake lint-yaml/lint-container/lint-i18nOKmake test.unit(1358 tests) greenmake test.functional(1121 tests) greenmake audit0 vulnerabilitiesassets.tcgdex.net/en/sm/sm1/…