Derive program behavior from deployments; stop persisting it
behavior (tool/daemon/frontend) is now a derived display label computed from a program's deployments — path->tool, static->frontend, process->daemon (behavior_for_runner). load_config populates it so every reader gets the live value; _spec_to_yaml_dict excludes it so it is never written to disk. _summary_from_service derives it from the runner instead of hardcoding daemon. Fixtures gain path/python deployments so tool/daemon behaviors derive.
This commit is contained in:
@@ -31,14 +31,25 @@ def castle_root(tmp_path: Path) -> Generator[Path, None, None]:
|
||||
"programs": {
|
||||
"test-tool": {
|
||||
"description": "Test tool",
|
||||
"behavior": "tool",
|
||||
},
|
||||
"test-daemon": {
|
||||
"description": "Test daemon program",
|
||||
"behavior": "daemon",
|
||||
},
|
||||
},
|
||||
"services": {
|
||||
# A path deployment — its `path` runner makes test-tool's behavior
|
||||
# derive as "tool" (behavior is derived from deployments, not stored).
|
||||
"test-tool": {
|
||||
"program": "test-tool",
|
||||
"run": {"runner": "path"},
|
||||
},
|
||||
# A process deployment — its systemd-managed runner makes test-daemon's
|
||||
# behavior derive as "daemon".
|
||||
"test-daemon": {
|
||||
"program": "test-daemon",
|
||||
"run": {"runner": "python", "program": "test-daemon"},
|
||||
"manage": {"systemd": {}},
|
||||
},
|
||||
"test-svc": {
|
||||
"program": "test-svc-comp",
|
||||
"description": "Test service",
|
||||
|
||||
Reference in New Issue
Block a user