RestartProjectOpencode host method + gRPC routing (#376) #392

Closed
opened 2026-07-19 10:33:17 +02:00 by dries · 0 comments
Owner

Parent

#388 (spec), #376. Spec AD-7.

What to build

An owner-routed restart action for a project's managed instance.

  • New hostsvc.Host method RestartProjectOpencode(ctx, req) that stops the tracked runtime instance (Runtime.Stop) then re-ensures (reusing the guarded EnsureProjectOpencode body), returning the new endpoint/instance.
  • Routed through hostsvc.Router.ForDir like EnsureProjectOpencode, so it executes on the host that owns the directory (local or remote).
  • Marshaled across the remote gRPC JSON seam (add the RPC alongside EnsureProjectOpencode); remote host + stubs implement it.

Acceptance criteria

  • RestartProjectOpencode stops the current instance then launches a fresh one and returns its endpoint.
  • Restart is owner-routed via ForDir and works for both local and remote native instances.
  • The reshaped result and the restart call marshal correctly across gRPC (remote roundtrip test).
  • Restart + remote-roundtrip tests. New code ships with tests.

Blocked by

  • #390 (reshape ensure seam + hardened body)
## Parent #388 (spec), #376. Spec AD-7. ## What to build An owner-routed restart action for a project's managed instance. - New `hostsvc.Host` method `RestartProjectOpencode(ctx, req)` that stops the tracked runtime instance (`Runtime.Stop`) then re-ensures (reusing the guarded `EnsureProjectOpencode` body), returning the new endpoint/instance. - Routed through `hostsvc.Router.ForDir` like `EnsureProjectOpencode`, so it executes on the host that owns the directory (local or remote). - Marshaled across the remote gRPC JSON seam (add the RPC alongside `EnsureProjectOpencode`); remote host + stubs implement it. ## Acceptance criteria - [ ] `RestartProjectOpencode` stops the current instance then launches a fresh one and returns its endpoint. - [ ] Restart is owner-routed via `ForDir` and works for both local and remote native instances. - [ ] The reshaped result and the restart call marshal correctly across gRPC (remote roundtrip test). - [ ] Restart + remote-roundtrip tests. New code ships with tests. ## Blocked by - #390 (reshape ensure seam + hardened body)
dries closed this issue 2026-07-19 18:10:58 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dries/ocman#392
No description provided.