#!/usr/bin/env python3 """Run the canonical remote AWS manifest filter from a repository checkout.""" from __future__ import annotations import os import pathlib import runpy def canonical_filter() -> pathlib.Path: configured = os.environ.get("CP9_REMOTE_AWS_MANIFEST_FILTER", "").strip() if configured: return pathlib.Path(configured) for parent in pathlib.Path(__file__).resolve().parents: candidate = parent / "internal/lifecycle/remote_aws_manifest_filter.py" if candidate.is_file(): return candidate raise SystemExit("canonical remote AWS manifest filter was not found in a repository parent") runpy.run_path(str(canonical_filter()), run_name="__main__")