From 9cdca28e52372f0b989085dff79af4b4f4ce911f Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Tue, 24 Nov 2026 05:53:34 +0100 Subject: [PATCH] chore: name the split resolve modules --- .github/workflows/deploy-site.yml | 11 +++++++++++ scripts/resolve/launchers.py | 16 +--------------- scripts/resolve/truth.py | 6 +----- tests/sources.py | 4 ++-- tests/test_audit_regressions.py | 5 +++-- wiki/adding-a-platform.md | 2 +- wiki/verification-modes.md | 4 ++-- 7 files changed, 21 insertions(+), 27 deletions(-) diff --git a/.github/workflows/deploy-site.yml b/.github/workflows/deploy-site.yml index 24b289a37..42058d64d 100644 --- a/.github/workflows/deploy-site.yml +++ b/.github/workflows/deploy-site.yml @@ -100,6 +100,7 @@ on: - "scripts/refresh_data_dirs.py" - "scripts/release/restore.py" - "scripts/resolve/__init__.py" + - "scripts/resolve/acceptance.py" - "scripts/resolve/archives.py" - "scripts/resolve/categories.py" - "scripts/resolve/collisions.py" @@ -108,23 +109,33 @@ on: - "scripts/resolve/cores.py" - "scripts/resolve/datadirs.py" - "scripts/resolve/directories.py" + - "scripts/resolve/entryscope.py" - "scripts/resolve/gamedata.py" - "scripts/resolve/grouping.py" + - "scripts/resolve/launcherconfig.py" + - "scripts/resolve/launcherlayer.py" + - "scripts/resolve/launcherplaces.py" - "scripts/resolve/launcherrefs.py" - "scripts/resolve/launchers.py" - "scripts/resolve/launches.py" - "scripts/resolve/layout.py" - "scripts/resolve/localfile.py" + - "scripts/resolve/lookup.py" + - "scripts/resolve/namestages.py" - "scripts/resolve/nativemode.py" + - "scripts/resolve/nativemodel.py" - "scripts/resolve/ownership.py" - "scripts/resolve/packfiles.py" + - "scripts/resolve/platformdiff.py" - "scripts/resolve/reconcile.py" - "scripts/resolve/regions.py" - "scripts/resolve/review.py" + - "scripts/resolve/reviewhashes.py" - "scripts/resolve/sendable.py" - "scripts/resolve/slot.py" - "scripts/resolve/standalone.py" - "scripts/resolve/truth.py" + - "scripts/resolve/truthsystems.py" - "scripts/resolve/validation.py" - "scripts/restore_large_files.py" - "scripts/romrecipes/__init__.py" diff --git a/scripts/resolve/launchers.py b/scripts/resolve/launchers.py index 4113ef594..0e12de8d4 100644 --- a/scripts/resolve/launchers.py +++ b/scripts/resolve/launchers.py @@ -1,18 +1,4 @@ -"""The platform's launcher layer, read by verify and by the pack builder. - -A platform's own launch code often decides which name a file is read under. -Batocera's DuckStation generator tries 22 names per region and keeps the -first it finds, RetroBat's ares launcher writes the LaserActive image it -finds into ares's settings. The platform scraper records that code under -``launchers:`` and this module turns the records into places: a set of -destinations, relative to the directory core files go to, any one of which -the launcher reads for one purpose. - -Two consequences follow, both computed here once for every reader. A core -file the launcher would not read because another name of the same place is -held is not missing on that platform. A place nothing fills yet receives, -under the launcher's name, a file the core accepts by content. -""" +"""Where a platform's launch code puts an emulator's files: handed directories, executed files, standalone bindings.""" from __future__ import annotations diff --git a/scripts/resolve/truth.py b/scripts/resolve/truth.py index 9d56a8c1f..2b3d205ee 100644 --- a/scripts/resolve/truth.py +++ b/scripts/resolve/truth.py @@ -1,8 +1,4 @@ -"""Platform truth generation and diffing. - -Generates ground-truth YAML from emulator profiles for gap analysis, -and diffs truth against scraped platform data to find divergences. -""" +"""Platform truth generated from emulator profiles, for gap analysis and the native export.""" from __future__ import annotations diff --git a/tests/sources.py b/tests/sources.py index ec1c0949b..8ce35ec49 100644 --- a/tests/sources.py +++ b/tests/sources.py @@ -41,7 +41,7 @@ COMMANDS = { ), "slots.py": ("packs/slots.py", "resolve/collisions.py", "packs/slotscan.py", "packs/slotreport.py"), "validate_pr.py": ( - "resolve/review.py", "devtools/reviewfiles.py", "devtools/reviewreport.py", + "resolve/review.py", "resolve/reviewhashes.py", "devtools/reviewfiles.py", "devtools/reviewreport.py", "core/gitclone.py", ), "refresh_data_dirs.py": ("packs/datadirs.py", "packs/datadirextract.py"), @@ -183,7 +183,7 @@ COMMANDS = { "model/citations.py", "profiling/attribution.py", ), - "generate_truth.py": ("resolve/truth.py",), + "generate_truth.py": ("resolve/truth.py", "resolve/truthsystems.py"), "diff_truth.py": ("exporter/truthdiff.py", "exporter/diffreport.py"), "fetch_site_images.py": ("sitegen/imagefetch.py", "sitegen/imagenormalize.py"), "make_site_icons.py": ("sitegen/brand.py", "sitegen/chromium.py"), diff --git a/tests/test_audit_regressions.py b/tests/test_audit_regressions.py index 16f6b1464..965485754 100644 --- a/tests/test_audit_regressions.py +++ b/tests/test_audit_regressions.py @@ -5349,7 +5349,8 @@ class SignaturesCarryTheirTypes(unittest.TestCase): # Lowered as modules are annotated, never raised. CEILING = 0 COMPLETE = ("core/artifacts.py", "model/platforms.py", "model/profiles.py", "resolve/localfile.py", - "resolve/validation.py", "generate_pack.py") + "resolve/lookup.py", "resolve/namestages.py", "resolve/validation.py", + "resolve/entryscope.py", "resolve/acceptance.py", "generate_pack.py") @staticmethod def _missing(path: Path) -> list[str]: @@ -6263,7 +6264,7 @@ class ZippedFileMd5IsParsedOnce(unittest.TestCase): ) def test_the_three_sites_share_the_parser(self): - for module in ("resolve/validation.py", "verify.py"): + for module in ("resolve/acceptance.py", "verify.py"): source = script_source(module) self.assertIn("parse_hash_list(", source, module) self.assertIn("inner_rom_data_check(", script_source("packs/integrity.py")) diff --git a/wiki/adding-a-platform.md b/wiki/adding-a-platform.md index 9bd515e2d..3b00fe287 100644 --- a/wiki/adding-a-platform.md +++ b/wiki/adding-a-platform.md @@ -521,7 +521,7 @@ that names the BIOS directory must match a known construct, else the scrape stops with `LauncherPatternMissing`. `verify.py` and the pack builder read the records through one function, -`LauncherLayer.settle()` in `scripts/resolve/launchers.py`, applied inside the +`LauncherLayer.settle()` in `scripts/resolve/launcherlayer.py`, applied inside the cross-reference both of them consume. A `names_searched` list is one place: the names are tried in order and one held file fills it, so a core file the launcher would never open once another name of the list is there is not diff --git a/wiki/verification-modes.md b/wiki/verification-modes.md index 2474afbc7..c786c8d1d 100644 --- a/wiki/verification-modes.md +++ b/wiki/verification-modes.md @@ -108,7 +108,7 @@ file itself: `Bios::Scan` takes the composite for every `.zip` The registry gives Recalbox `zip_digest: composite`. For a platform so marked, a `.zip` entry is checked against its composite alone, by the resolver (`resolve_local_file`) and by the pack check (`digest_verdict` in -`scripts/resolve/validation.py`). On other platforms the ZIP file's direct MD5 is tried first +`scripts/resolve/acceptance.py`). On other platforms the ZIP file's direct MD5 is tried first and the composite after it. ### Multi-hash (Recalbox) @@ -449,7 +449,7 @@ pack verification apply the same rule. ### Variant search -`validated_choice()` (`scripts/resolve/validation.py`) decides the file a platform +`validated_choice()` (`scripts/resolve/acceptance.py`) decides the file a platform destination ships when the emulators reading that destination check it. The pack, verify and the install manifest all read it, so they name the same file.