Copies of helpers the first pass created, replaced by the helper:
- source_yaml_file for our YAML sources (generate_db read them in the
locale's encoding, a syntax error named no file);
- data_dir_registry_at in registry_bundles, platform_registry_at (new,
beside load_platform_registry) in the manifest;
- DATA_DIRS_FILE for the registry path five modules spelled;
- load_optional_database, sha1_at, VERSIONS_FILE, installer_module;
- DerivedView where a cache was keyed by id() of a dict;
- count_text and series where a plural or a list was written by hand.
Test modules passed dir= the repository's tmp/ or a hard-coded tmp/tests by hand, and seven modules kept their own _tempdir copy. Under run_tests.py the literal tmp/tests did not exist in a fresh clone (FileNotFoundError in test_core_probe and scratch_checkout), and dir=tmp/ wrote beside the per-module scratch folders. Every temporary directory now lands in the folder tests/__init__ sets, and scratch_dir() replaces the copies. The X socket binds by a relative name, since a scratch path can exceed the 108-byte AF_UNIX limit. The journeys keep the short tmp/ root: their word budgets count the printed card path.
core: cli (run_cli, input errors, name hints), github (token), paths.
model: sources, database, composition, registry, platforms,
declarations, targets, systems, profiles, cliargs. resolve: content,
ownership, datadirs, archives, localfile, directories, layout,
contentlayout, standalone, grouping, cores.
Definitions move verbatim; common.py and its re-exports are gone and
every importer, patch target and code-in-string names the new home. A
test that stubbed common.load_platform_config stubs each module that
reads the loader by its own name.
core: hashing, artifacts, ziptools, deterministic_zip, romdir, sect233r1,
crypto_verify, paths (REPO_ROOT). model: safeparse (needs yaml),
dumpcatalog, largefiles, alternatives. resolve: nativemode, validation,
launchers, slot, truth, gamedata, and exporter/baseline.py and
exporter/candidates.py as resolve/reconcile.py and resolve/categories.py,
which truth and gamedata read.
Every importer follows. Modules one level deeper read the repository
root from core.paths instead of __file__.
tests/__init__ now puts the repository root and scripts/ on sys.path,
so no test module inserts them and every import sits in the import
block. ruff accepts the bare `import tests` the modules keep for its
side effects. The last suppressions go: helper test modules import as
tests.<name>, files open in with blocks, lambdas become functions.
tests/__init__.py keeps a run offline, its scratch under tmp/ and its
installer cache its own, but only discover -s tests -t . imported it.
discover tests ran with RETROBIOS_OFFLINE unset, scratch on the /tmp
tmpfs and the user's real installer cache, the setting in which e2e
fixtures had written into the shared .cache/large. Every test module now
imports the package first, and a test fails on a module that does not.
test_verify_listing.py took its line with the previous commit.
RetroPie was the only platform with status: archived, which kept it out
of verify --all, slots, the pipeline and list_platforms unless
--include-archived was typed. release_pack already decides which packs a
release publishes and the installer serves every platform, so the status
set nothing apart. The field, its schema entry and the flag are gone, and
RetroPie is covered by every full run like any other platform.
generate_emulator_pack resolves with offline=offline and fetches a release asset the cache lacks, while verify_emulator resolved offline and called it missing. verify --emulator now applies pending_release_asset as verify --platform does, accepts --offline, and the pipeline compares emulator packs offline on both sides.
verify resolved offline, so a release asset absent from bios/ and the
cache read as missing while an online build fetched and packed it. verify
now reads the database record of the registered path and counts such a
declaration present, listed as fetched at build time. --offline keeps the
old count, and the offline pipeline passes it to its verify step.