fix: leave aliases out of the fileless audit

This commit is contained in:
Abdessamad Derraz committed 2026-10-18 07:41:54 +02:00
1 parent e660022628
commit e75482777d
3 files changed
+13

No files matched your search

+3
View File
@@ -4,6 +4,9 @@ alias_of: eden
core_classification: alias
source: "https://git.eden-emu.dev/eden-emu/eden"
upstream: "https://git.eden-emu.dev/eden-emu/eden"
# git.eden-emu.dev answers 403 to anything that is not a browser, so the
# Codeberg copy is what keeps this profile checkable.
source_mirror: "https://codeberg.org/eden-emu/eden"
source_commit: "8648c27cbb4c17b176076b09ac245271829cbd9f"
profiled_date: "2026-08-11"
core_version: "Git"
+4
View File
@@ -59,6 +59,9 @@ def audit(
document = yaml_load(handle) or {}
if document.get("files"):
return None
if document.get("type") == "alias":
# The same binary under another name: its files are its target's.
return None
if str(document.get("exclusion_note") or "").strip():
# Someone read this one and wrote down why nothing is declared. The
# check exists to find the profiles nobody has answered yet; an
@@ -91,6 +94,7 @@ def _settled_before_reading(document: dict) -> bool:
a declared data directory (see audit)."""
return bool(
document.get("files")
or document.get("type") == "alias"
or str(document.get("exclusion_note") or "").strip()
or document.get("data_directories")
)
+6
View File
@@ -94,6 +94,12 @@ class TestFilelessAudit(unittest.TestCase):
self._write(BASE + 'exclusion_note: "the directory is written, not read"\n')
self.assertIsNone(self._run())
def test_an_alias_has_no_files_of_its_own(self):
"""eden-nightly is eden under another name; it was swept and its
forge's 403 failed the run."""
self._write(BASE + "type: alias\nalias_of: other\n")
self.assertIsNone(self._run())
def test_an_empty_answer_does_not_settle_it(self):
self._write(BASE + 'exclusion_note: " "\n')
self.assertEqual(len(self._run()), 1)