"""custom-html-rst-bad — lifecycle ops for bad-restore RED canary. NO pre_backup hook: marker never seeded before backup → snapshot has no ci-marker.txt. pre_restore writes "mutated". After restore, marker stays "mutated" (not in snapshot) → FAIL. """ from __future__ import annotations from harness import lifecycle MARKER_PATH = "/usr/share/nginx/html/ci-marker.txt" def pre_restore(domain: str, meta: dict) -> None: lifecycle.exec_in_app(domain, ["sh", "-c", f"echo mutated > {MARKER_PATH}"])