refactor(pipelock): prepare_proxy returns a ProxyPlan

Add a frozen ProxyPlan dataclass to pipelock.py (currently one field:
yaml_path; kept as a class so future proxy-level state has a home).

  - prepare_proxy(spec, stage_dir) now returns pipelock.ProxyPlan
    instead of a raw Path.
  - DockerBottlePlan replaces pipelock_yaml_path + pipelock_yaml_filename
    with a single proxy: ProxyPlan field.
  - launch reads plan.proxy.yaml_path.parent / .name when calling
    pipelock_start. Eventually pipelock_start should just take a Path
    but that's a separate change.
This commit is contained in:
2026-05-11 01:26:38 -04:00
parent 1b8d3bbb94
commit c2cdb7777d
3 changed files with 21 additions and 11 deletions
+10
View File
@@ -15,6 +15,7 @@ from __future__ import annotations
import os
import re
import subprocess
from dataclasses import dataclass
from pathlib import Path
from .log import die, info, warn
@@ -123,6 +124,15 @@ def pipelock_allowlist_summary(manifest: Manifest, bottle_name: str) -> str:
# --- Proxy class -----------------------------------------------------------
@dataclass(frozen=True)
class ProxyPlan:
"""Output of a proxy's prepare step; consumed by launch when the
proxy needs to be brought up. Currently single-field (the on-host
yaml path); kept as a dataclass so future proxy state has a home."""
yaml_path: Path
class PipelockProxy:
"""The pipelock egress proxy. Encapsulates the YAML-config
generation (and is the natural home for any future proxy-level