docs: state the cross-reference settlement rule

reading-reports.md said the cross-reference checks whether a profile's files appear in the platform config, a rule by name. Since 2026-10-10 declaration_settles counts a declaration only at the core's slot or at a size the core accepts, and an alias only where the core reads it.
This commit is contained in:
Abdessamad Derraz committed 2026-11-05 19:55:39 +01:00
1 parent 911dea8e4c
commit 71457078e6
2 files changed
+27 -2

No files matched your search

+20
View File
@@ -1809,6 +1809,26 @@ class ClaimRuleNamesTheSizeProof(unittest.TestCase):
self.assertIn("Two files of equal size are revisions", section)
class CrossReferenceSettlesBySlotAndSize(unittest.TestCase):
"""reading-reports.md said the cross-reference checks whether a profile's
files "appear in the platform config", a by-name rule, while verify
settles a file only at its slot or at a size the core accepts."""
def test_the_page_states_the_rule_verify_reads(self):
from validation import declaration_settles
rom1 = {"name": "ROM1.BIN", "size": 32768, "validation": ["size"]}
self.assertFalse(declaration_settles(rom1, "ROM1.BIN", {"ROM1.BIN": [(4096, "rom1.bin")]},
dest="dosbox/ROM1.BIN"))
self.assertTrue(declaration_settles(rom1, "ROM1.BIN", {"ROM1.BIN": [(32768, "rom1.bin")]},
dest="dosbox/ROM1.BIN"))
page = " ".join((ROOT / "wiki" / "reading-reports.md").read_text(encoding="utf-8").split())
section = page.split("### Cross-reference section", 1)[1].split("###", 1)[0]
self.assertIn("declaration_settles()", section)
self.assertIn("A name alone is not enough", section)
self.assertNotIn("appear in the platform config", section)
class SkipFlagsNameTheSteps(unittest.TestCase):
"""--skip-packs said "add --skip-docs to stop after verify" while 4d and
4e still ran, and the flag table left 8b out of --skip-docs."""
+7 -2
View File
@@ -140,8 +140,13 @@ are still included in packs automatically. A required one the collection lacks
is listed under the counts, and `--verbose` lists the optional ones too.
The cross-reference uses `resolve_platform_cores()` to determine which emulator
profiles are relevant for each platform, then checks whether each profile's files
appear in the platform config.
profiles are relevant for each platform, then checks whether the platform
already declares each profile's files (`declaration_settles()`). A name alone
is not enough. The declaration must fill the core's own slot or have a size the
core accepts: Galaksija's 4 KiB `ROM1.BIN` does not stand for DOSBox's 32 KiB
SC-55 one. An alias counts only at the path where the core reads it, so
RetroDECK's root `MSX.ROM` is not CLK's `MSX/MSX.ROM`. An archive counts by its
name.
### Filtering output