From 517471605a7195d05d8e48ece58f29c5302690c8 Mon Sep 17 00:00:00 2001 From: Paul Payne Date: Fri, 16 Oct 2026 10:42:54 -0700 Subject: [PATCH] core: drop two manifest fields that were never wired up MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `SystemdSpec.readiness` (ReadinessHttpGet) and `SystemdSpec.requires` were parsed and validated but read nowhere — no generator, CLI or API touched either. Both looked load-bearing and were not: - readiness duplicated `expose.http.health_path`, which wildpc-api already polls. wild-life-api.yaml declared both spellings of the same /health probe; only one did anything. - requires would mean systemd `Requires=`, a lifecycle binding (stop postgres, stop every dependent). `manage.systemd.after` already gives the ordering callers actually want, and a deployment's own `requires:` is the relationship model, not systemd wiring. Unknown keys parse as ignored, so existing deployment YAML keeps loading. --- cli/src/wildpc_cli/manifest.py | 1 - core/src/wildpc_core/manifest.py | 14 +++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/cli/src/wildpc_cli/manifest.py b/cli/src/wildpc_cli/manifest.py index 91a1757..20b9841 100644 --- a/cli/src/wildpc_cli/manifest.py +++ b/cli/src/wildpc_cli/manifest.py @@ -18,7 +18,6 @@ from wildpc_core.manifest import ( # noqa: F401 — explicit re-exports for typ PathDeployment, ProgramSpec, Reach, - ReadinessHttpGet, RemoteDeployment, Requirement, RestartPolicy, diff --git a/core/src/wildpc_core/manifest.py b/core/src/wildpc_core/manifest.py index 70d4696..cbe2254 100644 --- a/core/src/wildpc_core/manifest.py +++ b/core/src/wildpc_core/manifest.py @@ -142,19 +142,16 @@ LaunchSpec = Annotated[ # --------------------- -class ReadinessHttpGet(BaseModel): - http_get: str - timeout_seconds: int = 2 - interval_seconds: int = 2 - success_codes: list[int] = Field(default_factory=lambda: [200]) - - class SystemdSpec(BaseModel): enable: bool = True user: bool = True description: str | None = None + # Unit ordering (systemd ``After=``). There is deliberately no ``requires:`` + # partner emitting ``Requires=``: that binds lifecycles, so stopping postgres + # would stop everything downstream, and ordering is what callers actually + # want. A deployment's own ``requires:`` list is the relationship model (see + # docs/relationships.md), not systemd wiring. after: list[str] = Field(default_factory=list) - requires: list[str] = Field(default_factory=list) wanted_by: list[str] = Field(default_factory=lambda: ["default.target"]) restart: RestartPolicy = RestartPolicy.ON_FAILURE restart_sec: int = 2 @@ -172,7 +169,6 @@ class SystemdSpec(BaseModel): start_limit_burst: int = 10 start_limit_interval_sec: int = 3600 no_new_privileges: bool = True - readiness: ReadinessHttpGet | None = None exec_reload: str | None = None # Commands run after the main process starts (systemd ``ExecStartPost=``), one # line each — e.g. an OpenBao auto-unseal step. Failures don't fail the unit.