Testing the custom library structure against a live library turned up four
defects, all of them a path being reduced to a bare file name.
Both exporters wrote a rom's `fs_name` alone, so every game a template nests
was exported as if it sat in the platform folder: ES-DE and Pegasus could not
find any of them. They now write the rom's path relative to the platform
folder, the folder the metadata files themselves live in, and copy exported
media into the matching subfolder so two identically named roms keep their own
artwork.
Merging into an existing gamelist.xml / metadata.pegasus.txt keyed entries by
file name too, so identically named roms in different folders both merged into
the first entry and produced duplicates. Entries are now keyed by path, with a
Pegasus block matched by the folder its listed files sit in.
Reading a gamelist.xml had the same collision: two roms sharing a file name
both took the metadata of whichever entry was parsed last. A rom's own path now
wins, and a bare file name stays a fallback key for the tools that write those,
dropped when two entries share it.
Default discovery surfaced hidden folders as multi-file games, unlike
structured discovery which skips them. exclude_multi_roms now owns that rule
for both.
Also validate `exclude`'s exclusion_type: an unknown value reached
`Config.__getattribute__` and returned a 500 rather than a 422.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The resolver took the provider names as a second tuple that had to stay in the
same order as the gather, which a reordered lookup would silently break. Pairing
the name with its coroutine follows the shape scan_handler already uses for
provider_fetches, and folds the gather into the resolver.
Also trims the comments and docstrings the review pass flagged as over-long.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A tripped breaker answers in ScreenScraper's place, so the empty match it
produces is not a miss and must not clear the rom's stored ss_id. The scan
learned that by sampling the module-wide is_breaker_tripped() at three points,
which reads another rom's trip as this rom's evidence.
SSHandler now raises ScreenScraperExhaustedError instead of swallowing the
breaker's error, carrying the match it would have returned so the name the
filename lookup derives locally (Switch title database, MAME, PS2 OPL) still
reaches the scan. fetch_ss_rom catches it the way it already catches
ScreenScraperRateLimitError, and drops ScreenScraper from attempted_sources
from a plain local, so the signal is exactly this rom's own lookups.
Also folds in a cleanup pass over the branch: the dead default_factory arm in
_ScanState.reset(), one home for the ssuserInfos.php path, asyncio.wait_for
around the quota probe so it cannot block behind a media download holding the
concurrency slot, and shared fixtures for the ScreenScraper tests.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The sigil import-time debug line never printed at the default INFO level,
and the binding's absence already reaches the UI through
SigilService.is_enabled() on /heartbeat.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The engine carried its tuning history in its comments: measurement logs for
PIVOT_B, the weight a facet held before the company split, the shape of the
cold-start feed before the Bayesian average. None of that describes what the
code does now, and it belongs in the history rather than beside the values.
Also folds serving's ROM loader into feed's, which differed only by the
visibility filter applied afterwards.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Backend, wasted work:
- `_score_one` computed `content_similarity` twice per candidate on the
trim path and built `shared_reasons` for every candidate clearing the
score floor, discarding almost all of them. Compute content once and
build reasons only for the edges actually stored.
- `get_feature_rows` outer-joined `RomMetadata`, a view over the wide
`roms` table, defeating the point of reading the narrow facet mirror.
Read the generated columns off the `Rom` join already present.
- Feed cache invalidation ran a keyspace SCAN on every `rom_user` write.
Put graph and per-user version counters in the key so it is one INCR,
matching `invalidate_filter_values_cache`.
Backend, reuse:
- Route the five name comprehensions beside `_expanded_names` through it.
- `_recency_factor` reimplemented `to_utc`.
- `replace_similarity_edges` hand-rolled `itertools.batched`.
- Derive `TASTE_FACETS` from `FACET_WEIGHTS` instead of restating its keys.
Backend, dead code:
- `ScoredNeighbour`, `BuildStats.to_dict`, `delete_all_similarity_edges`,
the unread `difficulty`/`completion`/`backlogged` affinity fields,
`FACET_ORDER` and `RomInfo.rom_id`, and a no-op `column_type` ternary.
Frontend:
- Extract `RecommendationReason` from the two byte-identical copies in
`Home.vue` and `SimilarGamesGrid.vue`, dropping the repeated
`primaryReason` calls and their non-null assertions.
- Cap the caption with `--r-card-art-w` rather than a `158px` literal that
does not track the per-breakpoint card width.
- Key the similar-games fetch on the ROM id: `watchEffect` refetched on
every optimistic mutation of `currentRom`.
- One home for the similar-games limit.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both exporters rebuilt their file from the database on every run, so a
scan with `scan.gamelist.export: true` threw away everything the frontend
or the user had written into it: favorites, play counts, per-game
emulator and core overrides, hashes, `<folder>` entries, ES-DE's
`<alternativeEmulator>` block, and Pegasus launch commands.
The exporters now read the existing file first and merge into it. For a
ROM RomM knows, the tags and keys RomM emits replace the old ones and
everything else is carried over. Entries with no matching ROM, folders,
scraper provider blocks and later Pegasus collections are written back
untouched. A file that cannot be parsed or decoded is left alone and the
export for that platform fails instead of replacing it.
Fixes#4158
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XjH6MYLVFVoY92JdBFgKXw
Resolve conflicts in the v2 Home view and its test: keep both the
recommendations row from this branch and the live multiplayer sessions
row from master.
Master added migrations 0119 through 0121 that forked the Alembic chain
against this branch's 0119 through 0122. Renumber this branch's
migrations to 0122 through 0125 so they chain after 0121_state_disc_file.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D9EiQ8VWDJfzhEViDdj84d
HTTP 431 means a ROM did not match and the daily cap on proposing unknown
ROMs for review is reached; scraping is unaffected, so it becomes a
not-found with one informational line per scan instead of a refusal that
takes the provider out.
HTTP 431 is really two answers at once and only one of them concerns the
scan. The scrape allowance (430) still trips a breaker, since every
remaining ROM would otherwise cost a round trip to be told the same thing,
but it now arms only after repeated refusals, ignores the ones already in
flight when a refusal was counted, and re-checks the free account endpoint
so it recovers without a scan to reset it. The account check can no longer
arm it at all.
A recoverable breaker can clear itself while a rom is still gathering its
other providers, so a complete rescan read it as having answered and wiped
the rom's id. It is now sampled where ScreenScraper is consulted.
The manual-match search gathers every provider without return_exceptions,
so it now swallows an exhausted ScreenScraper the way the scan lookups do.
Fixes#4123
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The same 503 was built inline at seven sites across the metadata handlers, and
the previous commits added two more copies of it as per-handler `_unavailable`
helpers. `base_handler.unavailable(provider)` now builds it for all of them.
Also renames the search endpoint's cover filter to say what it does and types
the scan test's lookup factory.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Every gathered provider already resolved through a single loop that logs the
failure, drops the source from the attempted set and falls back to an empty
match. SteamGridDB, which searches on the names the other providers produce and
so cannot join that gather, hand-wrote the same three steps again, and the
search endpoint hand-wrote a third copy. Extract the loop body into
`resolve_fetch` and route SteamGridDB through it.
In the search endpoint the cover gathers now tolerate exceptions instead, so a
failed lookup costs a thumbnail rather than the whole result set. That also
covers Libretro, whose lookup had no guard at all and could fail the request.
On the test side, the platform, rom and `fs_rom` scaffolding was written out
three times across the two scan tests; it now lives in `tests/handler/scan_stubs.py`.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`_request` swallowed a non-404 HTTP error and a timeout into an empty dict,
which `lookup_rom` then reported as conclusive: Hasheous answered and knows
nothing about these hashes. A 500 or a timeout therefore de-verified a rom on
a rehash and cleared its id on a complete rescan.
Both paths now raise, so the conclusive flag already carried by `lookup_rom`
tells the two empty matches apart on its own.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Batocera, RetroBat and ES-DE all ship an `easyrpg` folder for RPG Maker
2000/2003 games, but RomM had no platform for them, so the folder fell
through as an unmatched platform that matched no metadata.
Add UniversalPlatformSlug.RPG_MAKER and wire it to the two providers that
carry the platform: ScreenScraper (system 231, "EasyRPG") for metadata and
libretro (system "RPG Maker") for thumbnails. IGDB, MobyGames and TheGamesDB
have no RPG Maker platform, so they stay unmapped, the same way DOOM is
wired.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A complete rescan clears the id of every source it consulted that came back
empty. That reads an outage as a conclusive miss for the providers that report
a failure as an empty match, so a rescan run while one was down wiped the id it
would otherwise have confirmed, hand-set ones included.
Each of those now reports the failure and leaves the tolerance to the caller,
which is what the gather loop's discard already assumed:
- Pouët, CSDb and Demozoo stop swallowing the 503 their own `_request` raises,
and Pouët's title search raises it rather than answering "no unique title".
- SteamGridDB and Flashpoint stop catching `Exception` around a whole lookup;
HLTB stops catching it around its search.
- ScreenScraper answers empty for every remaining ROM once its daily-quota or
credentials breaker trips, so the scan reads that state off the service and
drops it from the sources the rescan may clear.
SteamGridDB resolves outside the gather and so needs the discard at its call
site. Search keeps degrading to no thumbnail, since its cover art sits on top
of matches the other providers already produced.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Fold the exporter's folder map and the importer's ESDE_MEDIA_MAP into a
single GAMELIST_MEDIA_DIRS, so writing, reading and skipping a media type
is one edit. This also picks up thumbnails/, which the scan exclusions were
missing, and drops the hand-appended "images" literal.
Serve the multi-file defaults pre-unioned as DEFAULT_EXCLUDED_MULTI_DIRS so
neither UI has to re-join two lists; v1 was still mapping EXCLUDED_MULTI_FILES
to DEFAULT_EXCLUDED_DIRS and rendering the media dirs as deletable.
Collapse the per-tag asset loop and the bespoke <mix> block into one table
keyed by tag, and skip fnmatch for the exclusion patterns that hold no glob
characters, now that the multi-file list is more than twice as long.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The hash index was built with RA's f=0, so it mapped hashes of games that
exist on RetroAchievements but have no achievements. Those ROMs came out of
a scan with an ra_id set, which lit up every RA signal (achievements tab,
match chip, has_ra filter, smart collections) while answering the only
question those signals are asked: no, there is nothing to earn here.
Measured live against N64 (system 2), 45% of indexed hashes pointed at
set-less games; NES and PlayStation are above 60%.
Switch to f=1 and bump the cache filename, since the freshness check is an
mtime test and installs would otherwise keep the stale index for up to
REFRESH_RETROACHIEVEMENTS_CACHE_DAYS.
Fixes#4343
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both CI failures came from one import cycle. RQ could no longer resolve
`endpoints.sockets.scan.scan_platforms`, and the e2e seed script failed the
same way, because `sigil` imports the platform slug enum, importing anything
under `handler.metadata` runs its `__init__`, that reaches `gamelist_handler`
which imports `handler.filesystem`, and `roms_handler` there imports `sigil`
back while it is still half-initialised.
The cycle predates this branch. It stayed hidden because `scan.py` reached
the enum through `utils.switch`, imported late enough that
`handler.filesystem` was already loaded; naming the adapter directly moved
that import to the top of the module and the ordering luck ran out.
So the enum moves to `utils/platform_slugs.py`, which imports nothing but
`enum`. Naming a platform no longer drags in httpx, redis and the titledb
task, and the 29 call sites point at the module that owns it rather than
picking it up from a 1000-line metadata handler that happens to re-export
it. `import adapters.services.sigil` now also works on its own, which it
did not before.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The Tinfoil feed was left behind when `_switch_productid_format` changed
from taking a `re.Match` to taking a `str`, so `/feeds/tinfoil` raised a
TypeError for any Switch rom carrying a product id in its filename but no
titledb id. It went unnoticed because `feeds.py` sits outside the changed
files mypy sees.
That call site was reachable only because "prefer the id the scan read over
the one scraped from the filename" lived in a second helper above the lookup,
leaving each caller to remember it. The resolution now happens inside
`_switch_productid_format`, so the three providers and the feed all get it
without repeating a preamble.
Also:
- Move `SWITCH_PLATFORM_SLUGS` to the sigil adapter so `utils/switch.py`
stops importing the metadata base handler. The cycle that import created
was papered over with a function-local import, and `normalize_identity`
now takes the fact it needs rather than the whole slug set.
- Merge a partial identity update onto the stored identity before
normalizing it. Normalizing rewrites the whole triple, so a client sending
only a title id was getting the derived base id next to its old save
target.
- Add `RomIdentity.from_rom` so the triple has one home on the read side
too, and drop `asdict` from `as_rom_attrs`.
- Hold the `SigilExtractionResult` on `TitleIdEmbedCandidate` instead of
copying two of its fields.
- Drop a guard in `_rom_level_identity` that could not fire, derive once in
`normalize_identity`, and return only the parse from `_rebuild_rom_files`,
which already owns `fs_rom["fs_name"]`.
- Read the parsed config in the heartbeat rather than forcing a YAML
re-parse per request, and make `SigilService.is_enabled` a classmethod
like every other one.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The optional binding used to no-op in silence: an absent sigil was
indistinguishable from a file with no title id. `SigilService.is_enabled`
plus `FILESYSTEM.TITLE_ID_EXTRACTION_ENABLED` on the heartbeat put the
feature on the same footing as every other optional capability, and give
a client of `PUT /roms/{id}/identity` a way to ask whether the server
reads binaries at all.
The extracted id also reaches the layer that already matches on Switch
product ids. Until now that layer could only scrape one out of the
filename, which made `embed_switch_title_ids` the de facto transport:
users had to let RomM rewrite their filenames for matching to improve.
`switch_product_id` prefers the id read from the binary, so extraction
helps everyone with the binding and the rename stays cosmetic.
MobyGames' `get_rom` takes the rom, like its IGDB and ScreenScraper
siblings, and the product-id lookup now happens only on Switch.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`_switch_productid_format` zeroed one nibble, which clears an update's
0x800 bitmask but leaves DLC's addon index in the low 12 bits. Only the
base application has a titledb entry, so a DLC filename resolved to
nothing.
It now calls `derive_base_title_id`, the rule the scan already uses, so
both paths normalize an id the same way.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A `total` aiohttp timeout raises a bare asyncio.TimeoutError rather than
ServerTimeoutError, so the retry branch never fired and a hung storefront
escaped `_request` as an opaque scan error.
aiohttp also defaults HEAD to not following redirects, unlike GET, so a
3xx on the capsule path would silently drop the portrait art for every
ROM.
Reading `name` unguarded on a storesearch item could raise out of
`get_rom`, which is meant to always degrade to no match.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`_request` is typed `-> dict` but handed back whatever `res.json()` decoded.
A throttled storefront answers 200 with a bare `null`, so both callers hit
`AttributeError: 'NoneType' has no attribute 'get'` - swallowed as an
unmatched ROM during a scan, surfaced as a 500 on `PUT /api/roms/{id}` with
a hand-entered app id. Coerce a non-mapping payload to `{}` so it degrades
to "no result" like every other failure path in the class.
The SteamMetadata comment claimed the facet columns read Steam. They don't:
the generated columns coalesce over manual/igdb/moby/ss/launchbox/ra/
flashpoint/gamelist only.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The portrait-capsule HEAD request was the one Steam call living outside
SteamService, with its own session, user-agent and timeout. It moves in as
get_library_capsule_url, following LibretroThumbnailsService.head, so the
handler just picks the capsule or falls back to the header image.
get_app_details grows a filters passthrough, and the heartbeat asks for
"basic" instead of pulling a whole store page to read one success flag.
Guard the facet mirror against a provider that reaches the model but not a
migration's trigger column list: test_every_provider_id_is_mirrored writes
every METADATA_SOURCE_COLUMNS id and asserts each roms_facets twin follows.
Verified against triggers rebuilt without steam_id, where it fails naming
the missing provider.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Remove the roms_facets backfill from 0115: the steam columns are created by
that same revision, so it was a full-table UPDATE writing NULL over NULL at
container start. Migration 0114, which adds provider columns the same way,
has no backfill either.
Collapse the nine hand-written raw_*_metadata blocks in updateRom into a loop
over raw_metadata, so a new provider no longer needs a copy-pasted block.
Reuse the shared disable_metadata_rate_limiters fixture for the Steam adapter
tests instead of a second local one, move STEAM_PLATFORMS up to the constant
block it belongs to, and trim a test docstring that restated the rationale
already sitting next to resolve_steam_rom.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CPython's int() raises past 4300 digits. The bare-digit branch of
scene_id_or_none already caught that, but the URL parsers, the filename
tag extractors and the Pouet 302 Location parser all called int() on an
unbounded (\d+) capture, so a pasted URL or a scanned filename carrying a
long digit run surfaced as a 500.
Promote pouet_handler's private _int_or_none to utils.int_or_none, next
to valid_youtube_id, and route every scene id conversion through it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The helper lived in the roms endpoint and reached back into the three scene
handlers through deferred imports. handler.metadata already imports all three
eagerly, so it can own the helper outright and drop the workaround; the branch
chain over `kind` becomes a lookup table. Its test moves beside the other
metadata tests.
Also drop the issue references from the provider docstrings, the config
comments, and the outbound User-Agent headers, which now match the
`RomM/{version}` form the other handlers already send.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
format_credit_line took list[dict[str, str]], which the DemozooCredit and
PouetCredit TypedDicts are not assignable to. It reads two keys and
stringifies them, so it takes a Sequence[Mapping[str, object]].
Give the screenshot loop its own name: it reassigned the str the
external-links loop above had already bound.
Read the awaited URL through await_args_list, which is a list, rather
than await_args, which is None until the mock is called.
Point the untagged-ROM test at the invariant it can actually hold. An
untagged ROM falls back to a title search, which the next test covers, so
it now asserts a disabled handler stays off the network instead.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Renumber the two migrations onto master's head: 0108/0109 collided with
0108_roms_primary_region and 0109_rom_files_category_index, leaving the
chain with two heads. They are now 0114 and 0115 behind 0113.
Both rebuild the roms_facets sync triggers from a hardcoded column list,
so add the publishers and developers columns 0112 introduced. Without
them the rebuilt triggers would have silently stopped mirroring the two.
Adopt master's provider taxonomy. METADATA_PROVIDER_GROUPS now carries
demozoo, pouet, and csdb as catalogs, which replaces the branch's own
GENERAL_PROVIDER_KEYS set and feeds the setup wizard, the scan dialog,
and Settings from one registry. CSDb reaches the scan explainer for the
first time; it was already selectable there.
Regenerate the frontend types: DetailedRomSchema was missing the three
metadata blobs the backend has always declared on RomSchema, and the
blobs are now typed rather than Record<string, unknown>.
Correct the setup strings that still called the three sources enabled by
default, and sort the locale keys.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Move the response cap onto MetadataHandler as _fetch_capped and route
Demozoo, Pouet, and CSDb through it. Only CSDb was capped before, while
Demozoo and Pouet read an unbounded body into memory before decoding it.
Pouet's title search now streams too: an ambiguous title answers 200 with
HTML we never parse, but the body was still being buffered.
Validate youtube_video_id where it is read rather than where Demozoo
parses it. The four metadata blobs it reads from are writable through the
raw_*_metadata form fields, so the id reaching the embed URL never had to
come from a provider, and IGDB and LaunchBox never checked it at all.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Accumulate the capped CSDb read in a bytearray, dropping the separate
chunk list and byte counter.
Move the non-string coercion into http_url() so all five call sites can
pass a raw JSON value.
Prove the cap abandons a body mid-stream: the oversized response is now
an endless generator, so the test hangs if the read is not cut short.
Stub the rate limiter it shares with the rest of the suite.
Collapse the duplicated demozoo_url cases into one parametrized test and
fold the malformed-XML assert into the existing parse test.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Security review follow-ups on the Demozoo, Pouet, and CSDb handlers.
Default the three sources to off, matching every other provider. They
were the only ones defaulting to on, so an upgrade began contacting
demozoo.org, pouet.net, and csdb.dk on the next scan with no operator
opt-in, reachable through the unauthenticated metadata heartbeat.
Guard the bare id conversion in scene_id_or_none. str.isdigit() accepts
superscripts and other digits int() rejects, so a pasted "²" raised out
of the Edit ROM endpoint as a 500.
Filter the remote demozoo_url through http_url(). It was the only one of
the three URL fields taking a string from the API rather than building
one from a hardcoded template and an integer id.
Match a YouTube id against an explicit ASCII class. isalnum() is
Unicode-aware, so it accepted ids the embed URL never can.
Stream the CSDb response against a byte budget. The cap ran after the
whole body was already buffered, so it bounded the parse but not memory.
Catch defusedxml's refusals. EntitiesForbidden derives from ValueError
and ParseError from SyntaxError, so the existing handler caught neither
and an entity-declaring document raised out of production_from_xml.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Three of the ten metadata providers carry Doom as a platform in its own
right rather than folding it into DOS:
- ScreenScraper system 290 "PrBoom", a child of PC Dos scoped to wad files
- Libretro thumbnails DOOM, with boxarts, snaps and title screens
- Hasheous platform 645195 "PrBoom"
IGDB, MobyGames, RetroAchievements, LaunchBox, TheGamesDB, Flashpoint and
HowLongToBeat have no Doom platform, so they stay unmapped.
The ScreenScraper mapping is what makes metadata search work for a doom
folder: scoped to system 290 it matches Doom, Doom II and PWADs such as
Chex Quest. Its name is the user-facing platform name, so it reads "Doom"
rather than naming the source port.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
RomM already ships everything needed to run Doom: the prboom core in the
EmulatorJS core map, platform icons, webrcade feed art and a console UI
theme, all keyed on the doom slug. The slug itself was never a member of
UniversalPlatformSlug, so the folder mapping picker (built by
get_supported_platforms from that enum) had no entry to auto-detect or
bind a doom folder to, and the playable filter excluded its ROMs.
No metadata provider mappings yet; those are a separate question.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ScreenScraper has a Mega Duck system, but the slug was missing from the
platform list, so scans of that platform skipped ScreenScraper entirely.
Fixes#4284
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Resolves the additive conflicts against master:
- config, handler registry and the roms endpoint imports keep both the
Steam and the new UPC-lookup entries.
- Renumbers the Steam migration to 0113 (master took 0109) and rebases it
onto 0112_publisher_developer_split.
- Syncs the migration's pre-Steam facet mirror list with 0112, which added
publishers/developers to the roms_facets triggers.
- Groups SteamMetadata's publishers/developers with the shared provider
keys, now that master has made them a shared field.
Closes#4288.
HasheousHandler hardcoded https://hasheous.org/api/v1, so a self-hosted
instance was unreachable. Add HASHEOUS_API_URL with the same shape as the
existing PLAYMATCH_API_URL: a full base URL, defaulting to the current
value and still selecting the beta host under DEV_MODE.
Two details beyond swapping the constant:
Cover art is linked relative to the site root rather than the API path,
so lookup_rom built it from a second hardcoded https://hasheous.org.
Derive that origin from the configured URL with yarl, as the handlers
already do elsewhere.
A self-hosted instance usually sits on a private address, which the SSRF
guard rejects. INTERNAL_ORIGIN_ALLOWLIST already exists for exactly this
- origins the admin configured deliberately - so add the Hasheous origin
alongside Playmatch's. Without it, setting the variable to a LAN or
container address fails to connect.
Drop a comment that restated the constant it sat above, and cut the clauses
that defended the approach against the one it replaced.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>