kind is a deployment property, not a program property
A program has no single kind — it HAS deployments, each with its own kind (a
program can be a tool AND a job, e.g. protonmail). Remove program-level kind:
- core: drop ProgramSpec.kind; CastleConfig.kind_of → deployments_of(name) →
[(deployment-name, kind)]; tools property derives from a tool deployment.
- api: ProgramSummary drops kind/services/jobs → deployments: [{name, kind}];
/programs?kind= filters by deployment-kind membership; a program's legacy
DeploymentSummary carries kind=None.
- cli: list/info show a program's set of deployment kinds; --kind filters by
membership.
Also: Services page now covers statics — /services returns kind in
{service, static} (both are exposed, URL-reachable 'services', caddy vs systemd),
and ServiceSummary gains kind + manager to distinguish them.
Suites: core 124, cli 25, castle-api 58.
This commit is contained in:
@@ -42,10 +42,10 @@ class TestAdd:
|
||||
)
|
||||
rc, config = _run_add(castle_root, target=str(repo))
|
||||
assert rc == 0
|
||||
# `add` adopts source only (kind is derived from a deployment declared
|
||||
# later); a fastapi project is detected as the python-fastapi stack.
|
||||
# `add` adopts source only — no deployment yet (kind is a deployment
|
||||
# property); a fastapi project is detected as the python-fastapi stack.
|
||||
assert config.programs["svc"].stack == "python-fastapi"
|
||||
assert config.programs["svc"].kind is None
|
||||
assert config.deployments_of("svc") == []
|
||||
|
||||
def test_adopt_rust_declares_commands(self, castle_root: Path, tmp_path: Path) -> None:
|
||||
repo = tmp_path / "rusty"
|
||||
|
||||
Reference in New Issue
Block a user