metube: media/metube optional — the second-drive copy carries the downloads, off-site does not (D44 #25, felhom.eu R-1283; ported from drill 6733764); check-download-binds allows optional for a NAMED ruling only, with decoys
gates / gates (push) Successful in 56s

This commit is contained in:
admin committed 2026-10-26 09:12:22 +01:00
1 parent cd0cf48fab
commit 73c165d60f
4 files changed
+23 -2

No files matched your search

+10 -1
View File
@@ -28,6 +28,12 @@ import sys
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DOWNLOAD_TARGETS = ("/downloads", "/watch")
# R-1283 (operator D44 #25, 2026-10-25; felhom.eu `architecture/15-media-library.md` §7): a download folder the operator
# ruled worth a second-drive copy. It may be `optional` (Tier 2 copies it, off-site does not) — never mandatory and never
# unlisted. Only by a ruling named here; every other download client stays `excluded`.
OPTIONAL_BY_RULING = {
"metube": "a MeTube video may be gone from its source site, so it cannot be fetched again (D44 #25, R-1283)",
}
BIND = re.compile(r"""^\s*-\s*["']?\$\{USERDATA_PATH\}/([^:"'\s]+):([^:"'\s]+)""")
@@ -114,6 +120,8 @@ def main(argv):
for folder in folders:
cls = classes.get(folder)
judged.append("%s:%s=%s" % (app, folder, cls or "UNLISTED"))
if cls == "optional" and app in OPTIONAL_BY_RULING:
continue # the ruling's one allowed class besides excluded (R-1283)
if cls != "excluded":
why = ("UNLISTED in backup.userdata — the controller classes it MANDATORY (every tier, off-site included)"
if cls is None else "declared `%s` — %s" % (cls, "a nightly copy on the second drive" if cls == "optional" else "copied by the backup"))
@@ -126,7 +134,8 @@ def main(argv):
for b in bad:
print(" " + b)
return 1
print("download-binds gate OK — %d download folder(s), every one `excluded`: %s" % (len(judged), ", ".join(judged)))
print("download-binds gate OK — %d download folder(s), every one `excluded` or `optional` by a named ruling (%s): %s"
% (len(judged), ", ".join(sorted(OPTIONAL_BY_RULING)), ", ".join(judged)))
return 0