Commit Graph
123 Commits
Author SHA1 Message Date
Abdessamad Derraz e26ee44229 fix: export only what the platform declares 2026-10-10 11:15:25 +02:00
Abdessamad Derraz 2a049dc9c9 fix: let a shared path only keep a system 2026-10-10 09:49:56 +02:00
Abdessamad Derraz ffa6516e09 fix: let an alias settle only where the core reads 2026-10-10 09:47:50 +02:00
Abdessamad Derraz bbce3902dd fix: keep a system an on-target core reads 2026-10-10 09:15:22 +02:00
Abdessamad Derraz f6da2cff3a fix: settle a core file only by its size or slot 2026-10-10 09:15:11 +02:00
Abdessamad Derraz 707c81d2cf fix: name a target by its canonical name 2026-10-10 08:09:00 +02:00
Abdessamad Derraz d295e51ad6 fix: list systems the way --system selects 2026-10-09 22:57:15 +02:00
Abdessamad Derraz 82bdcfa1b1 fix: read the clone map beside the scanned tree 2026-10-09 22:45:57 +02:00
Abdessamad Derraz 6e6ae77ccd fix: one selection and one name per system 2026-10-09 22:34:20 +02:00
Abdessamad Derraz 5090208a64 fix: keep another emulator's tree out of resolution 2026-10-09 22:20:00 +02:00
Abdessamad Derraz cfb038429d fix: hold dist/ for the whole pipeline run 2026-10-06 12:33:59 +02:00
Abdessamad Derraz 06de56002d fix: prefer the owner's copy among equal path tails 2026-10-06 12:13:27 +02:00
Abdessamad Derraz b17d1f13ff fix: rank the owner's copy above shared tree names 2026-10-06 12:09:51 +02:00
Abdessamad Derraz 969026b88d fix: one game data list for notes and composition 2026-10-06 05:11:41 +02:00
Abdessamad Derraz fe877ff79c fix: keep cross-named aliases inside their profile 2026-10-06 04:35:35 +02:00
Abdessamad Derraz 2cafeb1d33 fix: key the casefold index on its source dict 2026-10-06 04:30:11 +02:00
Abdessamad Derraz b2e488e0a4 fix: carry identity in extras, refile rom b 2026-10-06 04:12:08 +02:00
Abdessamad Derraz d6afb09663 refactor: one upstream name index for core lookups 2026-10-06 01:47:16 +02:00
Abdessamad Derraz cd2919400a fix: skip archive members by their yaml key 2026-10-06 01:32:33 +02:00
Abdessamad Derraz 8e532db6aa fix: order same-named files by their owner's copy 2026-10-05 22:22:22 +02:00
Abdessamad Derraz 0d7939588e fix: one size predicate, size_options retired 2026-10-05 02:51:13 +02:00
Abdessamad Derraz a090e64336 fix: never serve a homonym for an absent file 2026-10-05 00:22:36 +02:00
Abdessamad Derraz b5c1e4fc03 fix: count engine and publisher trees as game data 2026-10-04 23:47:21 +02:00
Abdessamad Derraz 2efc37a738 feat: pack the files a directory entry names 2026-10-04 17:58:10 +02:00
Abdessamad Derraz 1ceb4b0c5a fix: split platform groups on declared emulators 2026-10-04 17:48:00 +02:00
Abdessamad Derraz 97f741bf0f fix: publish target lists as the builder resolves them 2026-10-04 16:55:30 +02:00
Abdessamad Derraz 8a2a9c6ffa feat: add freshness tooling and override defaults 2026-10-04 14:54:11 +02:00
Abdessamad Derraz 6d97fbe127 fix: stop a check that cannot answer exiting zero 2026-09-07 05:39:50 +02:00
Abdessamad Derraz 3c16f6f640 fix: let a deep path answer for the file it names 2026-09-05 09:41:04 +02:00
Abdessamad Derraz fe77535c3b fix: state one catalog ratio, correct the faq
The home page and the stats export counted every file carrying a
provenance record, the provenance page and the README only the system
files. The site published 553 and 566 for the same quantity, one click
apart, and the export paired the wider count with composition.systems as
its denominator. common.count_catalog_matched is now the single source,
scoped to the systems bucket.

The FAQ had drifted from the profiles it describes: MAME pinned at 0.287
against 0.289 in mame.yml, Adler-32 attributed to Dolphin's IPL rather
than the DSP ROMs that carry known_hash_adler32, and the per-emulator
verbose report named as the only content check on an existence platform,
which skips the DISCREPANCY line the platform report raises itself.

Tests read both sides: no generator may count matches inline, and each
FAQ claim is checked against the profile or the script that owns it.
2026-09-04 11:41:17 +02:00
Abdessamad Derraz 593b277bc4 refactor: one place decides which profiles answer
The verifier and the builder each resolved the profiles a run names, in
thirty-five lines that differed only in how they failed: one exits, the
other returns empty-handed. An alias is the same binary under another
name and a launcher only starts an emulator, so neither has requirements
of its own, and both refusals have to say the same thing.

common raises now and each caller chooses its own ending. Six tests hold
the refusals, one of them reading both sources so a copy cannot grow
back. The manifest's core-complement phase comes out of generate_manifest
in the same pass, 60 to 34.

Verified inert: manifests identical entry for entry, and the Handy pack
rebuilds to the same bytes.
2026-08-23 07:18:41 +02:00
Abdessamad Derraz c313b32347 chore: neutral report path and plain punctuation
The markdown report wrote to a directory named after the tooling that
happened to produce it. It takes --report-dir now, defaulting to
reports/, so nothing in the tree names anything but the project.

Em-dashes replaced throughout the sources and tests, rephrased rather
than swapped for a comma where the dash carried an apposition.
2026-08-12 16:16:52 +02:00
Abdessamad Derraz 53fc5b7005 refactor: name the resolver's weakest steps
resolve_local_file is an ordered chain where the order is the policy:
content first, then a declared path, then a filename. The last steps -
the walk through the cached data directories and the shape-only match a
filename-agnostic core allows - were inline, and the predicate judging a
candidate found by name was a closure with no test of its own.

All three are named now, and the predicate is the interesting one: it
decides whether a file the walk found by filename actually satisfies
what the entry declares. Sixteen tests cover it, including the truncated
MD5 prefixes Batocera publishes and the case where one hash matches
while another is contradicted. Accepting a name match without checking
content fails nine of them.

Complexity 164 to 143. Verified inert against the previous revision on
frozen inputs.
2026-08-12 15:30:13 +02:00
Abdessamad Derraz b5fd643ccf refactor: give common.py's parts their own modules
common.py had grown to 1833 lines by accumulation. Six coherent pieces
move out - untrusted parsing, digests, archives, generated artefacts,
release assets, dump catalogues - and common.py re-exports them, so the
sixty existing import sites keep working and migrating them stays
optional.

The site build is now reproducible, which is what made the move
checkable. It deleted its generated directories first, so every page was
new and write_if_changed had no earlier version to compare against: a
deploy republished six hundred pages for the clock alone. Directories
are swept instead, a page is removed only once nothing produces it, and
the body pass compares against the body of the file on disk rather than
against the decorated page. Two consecutive builds on the same inputs
now produce identical bytes; before, 1034 files differed.
2026-08-12 11:49:54 +02:00
Abdessamad Derraz b11c8b0638 fix: keep the agnostic scan inside its own tree
A filename-agnostic core accepts any name for its BIOS, so the builder
scans the directory holding the candidates. It picked that directory
from a first-hit lookup by name, the one piece of evidence that lands
in another emulator's tree: five files answer to GameIndex.yaml and one
belongs to an Android package, rom1.bin is a PS2 ROM and a Roland
SC-55 ROM. One wrong match became every file beside it, flattened into
the BIOS root of platforms that do not run that emulator: 45 files in
the Recalbox pack, 170 in the RetroArch one.

Four things decide it now. A destination and the repo layout meet on a
tail, so the path index is tried from the longest tail down and never
to the bare filename; that alone corrects seven files, among them the
Japanese GameCube slot, which held the US dump. A seed has to declare
the shape it is looking for, since no shape means the whole directory.
An ambiguous name needs the profile's other files to agree before the
scan walks anywhere. What the scan emits carries the SHA-1 it selected,
so packing never resolves it by name again.
2026-08-12 07:23:23 +02:00
Abdessamad Derraz b33d045175 fix: group region candidates once for both sides
The builder and the coverage report each grouped their own candidates
before asking which regional alternatives to withdraw. The builder
grouped the platform files and the core extras; the report grouped the
platform files alone, and keyed them on an unsanitized destination.

So a region run withdrew 73 files from a recalbox pack while the report
withdrew 14, and described the other 59 as covered by a pack that would
not carry them.

platform_region_groups builds the grouping once and both sides read it.
The extras it returns are keyed by emulator, name and path: Dolphin
declares three IPL.bin that differ by path alone, and a name-keyed map
withdraws the wrong one. Manifests are byte-identical before and after.
2026-08-12 06:43:47 +02:00
Abdessamad Derraz 7c043475cd feat: follow mame clones in the gap analysis 2026-08-12 03:15:05 +02:00
Abdessamad Derraz e97c1fbbcc fix: keep unsourceable files from matching homonyms 2026-08-11 14:40:33 +02:00
Abdessamad Derraz cc24ff1bea fix: ignore the rendered timestamp when comparing
Decorated site pages carry the generation stamp twice: once as the
markdown footer and once as a rendered element. write_if_changed knew
only the first, so every page was rewritten on every run for the clock
alone.

The comparison is what makes the deploy-site freshness guard a real
staleness check rather than a guaranteed failure, and it had no tests.
2026-08-11 05:23:52 +02:00
Abdessamad Derraz 3b8f2d75d5 perf: read yaml through the c loader
Loading the emulator profiles is the most expensive step of every
command here, and all forty call sites used the pure-Python scanner
while libyaml sat unused in the same wheel. One shared yaml_load picks
the C loader when pyyaml ships it: the 375 profiles parse in 0.18s
instead of 1.39s, and verify --platform retroarch drops from 2.17s to
0.73s. The loader class is the same restricted one safe_load uses.

es_bios.xml was parsed straight from the network while install.py
already refused a document declaring entities; both now share one
guard. Scrapers reach it through a single path bootstrap in the
package rather than two ad-hoc ones.
2026-08-11 00:55:16 +02:00
Abdessamad Derraz e8ee8b0954 fix: decide hash mismatch by native mode
A declared hash that the local dump contradicts is not one situation. An
existence platform never reads the bytes, so withholding the file lets an
upstream list error remove something the frontend would have loaded; a
hash platform would reject it, so shipping it is pointless.

The mode now decides, at every point that had an opinion: pack building,
core complement, emulator packs, manifests, conformance and
_intentional_hash_exclusion. verify.find_undeclared_files follows, since
verify and generate_pack must agree file for file.

Also here: resolution reports which evidence matched rather than a flat
"exact", a path or filename can no longer override a declared hash, and
safe_extract_zip treats a Windows backslash as the separator it is
instead of refusing the archive.
2026-08-10 13:36:03 +02:00
Abdessamad Derraz 45f89cc6c0 feat: add region filters and profiles 2026-08-09 14:15:56 +02:00
Abdessamad Derraz 1b9acff2ad fix: reject name hits with contradicting size 2026-08-08 07:09:49 +02:00
Abdessamad Derraz c51fc233f9 fix: avoid shared scratch path in large-file cache 2026-08-08 06:19:38 +02:00
Abdessamad Derraz 45dbc30301 feat: lock pack artifacts during pipeline runs 2026-08-08 04:24:03 +02:00
Abdessamad Derraz f4b02c2a43 feat: join dump-catalog provenance in database 2026-08-08 02:25:44 +02:00
Abdessamad Derraz 933d258df5 feat: publish collection composition 2026-08-07 20:20:46 +02:00
Abdessamad Derraz 76fbade6b8 fix: resolve archives with profile hashes 2026-08-07 19:04:33 +02:00
Abdessamad Derraz 587aadde08 fix: coerce numeric hashes to strings 2026-08-07 15:30:37 +02:00
Abdessamad Derraz 9b1a32a4da feat: align stats across readme and site 2026-08-07 13:06:09 +02:00