From 3a612fc733dbaf0a6a852acc23b54357aeb5d75f Mon Sep 17 00:00:00 2001 From: autonomic-bot Date: Sat, 30 May 2026 21:49:08 +0000 Subject: [PATCH] =?UTF-8?q?fix(2):=20ghost=20BACKUP=5FVERIFY=20=E2=80=94?= =?UTF-8?q?=20drop=20=5F=5Ffile=5F=5F=20(recipe=5Fmeta=20is=20exec'd,=20no?= =?UTF-8?q?=20=5F=5Ffile=5F=5F);=20import=20harness=20directly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit full9: backup tier FAILed with NameError('__file__' not defined) — recipe_meta.py is exec()'d into a bare namespace so __file__ is undefined. The harness already has runner/ on sys.path + harness imported, so import lifecycle directly. (restore PASSED on full9 — the data-integrity fix works; this just fixes the verify probe crashing the backup tier.) Co-Authored-By: Claude Opus 4.8 (1M context) --- tests/ghost/recipe_meta.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/ghost/recipe_meta.py b/tests/ghost/recipe_meta.py index 84853e1..5543f0a 100644 --- a/tests/ghost/recipe_meta.py +++ b/tests/ghost/recipe_meta.py @@ -56,11 +56,9 @@ def BACKUP_VERIFY(domain): (P4 RED). This proves the dump completed: backup.sql.gz exists, is a VALID gzip, and is non-empty. Returning False makes the harness re-run the whole backup with a re-stabilised db (run_recipe_ci _perform_op). It is a READ-ONLY probe — it weakens no assertion; it only retries a flaky CAPTURE.""" - import os - import sys - - sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..", "runner")) - from harness import lifecycle # noqa: E402 + # NB: recipe_meta.py is exec()'d into a bare namespace (no __file__), so we CANNOT compute a path + # here. The harness already runs with runner/ on sys.path and `harness` imported, so import directly. + from harness import lifecycle try: out = lifecycle.exec_in_app(