fix(2): ghost BACKUP_VERIFY — drop __file__ (recipe_meta is exec'd, no __file__); import harness directly
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) <noreply@anthropic.com>
This commit is contained in:
@ -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(
|
||||
|
||||
Reference in New Issue
Block a user