api: POST /apply converge endpoint; enabled in summaries

- Replace POST /deploy with POST /apply (name + plan), returning the
  enacted diff (activated/restarted/deactivated/unchanged). /config/apply
  now delegates to core apply() too, so there's one convergence path.
- Retire /services/{name}/start and /stop (keep /restart as the
  imperative bounce). Drop install/uninstall from program actions — tool/
  static activation is convergence now.
- Surface `enabled` on ServiceSummary/JobSummary/DeploymentSummary so the
  UI can show and toggle desired state.
- conftest: drop the obsolete config_editor.get_registry patch (apply_config
  no longer reads the registry directly).

59 API tests pass; route table shows /apply (no /deploy), /restart only.
This commit is contained in:
2026-07-02 11:41:00 -07:00
parent d0a206f7d6
commit 5d15d18e1d
8 changed files with 86 additions and 70 deletions

View File

@@ -21,14 +21,14 @@ def list_stacks() -> list[str]:
# Unified program action endpoint
# ---------------------------------------------------------------------------
# Dev verbs only. Activation (install/uninstall of tools/statics) is convergence:
# it happens through `POST /apply`, not as a program action.
_VALID_ACTIONS = {
"build",
"test",
"lint",
"type-check",
"check",
"install",
"uninstall",
}