scripts/scraper/listxml.py holds the element window, attribute
reader, ROM member extraction and open_listxml that romset_dat_importer,
mame_devices and arcade_parent_importer each wrote. On mame0289lx.zip
and the 19 FBNeo DATs the three produce the same recipes, release and
sets as before.
Attribute values are entity-decoded everywhere: romset_dat_importer
kept f&m.basic.bin where the archive member is f&m.basic.bin. The
five comx_eb member names of recipes/mame.json are corrected to what a
re-import now writes. A release zip with no or several .xml members is
refused by name instead of raising StopIteration.
es_systems_entries yields (system, emulator, core, spec) and the four
batocera_scraper readers and the target scraper's package map are built
on it. Output is identical on batocera-43.1's es_systems.yml.
The target scraper now raises on a file that is not a mapping or does not
parse, where it returned an empty map and failed later on 0 mappings.
Each network job had several copies. One is kept per job and
every caller uses it.
- Source revision: model.sourcerevision (source_revision, required_revision,
platform_revision) replaces BaseTargetScraper's pattern list, the
exporter's _REVISION, the four launcher_revision copies and RetroBat's
own YAML reader. It reads the union of the shapes: GitHub raw, blob and
tree with or without a path after the revision, GitLab raw, blob, tree
and archive, codeload tar.gz and zip. The target scrapers now answer
for RetroDECK, NextUI, MinUI and MyMinUI, whose tree URLs end at the
commit, and the exporter reads GitLab blob and tree and codeload zip.
EmuDeck and RetroBat still require a 40-hex commit, and each launcher
reader requires its own repository in the URL.
- Latest release: fetch_github_latest_version, type-checked, is the only
lookup. mame_hash_scraper, romset_dat_importer and the Lakka target
scraper call it. romset_dat_importer's NoReleaseError is gone: a
release without a tag raises RuntimeError.
- Tree listing: github_tree and tree_entries refuse a truncated or
unreadable listing. The libretro and core-info scrapers share
core_info_files and fetch_info_file, with libretro's refusal of an empty
listing. The core-info listing and the RetroDECK, ROCKNIX launcher and
libretro listings were not checked for truncation before.
- GET: fetch_bytes is the one request path. fetch_text, fetch_present
(None on 404 only), github_json and download are built on it, so every
read retries 429 and 5xx, caps the body and raises FetchError, a
ConnectionError carrying the HTTP status. The target scrapers' own
fetch_text raised RuntimeError: they now raise FetchError, and an
optional Batocera board include is skipped on 404 only, not on any
failure. The exporter's originals, MiSTer, RetroPie, redump and the
buildbot index go through it too.
- Headers: core.upstream.forge_headers is the one builder. The token goes
to api.github.com and raw.githubusercontent.com, the host compared
whole, as Bearer. A URL that only names api.github.com in its query
got the scrapers' token before, and profile_sync sent its token to
github.com, whose release downloads redirect to asset storage with the
header. Scraper reads of raw files now carry the token.
- Submodule commit: submodule_commit checks that the path is a
submodule. Batocera's target scraper accepted any contents answer with
a sha, a directory's tree sha included.
- Download: download streams through a scratch file renamed into place,
retries like fetch_bytes, can keep an existing file and returns the
Content-Disposition. It replaces the _download of romset_dat_importer
and game_dat_importer.
core.paths holds the default database, platforms, emulators and bios paths, core.cli declares the options built on them (add_repo_inputs) and the --emulator/--system modes verify and generate_pack share. model.targets.target_scope answers --target for a command line, model.profiles.no_profile_for_systems the system with no emulator. tests/sources.declared_options reads the options a script declares through either form.
Hash fields go through core.hashing.parse_hash_list, which also splits comma-joined list items: the truth model compared a comma-joined sha256 list as one value. _registry.yml goes through load_platform_registry (required= where an absent file must stop the run), database.json through load_database, file and member digests through file_digest and stream_hashes. download.py and check_release read SHA256SUMS.txt with one parser: a sha256sum -b line matched nothing in download.py and the pack went unchecked.
BaseScraper reads JSON once (_fetch_json, json_object), every scraper files its requirements through systems_from_requirements, and the batocera-systems readers (Batocera, KNULLI, AmberELEC, EmuELEC) inherit CheckBiosScraper. Launcher modules share one Launcher record, one LauncherPatternMissing and one link_record. DAT importers build provenance entries from LogiqxDat.
Paging /stats/hits by exclude_paths spent more than the 500 requests
GoatCounter allows in an hour on four weeks. The JSON export holds the
same hourly counts by path and referrer: on 2026-11-10 to 16 it gave
67,877 views and 24,343 actions, the figures /stats/total gives, with
identical top paths and referrers. One export an hour is allowed.
A day over the excluded-path cap was read whole, then again in halves,
and the next day the same. Four busy weeks spent the 500 requests
GoatCounter allows per hour before the report was written. The window
now keeps the size that fit, so the overflow is paid once.
"gba bios" landed on mGBA's page because the Game Boy Advance was a section of the Nintendo page. CONSOLE_PAGES now splits Nintendo as it does Sony: eleven more consoles get a page (Famicom Disk System, Game Boy Advance, Game Boy Color, Nintendo 64, Pokemon Mini, Satellaview, SuFami Turbo, Super Famicom Box, Super Game Boy, Switch, Wii). Each section keeps its heading and anchor on the Nintendo page and leads to the console's page. The search gate expects the Game Boy Advance, Game Boy Color and Wii pages first for their queries.
The per-emulator table (339 rows) and the files not collected yet (282 rows) held most of the 8,300 elements of /gaps/, laid out in one 200 ms task on a phone. Each is now a page of its own linked from its section, which keeps its heading and anchors (per-emulator, not-collected-yet, acknowledged-gaps) with the row count. Emulator cards link the new page. Mobile Lighthouse Performance on /gaps/ goes from 99 to 100.
The cross-reference upstream table was reached with
.sl-heading-wrapper:has(> #by-upstream-emulator) ~ section, which the
browser matched again for every block added after any heading of any
page: about 400 ms of style work while the gaps page loads (mobile, 4x
CPU throttling, 586 ms down to 200 ms). The table sits in a
.rb-xref-upstream block, and the address column is its second.
The server accepted 8,125 characters and dropped the connection at
10,125. Windows are read day by day with at most 700 excluded paths, so
fewer overflow and get read twice.
A get/ page whose release pack comes in parts opens on the command, then offers the parts and says all are needed. A pack in one file keeps its ZIP first and now shows the command after it.
An emulator or system page title names keys, firmware or BIOS files from its file names: each kind that holds a quarter of the distinct names. Eden keys, Vita3K firmware, Citra keys and BIOS files; mGBA stays BIOS files.
Search Console rows are merged across page anchors. The expected click
rate is the site's own rate at each rounded position, so a search is
flagged when clicked less than half of it. A by-page table ranks pages
by clicks lost, with changes against the period before. Each section
states its period, and release downloads show the change since the
snapshot the previous run left in .cache/insights/.
Paging the whole span with exclude_paths grew the address past what the
server accepts. Windows add up since GoatCounter keeps hourly counts; a
long rate-limit wait now ends the run with its reason.
The retrodeck games fallback is computed from the manifests and went
stale with the data tree manifest change. Two docstrings carried clause
semicolons. The install run test read bytes_done as the sum of finished
files, but it counts every byte arrived, a file still in transfer
included, as progress does; the test now checks that bound and the doc
says it.
A data tree whose source names a revision is fetched at the commit its
branch points to and listed at that commit, whose bytes never change.
A source with no revision (the buildbot's nightly assets) is marked
rolling: the installer writes each listed file as the source serves it,
checked against its ZIP CRC-32, as RetroArch's own downloader does, and
the install record keeps it in place on the next run. The PPSSPP list
refused 49 of 169 files after each buildbot rebuild.
RetroDECK pins bios/cdibios.zip and bios/stvbios.zip twice, the older
MAME set for its mame component and the full set for the RetroArch
core. The first pin in system order shipped the smaller set, which
current MAME rejects (cdi.cpp:922 needs the slave MCU ROM). The archive
whose members cover the other now ships: it serves both readers.
installer_build.pins read the site's served names from model.guides,
which loads the guides YAML at import. Since the launcher builders read
the pin through it, the installer doc build pulled pyyaml in, and the
Python 3.8 installer job has none.
core.hashing.file_digest is the streamed loop the release tools carried,
byte for byte: 1 MiB reads, read again each call. It replaces
compute_hashes with cache=False there.
The launcher builders read install.py's SHA-256 through
pins.installer_sha256 and the value install.sh pins through pins.PIN,
which now sits beside the pattern pin_installer writes with. build_port
kept a third copy of that pattern.
Five streamed hashlib loops in check, assets, sync and restore read the
digest through compute_hashes with cache=False: the same fresh read of
the bytes, written once.
The release tools, the installer build tools and the repository's
commit and PR checks keep their commands and move their code into
three packages. The release record readers move to model.releaserecord,
romfolders to model, the buildbot check to scraper. The site reads the
handheld launchers and the bootstrap pin from installer_build.
Code about to move into a package reads core.paths.REPO_ROOT, and the
release tools stop inserting their own folder on sys.path: scripts/ is
on it for every command and package module.