* perf(gunicorn): preload the app so web workers share its memory
Each gunicorn worker imported the whole app on its own, ~160 MB private
per worker. Preloading imports it once in the master; gc.freeze keeps the
shared pages from being copied when workers collect garbage.
- gunicorn.conf.py: GC off during import, OpenAPI schema built and all
objects frozen before fork, inherited SQL pool dropped in each worker
- Socket.IO managers renew their pub/sub host ID after fork, otherwise
preloaded workers drop each other's emits as their own
- WEB_SERVER_CONCURRENCY defaults to 2
- Page limit capped at 1,000 (was 10,000): a worker keeps the memory of
its largest response until recycled; select-all pages by 1,000
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(gunicorn): address Greptile review on the preload change
- Shorten the renew_host_id docstring and the gunicorn.conf.py comment
- Close the fork test's pipe in a finally block
- Test that when_ready builds the schema before freezing and re-enabling
the GC, and that post_fork disposes the pool with close=False
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(gunicorn): WEB_SERVER_PRELOAD switch and an import fork-safety test
- WEB_SERVER_PRELOAD (default true) sets preload_app from the gunicorn
config; false restores per-worker imports and skips every hook
- tests/test_api_import_is_fork_safe.py imports main in a fresh
interpreter with the database on a closed port and fails if the import
opens a connection or starts a thread (adapted from #5735)
- BACKEND_ARCHITECTURE notes the preload and what it requires of imports
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(coherence): record the invariant run for the preload change
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test: drop trunk-ignore comments bandit never needed in tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* perf(metadata): serve the metadata dumps and fixtures from SQLite files
The LaunchBox and Switch TitleDB stores sat in valkey, which keeps every
byte resident: about 300MB on an instance with both imported, against
roughly 1MB for an empty server. Every read is an exact-key lookup and
nothing writes between imports, so they now live in read-only SQLite
files under RESOURCES_BASE_PATH/metadata, where the OS page cache holds
only the pages lookups touch.
A build writes a temporary file and renames it over the previous one,
so readers see the old store or the new one and never a partial import.
That replaces the initial-import flag and the schema stamp: the store
revision is part of the file name. A failed import keeps serving the
previous file.
The startup fixture indexes (MAME, ScummVM, Sony serials, known BIOS)
no longer get copied into valkey on every boot. They build on first use
into a file under the cache path, named after a hash of the JSON.
Startup deletes the old valkey keys and any file of an older revision,
and queues a rebuild when a store had data, so an upgrade refills
LaunchBox and TitleDB on its own. nginx returns 404 for the metadata
folder, since /assets/romm/resources is otherwise served without auth.
Measured against the real dumps: LaunchBox builds in 22s into 263MB on
disk, TitleDB in 1.2s into 54MB, the fixtures in 0.2s into 8MB. A hit
costs 10-23us including decompression, a miss about 7us.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: code-review
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: simplify
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: review-polish
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose (code-review fixes)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Keep the previous metadata store when a dump comes out empty
A LaunchBox or TitleDB build that writes no rows to its main table now
fails with EmptyDumpError instead of swapping an empty store over a
populated one.
Each store keeps one connection per process behind a lock instead of one
per thread. A build closes it once it swaps the file in, and any other
process closes its own on its next lookup, so a replaced file's disk
space is released instead of held by idle threads.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Address Greptile review: trim DumpStore comments
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Restore valkey's own snapshot policy by default
The hourly default (48259b3a9, #3980) kept valkey from rewriting the
hundreds of MB of LaunchBox and TitleDB data it held. With those moved to
SQLite files, a snapshot holds only sessions, queues and query caches, so
an unset REDIS_SAVE_POLICY now leaves valkey's stock policy in place and
loses less on a crash. An empty value still disables snapshots.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* chore(api): add indexes to roms
* chore(api): add additional indexes
* chore(api): widen indexes on rom table
* perf(api): fast filtered and short searches on MariaDB, plus year, rating and game mode filter
* chore(api): add ANALYZE TABLE at end of migration
* pr-ready: drop the roms_search table
* pr-ready: code-review
* pr-ready: review-polish
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* pr-ready: prose
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* chore(api): use hand-coded list of columns
* pr-ready: code-review
Restore the schema before asserting in the 0163 schema tests, send
platform_ids in the endpoint test, and fix two stale comments.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: simplify
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: review-polish
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose
Reword the comments code-review added to the 0163 schema tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(database): cover year_range_ms
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(database): raise the sort limit on MariaDB through the mysql driver
The listener keyed on the dialect name, which is mysql when
ROMM_DB_DRIVER=mysql reaches a MariaDB server. Check the dialect's
is_mariadb instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test: fix the sort limit tests on PostgreSQL and the _ms types
The sort limit tests read is_mariadb from the test engine, which
PostgreSQL's dialect lacks, so they now set it. _ms takes named date
parts again, since mypy rejects a star tuple before tzinfo.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
* fix(roms): drop a provider's old metadata when a manual rematch misses
Changing a provider id to one the provider cannot resolve kept the typed id
but left the previous game's metadata blob in place for every provider except
RetroAchievements. Apply the RetroAchievements rule to every provider: on a
miss the blob is cleared, unless raw metadata for it came with the same edit.
Fixes#5836
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* pr-ready: code-review
Strip string match ids so a padded Flashpoint id is not read as a rematch
that misses and wipes the stored metadata, and describe the miss case in
the _refetch_changed_matches docstring.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
* feat(ci): add a vouch and denouncement contribution system
Pull requests from authors who aren't vouched in .github/VOUCHED.td are
closed automatically, and denounced users' issues and pull requests are
closed too. Maintainers manage the list with !vouch, !unvouch and
!denounce comments, which queue changes on a single vouch/updates pull
request, since master is protected.
Adapted from Ghostty's vouch system (ghostty-org/ghostty#10559) with our
own stdlib-only script instead of the mitchellh/vouch actions. Adds a
vouch request issue form, an AI usage policy, and the matching
CONTRIBUTING sections.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(ci): keep concurrent vouch commands and close only the vouched request
Addresses Greptile review on #5835:
- Drop the concurrency group, which kept only one waiting run, and retry
on conflicting commits instead. The pending PR body is rebuilt from the
branch's commit messages so concurrent runs can't lose a line.
- Only close a vouch request when the vouched user is its author.
- Shorten the module docstring, workflow comments and VOUCHED.td header.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: code-review
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: simplify
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: polish
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: simplify code-review fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(ci): keep the vouch queue when its PR is closed without merging
Only a merged PR resets vouch/updates now. A PR closed to rerun CI keeps
its commits, and the next command reopens it instead of opening a new one.
Deleting the branch drops the queue.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(ci): ask vouch requesters about their development experience
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(ci): tighten the vouch request experience prompt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(ci): ask vouch requesters what they've built and how they work
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(vouch): vouch for Covin90 and tmgast
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(vouch): vouch for milktoastrat and BrandonKowalski
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(gallery): exclude rows behind bottom nav from A-Z letter highlight
* pr-ready: code-review
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: simplify
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: polish
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(gallery): exclude rows under the top bar from the A-Z letter highlight
The jump menu's current letter falls back to the first visible row, which
sat under the pinned toolbar. RVirtualScroller gains a topInset prop that
GalleryShell feeds from stickyOffset, the same offset scrollToIndex uses.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(scroller): one-sentence inset prop docs
Addresses Greptile's review on the bottomInset docstring.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(scan): skip extracted Switch files when reading title ids
Sigil reads a Switch title id only from an NSP or XCI container, so no
file under an extracted title's exefs or romfs folder can yield one. A
scan still handed every such file to sigil, and the Switch family never
reuses stored ids while a file lacks one, so every quick scan re-read an
extracted game's whole tree (one Switch 2 game in the report holds ~160k
files) and kept each path in the scan's needs-key set for the summary.
Files inside an exefs or romfs folder of a Switch ROM are no longer
title id sources. On a 50k-file extracted game, a quick rescan goes from
50,002 sigil reads and 50,002 retained needs-key paths to none, and its
peak allocation drops from 193 MB to 110 MB.
Refs #5706
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(scan): check row reuse by identity in the extracted Switch rescan test
Unsaved rows all have a None id, so comparing ids could not tell reused
rows from rebuilt ones. Addresses Greptile's review.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
EmulatorJS 4.2.3 releases a button mapped to an axis direction only when
the axis reads 0. A trigger that rests at -1 and reads +1 when pressed
jumps straight back to -1, so the button stays held.
Wrap the bound axischanged listener from the EJS_emulator trap: when an
axis jumps between opposite directions, dispatch a 0 reading first so
every button on that axis is released before the real reading presses
the one it points at. This mirrors EmulatorJS#1198, which is only in
4.3.0-pre. Builds that send oldValue (nightly, used for netplay) already
handle the skip and pass through untouched.
Fixes#5778
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The scheduled Trunk Check (all files) run fails on 79 prose-check issues
that predate the linter: clipped 'X, else Y' chains, 'internal id' in
API descriptions, and clipped 'Left out, ...' conditionals.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Export HLTB and RetroAchievements extras in Pegasus metadata
* fix(pegasus): address Greptile review on HLTB/RA export
Skip malformed hltb_metadata and achievement values instead of failing
the export, emit x-ra-id whenever the ROM has one, shorten the comment,
and rename the loop variable that shadowed dataclasses.field (ruff F402).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: code-review
Drop stale x-hltb-*/x-ra-* keys when merging into an existing metadata
file, count only well-formed achievements, and skip boolean HLTB values.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose (code-review additions)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(roms): drop the old RA metadata when a manual rematch misses
Changing ra_id to a game RetroAchievements cannot resolve kept the new id
but the previous game's achievements, genres and companies, so exports
paired the new id with the old totals.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: rwendell <rwendell@users.noreply.github.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* bugfix(api): missing status comparison counts as no match
* pr-ready: code-review
Match unknown status values as false so PostgreSQL's enum never sees them,
and cover unknown values, name case and grouped versions in the tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: plain-prose
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(api): reject unknown statuses_logic values
Any value other than exactly 'all' or 'none' acted as 'any', so 'NONE'
returned the opposite of what was asked. The field is now limited to
'any', 'all' and 'none', and anything else gets a 422.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(api): limit every *_logic filter field to any, all or none
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(siblings): group versions by connected component everywhere
The game page's siblings matched on any shared provider id, while the
gallery's group_by_meta_id window partitioned on the first non-null id in
a fixed provider order. A version matched by IGDB and ScreenScraper and
one matched by ScreenScraper alone were siblings on the game page but two
gallery cards. The recommendation surfaces didn't group at all: the
cold-start row ranks by rating, which every version shares, so one game
filled it.
rom_sibling_groups now stores each ROM's connected component over
rom_identity_keys, kept in step by add_rom/update_rom/delete_rom and
rebuilt after a scan. The sibling_roms view, the gallery window and the
recommendations all read it: the feed and similar games collapse each
game to one entry, exclude the other versions of a played game, and
show the version the grouped gallery shows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(siblings): answer the Versions filter from rom_sibling_groups
Only a ROM with another version has a group row, so "has versions" is a
primary-key probe rather than an EXISTS over the sibling_roms self-join.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(siblings): break representative ties by id; restore Versions filter
Versions often share a filename stem and region, and without a final key
the version that represents a group could change between queries.
The "Versions" filter goes back to EXISTS over sibling_roms: measured on
a 100k-ROM library it takes the same time as the direct group-row probe
(107 ms each), since the view merges into the query.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(migrations): renumber rom_sibling_groups to 0158 after master's 0157
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(recommendations): address Greptile review on sibling grouping
- Swap each recommendation to its visible representative before the
visibility cut, so a game whose top-ranked version is hidden shows
through a visible one instead of disappearing.
- Read candidates in batches until enough distinct games remain, so a
game with more versions than one overfetch batch no longer crowds out
the rest of the feed; the cold-start query pages with an id tiebreak.
- Shorten the 0158 migration and RomSiblingGroup docstrings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(recommendations): use the shared auth helpers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: code-review
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: simplify
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose (code-review fixes)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(recommendations): hide only the hidden version, as the gallery does
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(siblings): regroup only on identity changes and scope the post-scan repair
add_rom skips the regroup when the merge changed no identity column. The
post-scan repair regroups the scanned ROMs for a ROM-scoped scan and
rebuilds only the scanned platforms otherwise, since no group spans two
platforms.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
index.html linked a hand-written site.webmanifest ahead of the one
vite-plugin-pwa generates. Its icons had no maskable purpose and a white
background, so Android launchers (Chrome, Brave) shrank the square logo
into a white circle. Its name was also empty.
Drop site.webmanifest and its link, and configure the plugin manifest
with the RomM name, brand theme and background colours, and the
full-bleed android-chrome PNGs listed as both any and maskable.
Claude-Session: https://claude.ai/code/session_011waFLFwVe4sdqdXdJcZ37i
Co-authored-by: Claude <noreply@anthropic.com>
* fix(feeds): send real content IDs and RAP keys in PKGi and PKGj feeds
The rap column carried the SHA-1 of the .rap file. PKGi decodes it as the
16-byte license key, so it saved a wrong license. The content ID was always
generated (UP9644-...), so even a correct license was saved under a name the
game never looks for.
Read the content ID from the package header, and the key from the rom's .rap
file named after that content ID (or its only .rap file).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(feeds): read PSN licenses through the roms filesystem handler
Move the package content ID and .rap license lookup from the feeds
endpoint into FSRomsHandler, read at most 17 bytes of a .rap file, and
trim the get_rap_data docstring.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: code-review
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: simplify
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
* fix(psp): bound what a compressed PSP container header can make us decode
The CISO/ZISO block size, the index length and ISO9660 directory sizes
all come from the uploaded file. Cap the block size at 1 MiB, require the
index table to fit in the file, refuse out-of-order index entries, cap
deflate output at the block size, and cap directory reads at 1 MiB.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix: cap sync play sessions in the schema and redact token values in logs
The sync completion payload now declares max_length on play_sessions,
so an oversized list is refused while it is validated instead of after
every entry is parsed. It answers 422 like any other invalid payload.
token is added to the redacted log keys, so a reset link or any other
token=... query value is masked in the log viewer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(auth): redeem a password reset token with one atomic GETDEL
The reset JTI was checked with EXISTS and then removed with DELETE, so
two requests on different workers could both pass the check. Use GETDEL,
as invite and refresh tokens already do.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(psp): reject a deflate block that ends before its output cap
Addresses Greptile review on #5809: a truncated CISO/DAX block now raises
zlib.error again instead of hashing a partial EBOOT.BIN, so the scan falls
back to RAHasher. Adds tests for truncated streams and out-of-order index
entries.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A user with a password can set their own email to the address of someone
at the provider who hasn't signed in to RomM yet. That person's first OIDC
sign-in then linked their identity and role to the attacker's account.
Password-less accounts can't change their own email, so their email still
identifies the owner.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(sockets): send scan events to signed-in sockets only
The socket server accepts anonymous connections, and scan progress
events went to every socket, so a client that connected without a
session during a scan received ROM names and paths. Signed-in sockets
now join an authenticated room on connect, and scan broadcasts target it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(sockets): narrow emit await_args before reading it
Addresses Greptile review on #5808.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Preserve ROM metadata when files move
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(scan): keep the filename fallback from overriding stronger matches
Address Greptile and Copilot review on #5795:
- Fold the filename into get_matching_missing_rom as its weakest tier, so an
ambiguous hash or title id match stops the search instead of falling
through to a filename.
- Compare filenames with exact_collation, so MariaDB's case-insensitive
collation can't match game.zip to Game.zip.
- Skip the filename tier for names several discovered files share, so one
copy can't take an entry that another copy's hashes would have claimed.
- Fix the present-ROM test, which stored Present.zip.zip.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: code-review
- Skip filename matches on entries whose stored hashes or title id show
another file.
- Exclude physical games from reassociation.
- Keep a plain fs_name comparison so the platform/fs_name index applies.
- Match on the discovered name, before title id embedding renames it.
- Make the shared-name scan test able to fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose (code-review additions)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(scan): claim a missing entry atomically before reassociating it
Files are identified concurrently, so two files could match the same
missing entry and both move it. claim_missing_rom clears the missing
flag with a conditional UPDATE, and only the file whose claim wins moves
the entry; the other gets a new one.
The reassociation log line now names the identity that matched (file
hash, title id or filename), so a wrong filename match can be traced.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(db): pass hashes explicitly so mypy accepts the call
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(streaming): run the app lifespan in the ASGITransport claim tests
The two async claim tests read app.state.aiohttp_session through the
context middleware, which only the lifespan sets. They passed only when
an earlier test on the same worker had opened a TestClient.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* perf(roms): get roms in single pass
* perf(api): cache fixes-separate cache key
* pr-ready: code-review
Fix the PostgreSQL letter test and a strict mypy comparison in the
gallery index tests, place letters along the served id list on a
partial cache hit, reuse _gallery_order_clauses for the ranked index,
require sort_key and visibility on gallery_index_rows, and add tests
for the unscoped cache, other sorts and identical copies.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: simplify
Share the filter arguments between filter_roms and gallery_index_rows,
branch once on the one-pass index, and settle cached-or-fresh lists in
place in get_gallery_index without materialising the result rows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose (code-review follow-up)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(roms): read the gallery index through one handler entry point
get_gallery_index now takes the filtered and unfiltered queries and
returns both sidecars, replacing gallery_index_rows, the rows-based
get_gallery_index and with_char_index.
- It reads the cache before building any statement, and reuses the
endpoint's filtered query, so filter_roms only runs again for the
ranked PostgreSQL read on a cache miss.
- Every letter index comes from the ordered id and letter rows, so a
letter's position is its first tile on every path, including
ungrouped MariaDB galleries and requests without the id list. The
separate first-tile cache key goes away.
- Only a request for the id list stores it, so pages still read the
list an index request built.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(roms): group MariaDB letters by collation weight
DENSE_RANK forced a temporary table and an extra sort, which made the
whole ungrouped library about 2.3x slower than the previous two
queries. WEIGHT_STRING gives each letter its collation key per row, so
accented letters still share a group without the window.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(roms): build the ranked index from a shared sibling window
The dedup window moves out of filter_roms into _sibling_window, so the
ranked PostgreSQL read builds its own (id, letter) select instead of
filter_roms switching its return shape behind a flag and a cast. The
read filters hidden rows before the window, which keeps the same
primaries because the window ranks visible versions first.
get_gallery_index reads the cached letters and id list in one Redis
round trip and only builds an id lookup when letters follow a cached
list. search_relevance_leads becomes private, and the gallery index
tests share one query builder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* perf(search): prevent double fetch
* perf(search): display no results when we know we have no results
* pr-ready: code-review
Gate the search count chip on metadataLoaded so it stays hidden while the
link's filtered result is loading, use useIsAlive for the unmount guard,
and cover fetchPlatforms' reset and joined-failure paths.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: simplify
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose (code-review catch-up)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(gallery): wait for platforms in collections, refetch fresh after a scan
Collection views opened from a ?platforms= link now wait for the platform
list before their first fetch, as Search does. fetchPlatforms gains a
force option that starts a new load after the running one, and the
post-scan reconcile uses it so it never adopts a list read before the
scan finished. AppLayout's comment no longer claims fetchPlatforms
resolves empty while another load runs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* chore(deps): update frontend dependencies
* chore(deps): regenerate frontend lockfile
Renovate's artifact update failed, so the lockfile still pinned rolldown
1.2.18 and npm ci rejected it. Re-resolve the vitest, storybook and
playwright families so they move together and leave one playwright-core.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The description was a single-line chip, so anything longer than the header
was cut off: with an ellipsis on desktop, and at both ends on phones. It is
now a wrapping text block below the chips that keeps line breaks.
Co-authored-by: Ben Klopfenstein <2729824+benklop@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* perf(roms)!: serve the filter dropdown values from their own endpoint
GET /api/roms computed the filter dropdown lists (genres, franchises,
companies, platforms and the rest) on every gallery open and every filter
change. For a search they were 0.58 s of the 0.72 s of database time, almost
all of it reading roms_facets, and a gallery needs none of them to show its
cards.
The lists now have their own request, GET /api/roms/filter-values, which the
filter drawer makes when it opens. It takes the same scope parameters as the
gallery (search_term, platform_ids, platforms_logic, collection_id,
virtual_collection_id, smart_collection_id) and returns the same
RomFiltersDict, limited to the roms the caller can see.
On a 100,000 ROM MariaDB library with one API worker, a searched open falls
from 0.85 s to 0.10 s. Opening the drawer pays the cost instead: 0.3 s for a
search, 0.8 s for the whole library, which is no longer cached.
BREAKING CHANGE: GET /api/roms no longer accepts with_filter_values and no
longer returns filter_values. Use GET /api/roms/filter-values. The web client
is updated in this commit.
Backend:
- add GET /api/roms/filter-values
- remove with_filter_values, filter_values and the unscoped filter-values
cache key from GET /api/roms
- with_filter_values() in the handler no longer caches; the shared cache
version counter stays because the id list and letter caches use it
Frontend:
- the gallery store no longer asks for the lists on open, refresh or scroll
- fetchFilterValues() asks once per displayed result, and GalleryShell calls
it when the drawer opens
- the generated response type loses filter_values
Tests:
- remove the filter-values cache tests
- read the lists from the new endpoint in the endpoint tests
- check /api/roms no longer returns them, that the lists are never null, and
that values of a hidden rom are left out
- cover the on-demand fetch in the store tests
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* perf(roms) docstring updates
* pr-ready: code-review
- key the filter-values dedupe by scope, not result epoch, so filter,
sort and group changes stop refetching the lists
- empty another scope's lists while the new ones load, and refetch after
a library change or context switch
- abort an in-flight filter-values request for a superseded scope
- send platform_ids in the filter-values endpoint tests and cover scope
narrowing and ignored row filters
- update comments that still called the filter values cached
- test the drawer-open fetch in GalleryShell
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: simplify
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: review-polish
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose (code-review follow-up)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: simplify (code-review follow-up)
Rename the filterValuesScope state field to filterValuesScopeKey so it no
longer shares a name with the filterValuesScope() helper.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(roms): cache the whole-library filter values on the new endpoint
GET /api/roms/filter-values computed the unscoped lists on every drawer
open, a 0.8 s scan on a 100k-rom library. Serve them from the per-user
versioned cache GET /api/roms used, under the same key, so only a scope
(platform, collection or search) computes live.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: code-review
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose (code-review follow-up)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: simplify
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: review-polish
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(gallery): show a loading state while the filter values load
The drawer's attribute dropdowns now show a spinner, and an open dropdown
says Loading, while GET /api/roms/filter-values is in flight. The metadata
provider and status lists are fixed and never show it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(roms): cover filter-values cache invalidation and private collections
Hiding a rom after the whole-library lists are cached drops its values on
the next request, and another user's private collection or smart
collection yields no values.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
* fix(home): group sibling versions in the anniversaries widget
The widget asked the rom list for the day's games without `groupByMetaId`,
so every version of a game (region, revision, clone) was its own card and
counted separately in the "n / total" counter. It now sends the user's
`groupRoms` setting, the same one the gallery follows, so grouped
libraries show one entry per game and ungrouped ones are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(home): keep the anniversary widget's grouping fixed while paging
Addresses the Greptile review: later pages read the grouping setting
again, so changing it in another tab made their offsets index a list
grouped differently from the first page. The grouping is now read once
per loaded day.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: code-review
Reset the paging flag when the day rolls over and skip next-page fetches
while the day reloads, so a page request spanning midnight neither locks
the forward arrow nor pages the new day from the old day's offset. Make
the test's groupRoms stand-in a real ref.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: simplify
Carry the day's grouping on the day query instead of a parallel ref,
fold the two setting tests into one it.each, and drop the later-pages
test the setting-change test already covers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: review-polish
Spell out why load() resets the paging flag.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(home): page the anniversaries widget by id
The first request now returns the day's ordered id list with its page,
so later pages load by id instead of re-running the grouped query at an
offset. That also fixes the day's grouping for its later pages without a
separate snapshot. A load generation counter replaces the per-day
staleness checks, so a superseded response is dropped whichever load
superseded it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(gallery): read groupRoms through useUISettings
The gallery store re-read settings.groupRoms from storage with its own
copy of the key and default. It now uses the same setting as the
anniversaries widget.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
* perf(streaming) lazy loading in streaming worker
* perf(rq): push _resolved to test container
* pr-ready: code-review
Move the reaper import guard into test_task_func_paths.py, reusing
BACKEND_ROOT and JOB_ONLY_MODULES, watch socket_handler and lifecycle too,
check the deferred imports still load, and surface stderr on failure.
Explain the lazy socket_handler import.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: simplify
Defer the lifecycle import inside _reap instead of wrapping its teardown,
share one subprocess helper between the import guards, and check every
streaming-queue task the PreloadingWorker parent would load.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: review-polish
Keep the import-guard helper's docstring to one sentence.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose
Write the lazy-import and guard comments as full sentences.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(streaming): move session notices out of session_store
record_termination and push_to_user deliver over the socket and as
notifications, so they now live in handler/streaming/notices.py with
top-level imports. session_store keeps only the Redis tombstone write
(save_termination) and loads neither the database nor socketio.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* perf(rq): keep SQLAlchemy out of the RQ worker and cron processes
The RQ worker parents and rq cron imported SQLAlchemy and the ORM models at
start-up, through config/__init__.py (safe_* helpers in utils.database) and
config_manager (sqlalchemy.URL and the rom-converto adapter). None of them
query the database themselves; each job's work horse loads what it needs.
- Move safe_int, safe_str_to_bool and get_nested from utils.database to utils.
- Import sqlalchemy.URL inside get_db_engine.
- Import the rom-converto normalizer only when converto.platform_formats is set.
- Add a test that tasks.cron_config and handler.rq_worker start without
loading SQLAlchemy.
- Run a killed work horse's failure callback and exception handlers in a
short-lived child, so the job code they import never stays in the parent.
Measured on the production image: idle PSS of rq_worker, rq_scan_worker and
rq_cron fell by 98 MB in total.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(rq): move to constants file, tests prevent huge imports
* perf(rq) revert forked failure report.
* pr-ready: code-review
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: simplify
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: review-polish
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: plain-prose
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(db): build the database URL in utils.database
ConfigManager.get_db_engine becomes utils.database.get_db_url, so
config_manager no longer needs SQLAlchemy at all and the function-local
import goes away. Every caller already loads SQLAlchemy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(roms): clear a match id that is not a number instead of storing 0
safe_int_or_none fell back to safe_int's default of 0, so sgdb_id,
hasheous_id and tgdb_id (which have no refetch to reset them) were saved
as 0. Use utils.int_or_none instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(models): describe where each shared column limit is used
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
* chore(vue): devs can use vite vue dev tools
* pr-ready: code-review
Keep the Vue DevTools plugins out of Storybook, whose builder merges the
app's Vite plugins, and list the plugin in the frontend architecture doc.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(vue): load Vue DevTools only when DEV_VUE_DEVTOOLS is true
The overlay sits on every dev page, including local Playwright runs
against npm run dev, so developers opt in from .env as with DEV_PWA.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(saves): convert Nintendo DS saves through sigil
Sigil now converts a DS save between melonDS's raw file and DeSmuME's
.dsv, so a download with core= gets the file that emulator reads instead
of the stored one as is. DS moves from the native list to the platforms
sigil restores; like Saturn and Sega CD it carries no title id.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(saves): accept a single-file neutral unit as sigil names it, for DS and Game Boy
Sigil names a cart's single-file unit after the content, `{stem}.srm`, and
sets the unit format; the neutral check only took `save.raw` for DS and
`save.sram` for Game Boy, so a client pushing sigil's own unit got a 422.
A SINGLE unit's one file may now carry sigil's name on those platforms;
multi-file units and every other platform keep their names.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(saves): name DS among the cartridges that take no companions
Sigil refuses companions on every cartridge platform, DS included now
that it converts DS saves, so the refusal says so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(saves): convert Mega Drive, 32X, Master System and Game Gear saves through sigil
genesis_plus_gx and picodrive keep these carts' save RAM at the same
offsets but fill and size it differently. With sigil converting between
them, the four platforms move from NATIVE_SAVE_PLATFORM_SLUGS to
SIGIL_RESTORE_PLATFORM_SLUGS (sigil slugs genesis, 32x, sms, gamegear),
so a download with core= gets the file that core keeps. The companion
refusal message names the new cartridges.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(saves): accept the Sega cartridges' single-file neutral unit as sigil names it
Sigil names a Mega Drive, 32X, Master System or Game Gear unit after the
content, `{stem}.srm`. A SINGLE unit's one file may now carry that name,
as DS and Game Boy's may; RomM's `save.sram` still passes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(saves): convert Game Boy Advance saves between emulators with sigil
GBA moves from the native-save platforms to the ones sigil reads at scan
time and restores for a core. The stored file doesn't load everywhere:
VBA Next keeps an EEPROM save at 128 KiB into a 136 KiB file, gpSP pads
every save to 128 KiB, and standalone mGBA appends the cart clock. The
scan stores the cart's save chip and clock in sigil_features, which sigil
uses to size a padded save. The tests that used GBA as their native
example now use SNES.
Needs a sigil pin with GBA collect and restore.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(saves): accept a single-file GBA neutral unit as sigil names it
Sigil names a GBA cart's unit as it does a Game Boy's: the save alone as
`{stem}.srm`, or a clock cart's zip of `save.sram` and `clock.rtc`.
GBA now takes Game Boy's form, so the single file may carry sigil's name.
The clock-only form had no other platform left and goes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(saves): pin sigil at the DS merge, and take only a plain file name as its single unit
Both SIGIL_VERSION pins move to baa96b8 (rommapp/argosy-sigil#22), the
first sigil commit with DS. _SIGIL_SINGLE is [^/]+\.srm, so a single unit
named with a folder in it is refused; test_neutral.py checks it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(deps): pin sigil at the GBA merge
rommapp/argosy-sigil#24 is merged as 4980f69. Both SIGIL_VERSION pins
(Dockerfile, docker/Dockerfile) move from baa96b8 to that commit on
sigil's main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(deps): pin sigil at the Mega Drive merge
rommapp/argosy-sigil#23 is merged as be0809d. Both SIGIL_VERSION pins
(Dockerfile, docker/Dockerfile) move from baa96b8 to that commit on
sigil's main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(deps): pin sigil at 650b265
Both SIGIL_VERSION pins (Dockerfile, docker/Dockerfile) move from
be0809d to 650b265, sigil's main. It holds rommapp/argosy-sigil#23
(be0809d) and is the commit rommapp/romm#5758 pins, so the two
pull requests set the same value.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(deps): pin sigil at 650b265
Both SIGIL_VERSION pins (Dockerfile, docker/Dockerfile) move from
baa96b8 to 650b265, sigil's main. It holds rommapp/argosy-sigil#22
(baa96b8) and is the commit rommapp/romm#5758 pins, so the two
pull requests set the same value.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(deps): pin sigil at 650b265
Both SIGIL_VERSION pins (Dockerfile, docker/Dockerfile) move from
4980f69 to 650b265, sigil's main. It holds rommapp/argosy-sigil#24
(4980f69) and is the commit rommapp/romm#5758 pins, so the two
pull requests set the same value.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(saves): name no systems in the companion refusal
The message listed the cartridges that take no companions, so each
platform added to sigil's restores edited it, and the open save PRs
(#5643 to #5647) each edited it differently. It now says what holds for
every platform: companions go only on memory cards and volumes. All five
carry the same line, so they merge in any order.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(saves): name no systems in the companion refusal
The message listed the cartridges that take no companions, so each
platform added to sigil's restores edited it, and the open save PRs
(#5643 to #5647) each edited it differently. It now says what holds for
every platform: companions go only on memory cards and volumes. All five
carry the same line, so they merge in any order.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(saves): name no systems in the companion refusal
The message listed the cartridges that take no companions, so each
platform added to sigil's restores edited it, and the open save PRs
(#5643 to #5647) each edited it differently. It now says what holds for
every platform: companions go only on memory cards and volumes. All five
carry the same line, so they merge in any order.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(saves): restore Sega cart saves through RomM's platform map and binding
From review: the Mega Drive, 32X, Master System and Game Gear tests mock
the binding, so a slug sigil doesn't take would still pass. A ROM on each
RomM platform now goes through stored_game and the real binding, and the
restored file is checked in the form sigil's genesis.md gives the core:
genesis_plus_gx without trailing 0xFF, picodrive's 32 KiB for Master
System and Game Gear. rom_game is the same helper in #5643 to #5647.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(saves): restore a DS save through RomM's platform map and the binding
From review: the DS tests mock the binding, so a slug sigil doesn't take
for DS would still pass. A ROM on RomM's nds platform now goes through
stored_game and the real binding, and the restored file is checked in
the form sigil's nds.md gives each core: DeSmuME's .dsv ends in its
122-byte footer, melonDS's .sav is the save. rom_game is the same helper
in #5643 to #5647.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(saves): restore a GBA save through RomM's platform map and the binding
From review: the GBA tests mock the binding, so a slug sigil doesn't take
for GBA would still pass. A ROM on RomM's gba platform now goes through
stored_game and the real binding, and the restored file is checked at the
size sigil's gba.md gives each core: gpSP 128 KiB padded with 0xFF, VBA
Next 136 KiB, mGBA the chip. rom_game is the same helper in #5643 to
#5647.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(deps): pin sigil at ef9b51e
Both SIGIL_VERSION pins move from 650b265 to ef9b51e, sigil's main
since rommapp/argosy-sigil#30 merged, the commit rommapp/romm#5758
pins now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(deps): pin sigil at ef9b51e
Both SIGIL_VERSION pins move from 650b265 to ef9b51e, sigil's main
since rommapp/argosy-sigil#30 merged, the commit rommapp/romm#5758
pins now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(deps): pin sigil at ef9b51e
Both SIGIL_VERSION pins move from 650b265 to ef9b51e, sigil's main
since rommapp/argosy-sigil#30 merged, the commit rommapp/romm#5758
pins now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: MMagTech <mmagtech@Mac.home>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
* fix(igdb): let region_mode decide the localized title
get_igdb_preferred_locale ignored scan.priority.region_mode, so a rom
tagged (Japan) always got IGDB's ja-JP localized title, even with
prefer_config and us first in scan.priority.region. Under prefer_config
the configured regions now come first and the rom's own tags are the
fallback, matching the ScreenScraper handler since #4413. The default
prefer_rom_tags ordering is unchanged.
Fixes#5784
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(igdb): fold the region_mode note into one docstring sentence
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: code-review
Log a missing IGDB locale at debug: under prefer_config every ROM asks
for the first config locale, so a missing one is routine, not a warning.
Pin SCAN_REGION_MODE in the multi-region locale test instead of relying
on MagicMock's auto attribute.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: simplify
Drop the IGDB-locale filter on the ROM's region codes; the final
lookup loop already skips codes IGDB has no locale for.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose
Spell out the USA region in the prefer_config test docstring so it
does not read as the pronoun, untangle the fallback test docstring, and
finish the clipped Returns line.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(metadata): share one region order across IGDB, ScreenScraper and LaunchBox
IGDB now tries every preferred locale in order, up to the first region
that uses the default title, instead of only the first. Under
prefer_config with [eu, jp], a (Japan) ROM whose game has no EU
localization gets the Japanese title again rather than the default.
preferred_region_codes in the filesystem base handler builds the region
order once. ScreenScraper, IGDB and LaunchBox all read it, so LaunchBox
artwork follows region_mode too, and uppercase config codes match the
ROM's tags for every provider.
European country codes map to IGDB's EU locale and ScreenScraper's ss
to the default title, so a (France) ROM no longer falls through to the
next configured region.
An unquoted no (Norway, Norwegian) in scan.priority.region or
scan.priority.language loads as false from YAML and crashed every IGDB
match. The config loader now turns it back into "no" and drops other
non-string entries with a warning.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(igdb): drop _string_codes and spell out the EU region codes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
* fix(launchbox): read the YouTube id from watch URLs wherever v sits and without a fragment
A video URL with v after another parameter yielded no id, and a #t= fragment was kept as part of it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix(launchbox): ignore a trailer URL that cannot be parsed
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* pr-ready: code-review
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: simplify
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: review-polish
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(metadata): share one YouTube id parser across LaunchBox, Demozoo and Pouet
LaunchBox now also reads ids from embed, shorts, live, /v/ and
youtube-nocookie links, and Demozoo and Pouet now accept URLs without
a scheme. Ids are checked against the 11-character format at parse time.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
The dev setup creates frontend/assets/easyrpg with symlinks, and the image build
copies it into the context. It then collides with the real EasyRPG files at the
same path, and the last COPY step fails with 'cannot copy to non-directory'.
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix(utils): show a playtime of just under an hour as 1h, not 60m
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* refactor(utils): drop the playtime rounding comment
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix(utils): carry formatBytes sizes that round up to 1024 into the next unit
A size just under a unit boundary printed as "1024 KB" or "1024 MB" instead of "1 MB" or "1 GB".
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* test(utils): make the formatBytes carry test exercise the decimals argument
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix(play): show the automatic Save synced toast at most once every 5 minutes
* fix(saves): let sigil decide when a Pokemon save is the same, ignoring scratch RAM
* pr-ready: code-review
* pr-ready: review-polish
* pr-ready: prose
* fix(play): hold SRAM changes in the browser and upload them once the game goes quiet
* fix(play): upload a held save before a state replaces it, and report only new snapshots
* pr-ready: code-review
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: simplify
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: review-polish
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose (code-review fixes)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(play): leave a save a running session holds out of other tabs' sync passes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* build(sigil): pin ef9b51e
---------
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Follow-up to #5715, from the review findings posted after it merged:
- Inside a try that swallows errors, a call to a helper that returns an
error response was dropped, so its status went missing. The analyzer
now reads such a call in a "returned" mode that keeps the responses
the helper builds or returns and drops what it raises.
- A handler for http.client.HTTPException was treated as catching
FastAPI's HTTPException, since only the last name was compared. Handler
classes now resolve through the module's imports, so the 502 that
broker.request raises in webstation._cores_reply is kept.
- A declared raise inside a swallowing try no longer counts.
- Shorten the UNREADABLE_STATUS comment to two lines.
Claude-Session: https://claude.ai/code/session_011waFLFaNttxvn8EYtvLSwo
Co-authored-by: Claude <noreply@anthropic.com>
Replace mame.svg with a new cabinet icon and add fbneo.svg and fba.svg.
The SVGs take precedence over the existing fbneo.ico and fba.ico in the
icon manifest; the .ico files stay for clients that request them directly.
Claude-Session: https://claude.ai/code/session_011waFLJPYrfFiUWNZqa6BBY
Co-authored-by: Claude <noreply@anthropic.com>
* fix(frontend): send plain objects across the desktop bridge
The platform probe built each query's cores from the heartbeat store, so
the list was a Vue reactive Proxy. Electron's IPC cannot clone a Proxy,
so every probe batch failed with "An object could not be cloned", the
error was swallowed, and no platform ever read as supported. The native
Play button therefore never appeared in the desktop shell. A launch with
no chosen core passes the same kind of list and would have failed too.
Copy requests to plain JSON at the bridge boundary, for the probe and for
launch.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4edqZDrKTQMbEaLVUD
* docs(frontend): shorten the bridge copy comments
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4edqZDrKTQMbEaLVUD
* test(frontend): type the launch bridge fake and check the copied request
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4edqZDrKTQMbEaLVUD
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>