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."""