From 73c165d60f63d6565d7ce522af45fc11f03210a3 Mon Sep 17 00:00:00 2001 From: kisfenyo Date: Mon, 26 Oct 2026 09:12:22 +0100 Subject: [PATCH] =?UTF-8?q?metube:=20media/metube=20optional=20=E2=80=94?= =?UTF-8?q?=20the=20second-drive=20copy=20carries=20the=20downloads,=20off?= =?UTF-8?q?-site=20does=20not=20(D44=20#25,=20felhom.eu=20R-1283;=20ported?= =?UTF-8?q?=20from=20drill=206733764);=20check-download-binds=20allows=20o?= =?UTF-8?q?ptional=20for=20a=20NAMED=20ruling=20only,=20with=20decoys?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 8 ++++++++ scripts/check-download-binds.py | 11 ++++++++++- scripts/test_gate_decoys.py | 4 ++++ templates/metube/.felhom.yml | 2 +- 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e0ff11..5584f80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## 2026-10-26 (attended release run) — MeTube's downloads ride the second-drive copy (D44 #25, R-1283) + +- `templates/metube/.felhom.yml`: `media/metube` `excluded` → `optional` — **D44 #25** (operator 2026-10-25, felhom.eu + R-1283): a video may be gone from its source site, so the second-drive copy carries it; off-site does not. Tried on the + drill first (`6733764`, a night test VM): the video's sha256 is in the second-drive copy. +- `scripts/check-download-binds.py`: a download folder may be `optional` only by a NAMED ruling (`OPTIONAL_BY_RULING`, + metube today); decoys in `scripts/test_gate_decoys.py`: optional by ruling passes, mandatory and unlisted are refused. + ## 2026-10-25 (attended release run) — n8n sends no usage data; OpenGist gets 256 MiB; Homepage behind the family gate (D46) - `templates/n8n/docker-compose.yml`: `N8N_DIAGNOSTICS_ENABLED=false` — no usage data leaves the home (catalog sweep diff --git a/scripts/check-download-binds.py b/scripts/check-download-binds.py index a223166..33690c0 100644 --- a/scripts/check-download-binds.py +++ b/scripts/check-download-binds.py @@ -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 diff --git a/scripts/test_gate_decoys.py b/scripts/test_gate_decoys.py index 99ce580..0336ce7 100644 --- a/scripts/test_gate_decoys.py +++ b/scripts/test_gate_decoys.py @@ -923,6 +923,10 @@ def download_binds_cases(): run("FACT: `class: excluded` only in a COMMENT, the field optional", {"dl/docker-compose.yml": compose([dl]), "dl/.felhom.yml": felhom([("media/dl", "optional")], comment=" # - path: media/dl\n # class: excluded\n")}, 1, ("optional",)) run("FACT: a /watch sub-folder optional under an excluded parent", {"dl/docker-compose.yml": compose([dl, "${USERDATA_PATH}/media/dl/watch:/watch"]), "dl/.felhom.yml": felhom([("media/dl", "excluded"), ("media/dl/watch", "optional")])}, 1, ("media/dl/watch",)) run("FACT: a target below /downloads", {"dl/docker-compose.yml": compose(["${USERDATA_PATH}/media/done:/downloads/complete"]), "dl/.felhom.yml": felhom([("media/done", "optional")])}, 1, ("media/done",)) + mt = "${USERDATA_PATH}/media/metube:/downloads" + run("GENUINE (R-1283): metube's folder optional by ruling", {"metube/docker-compose.yml": compose([mt]), "metube/.felhom.yml": felhom([("media/metube", "optional")])}, 0, ("every one",)) + run("FACT (R-1283): metube's folder mandatory — the ruling allows optional only", {"metube/docker-compose.yml": compose([mt]), "metube/.felhom.yml": felhom([("media/metube", "mandatory")])}, 1, ("templates/metube", "mandatory")) + run("FACT (R-1283): metube's folder UNLISTED", {"metube/docker-compose.yml": compose([mt]), "metube/.felhom.yml": felhom([("media/other", "excluded")])}, 1, ("UNLISTED",)) run("FACT: no download bind anywhere (nothing to judge)", {"dl/docker-compose.yml": compose(["${USERDATA_PATH}/media:/media:ro"]), "dl/.felhom.yml": felhom([("media", "excluded")])}, 3, ("nothing to judge",)) run("FACT: no templates/ at all (nothing to judge)", {}, 3, ("nothing to judge",), no_templates=True) finally: diff --git a/templates/metube/.felhom.yml b/templates/metube/.felhom.yml index ab48c97..ea49b4e 100644 --- a/templates/metube/.felhom.yml +++ b/templates/metube/.felhom.yml @@ -30,7 +30,7 @@ resources: backup: userdata: - path: media/metube - class: excluded # downloaded videos — can be downloaded again; large: no tier copies them (R-1019) + class: optional # D44 #25 (operator 2026-10-25, R-1283): a video may be gone from its source site — the second-drive copy carries it, off-site does not # --- Customer-facing folder annotation (R-75) --- data_paths: