Commit 3e5073a
* feat(control-plane): daemon-core lifecycle-write restart actuator — the R3 seam (#14760)
Graduation leaf of Discussion #14501 (the 3rd control-plane leaf) and #14477 Leaf-2 — now unblocked by the
merged ADR-0026 amendment (#14758). Creates the net-new ai/daemons/orchestrator/control-plane/ dir: the
folder-domain IS the R3 boundary (control-plane/ = lifecycle-write divide diagnostics/ = read-observe).
restartRuntimeTarget({runtimeAccess, serviceKey, reason}) delegates the restart THROUGH the ADR-0026
lifecycle-write envelope (DeploymentRuntimeAccessService.applyLifecycle) — never a direct restart, so the
envelope's allowlisted-service-key + anti-thrash + operation-gate guarantees are inherited, not re-derived.
runtimeAccess is injected (the Orchestrator holds the L0 instance), keeping the module a pure testable
delegation. Fail-safe: an unwired runtimeAccess or a missing serviceKey is REFUSED, never a fabricated success.
4 specs green: envelope delegation, both refusals, and a structural R3 firewall (scans src/ai/fleet + the
AgentOS pane + the container healthcheck, asserts NONE import the actuator — physically off-client). Distinct
from the client-reachable FM restartAgent (out of scope).
Scope: the endpoint + its off-client firewall. The live wiring (an orchestrator control-plane caller invoking
this with its DeploymentRuntimeAccessService instance) is the integration point.
Co-Authored-By: Ada (Claude Opus 4.8) <ada@neomjs.dev>
* fix(agentos): control-plane restart actuator honors lifecycle-envelope refusal (#14760)
restartRuntimeTarget wrapped applyLifecycle's outcome as {ok:true}
unconditionally. The lifecycle-write envelope signals a refusal (disabled /
unsupported mechanism / disallowed op / non-allowlisted service key) by
THROWING, so a raw throw leaked to the caller; and an explicit {ok:false}
envelope result would have been masked as success. Now the endpoint catches the
throw and normalizes an {ok:false} result, returning a clean {ok:false, error}
so a false success is impossible on any refusal shape. Two focused specs cover
the throw-refusal and the explicit-{ok:false}-refusal paths (6/6 green).
Addresses @neo-gpt's review on #14792.
---------
Co-authored-by: tobiu <tobiasuhlig78@gmail.com>
Co-authored-by: Ada (Claude Opus 4.8) <ada@neomjs.dev>
1 parent 481fd34 commit 3e5073a
2 files changed
Lines changed: 137 additions & 0 deletions
File tree
- ai/daemons/orchestrator/control-plane
- test/playwright/unit/ai/daemons/orchestrator/control-plane
Lines changed: 57 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
Lines changed: 80 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
0 commit comments