Commit Graph
117 Commits
Author SHA1 Message Date
Abdessamad Derraz f6da2cff3a fix: settle a core file only by its size or slot 2026-10-10 09:15:11 +02:00
Abdessamad Derraz 31e2d4235a fix: say what the core refuses in emulator mode 2026-10-10 07:11:08 +02:00
Abdessamad Derraz ed49b26c12 fix: a declared alias settles the entry 2026-10-09 23:18:36 +02:00
Abdessamad Derraz 6207e81d9c refactor: read the grouping where it lives 2026-10-09 22:45:58 +02:00
Abdessamad Derraz 6e6ae77ccd fix: one selection and one name per system 2026-10-09 22:34:20 +02:00
Abdessamad Derraz 5ebb141dbf fix: score a losing twin against the shipped file 2026-10-09 22:20:00 +02:00
Abdessamad Derraz ba7c185d8a refactor: share the gap scope rule 2026-10-06 13:59:50 +02:00
Abdessamad Derraz 580a082b0f fix: slot emulator entries where the pack puts them 2026-10-06 12:52:24 +02:00
Abdessamad Derraz c1b930a6fd fix: keep save and content files out of the truth 2026-10-06 12:48:58 +02:00
Abdessamad Derraz 5b341dbe54 fix: report contradicted hashes in existence verify 2026-10-06 12:05:56 +02:00
Abdessamad Derraz f3d01aeeeb refactor: split this round's fixes into small helpers 2026-10-06 11:16:06 +02:00
Abdessamad Derraz a24e17535f fix: count core archives among the core files 2026-10-06 09:54:33 +02:00
Abdessamad Derraz 0dd6abab2c fix: refuse unread verify flags, read platforms dir 2026-10-06 08:58:21 +02:00
Abdessamad Derraz fb9426dfb7 refactor: extract verify listing and resolution steps 2026-10-06 06:50:59 +02:00
Abdessamad Derraz 3067865b02 fix: read hle fallbacks from the platform cores only 2026-10-06 05:06:04 +02:00
Abdessamad Derraz 7b62f7f702 fix: refuse every flag a quick mode does not read 2026-10-06 04:39:08 +02:00
Abdessamad Derraz dbc8d63318 fix: one agnostic substitute rule for pack and verify 2026-10-06 04:19:40 +02:00
Abdessamad Derraz b2e488e0a4 fix: carry identity in extras, refile rom b 2026-10-06 04:12:08 +02:00
Abdessamad Derraz 16be9476cb fix: dedup core extras on their real destination 2026-10-06 01:32:56 +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 b12a3280e6 fix: give the install manifest the arbitrated file 2026-10-05 21:53:59 +02:00
Abdessamad Derraz 3177a57103 fix: emulator region report reads the pack drop set 2026-10-05 21:43:32 +02:00
Abdessamad Derraz 012bf2fec2 fix: one rule for the variant an emulator accepts 2026-10-05 21:36:14 +02:00
Abdessamad Derraz 2efc37a738 feat: pack the files a directory entry names 2026-10-04 17:58:10 +02:00
Abdessamad Derraz 556e632efb fix: one held release fills a slot in emulator verify 2026-10-04 17:41:06 +02:00
Abdessamad Derraz 59ccb5b7d5 feat: scope a profile data directory to a build mode 2026-10-04 17:09:14 +02:00
Abdessamad Derraz 887fc34bf6 feat: lay out standalone files by build mode 2026-10-04 16:35:59 +02:00
Abdessamad Derraz 4f67e3cad3 fix: honour a contradicted hash that is not an md5 2026-09-07 07:48:54 +02:00
Abdessamad Derraz 1455e0423c fix: arbitrate on the evidence the builder uses 2026-09-07 07:02:39 +02:00
Abdessamad Derraz a61c800462 fix: report a contradicted hash on an archive too 2026-09-06 23:08:04 +02:00
Abdessamad Derraz 7b93285e1d fix: read the build mode per emulator when arbitrating 2026-09-05 13:25:24 +02:00
Abdessamad Derraz adcd177e12 feat: settle contested slots in the pack and the report 2026-09-05 09:08:43 +02:00
Abdessamad Derraz 75f4542ea8 refactor: scope validation to a platform's cores 2026-09-03 17:51:34 +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 a269f9b677 refactor: lift two preambles out of the verifiers
Resolving the profiles a run names, which refuses an alias or a launcher
because neither has requirements of its own, and the structural checks
on an archive that hold whatever it contains: a duplicate entry, an
absolute path, a traversal, a zero-byte member. Complexity 58 to 50 and
63 to 51.

Extracting the second surfaced a Counter it had been reading from the
enclosing module, which pyflakes caught before the tests did.
2026-08-12 17:04:29 +02:00
Abdessamad Derraz bf3196ce06 refactor: name the gap filter's two kinds of skip
find_undeclared_files decided per entry whether a core requirement can
be a gap, through a chain that mixed two skips whose difference is easy
to lose. Some record the requirement as settled so no other profile
reconsiders it; the rest leave it open, because the same file can be
libretro-only in one profile and standalone-only in another and the key
carries no emulator.

The chain returns a named verdict now, complexity 60 to 45. Twelve tests
cover the verdicts and two more cover the distinction end to end: a
standalone-only entry seen first must not answer for the profile that
needs the file. Collapsing the two skips into one passes every other
test in the suite and fails that pair.
2026-08-12 16:44:30 +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 5e168b86c8 refactor: ask the mode module instead of retyping it
Four sites still compared the verification mode to a literal after the
module owning that policy existed. One of them mattered: an unrecognised
mode fell through to MD5 verification while compute_severity was scoring
it as existence, so a typo in a platform YAML produced a report whose
checks and severities described different platforms.

The mode is normalized once per run and the consumers ask for what they
need. A test reads the sources and fails on a literal comparison, so the
next consumer cannot quietly grow a fifth copy.
2026-08-12 07:36:29 +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 f998f4d77a fix: judge core extras by content where the builder does
The gap analysis answered from the name index, so a core extra whose
local copy contradicts its declared hash counted as held. Under a
digest mode the builder drops exactly that file, so the coverage report
described a pack that would not contain it: seven files across
Batocera, Recalbox and RetroBat.

An entry that states what its content should be is now resolved by
content; the name still answers for entries that declare nothing to
check against, and existence mode is unchanged because there the
frontend never opens the file and the pack does carry it.
2026-08-12 05:38:16 +02:00
Abdessamad Derraz b28f8d12a3 feat: report unsourceable entries apart from gaps
The per-emulator report counted an entry nobody can supply -- a
per-user key, a slot the user fills, a dump that was never made -- as
plainly missing. fpse-ng read 14 missing when twelve were documented as
unobtainable, which invites the wrong repair: dropping the flag,
deleting the entry, or chasing a vendor's whole install tree.

They are listed with the reason the profile records rather than hidden,
and the summary counts them apart. Platform reports are untouched.
2026-08-12 05:20:25 +02:00
Abdessamad Derraz f097184b00 fix: stop counting a contradicted hash as covered
The per-emulator report captured the status resolve_local_file returns
and then ignored it: any non-empty path became OK. An entry whose only
candidate contradicts its declared hash therefore read as covered, so a
same-named file from another system stood in for one the collection
does not hold. 36 entries across 14 profiles were affected, among them
config.ini, ROM and rom2.bin, names that collide across systems.

Emulator validation still runs first, since it names the field that
disagrees; the resolution status is consulted only when validation had
nothing to say.
2026-08-12 04:21:54 +02:00
Abdessamad Derraz ab6a3bb26d refactor: single-source the native mode policy
verify.py and generate_pack.py must reach the same verdict on the same
file, and CLAUDE.md calls any divergence critical, but each spelled out
mode == 'existence' in its own words. Both now ask nativemode whether
the frontend reads the file's bytes, which is the one fact the rest
follows from, and a test holds the two answers together.

The BaseScraper contract the wiki asks contributors to implement had no
caller anywhere, so nothing proved compare_with_config, has_changes or
test_connection still worked.
2026-08-11 00:54:46 +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 5f60138dce docs: correct and complete the documentation set 2026-08-08 04:24:08 +02:00
Abdessamad Derraz 0838269c04 feat: split profiled and source-backed counts 2026-08-07 19:39:24 +02:00
Abdessamad Derraz 78b2075976 fix: dedup undeclared files by name and archive 2026-08-07 19:04:33 +02:00
Abdessamad Derraz bf5863b9b8 fix: dash source-backed cell without profiles 2026-08-07 18:28:50 +02:00
Abdessamad Derraz 792bad3fd5 fix: align pack checks with builder, purge stale packs 2026-08-06 16:41:47 +02:00