Merge: pipeline stages run on their own OpenCode service with stage-only limits

This commit is contained in:
2026-11-04 14:12:38 +00:00
12 changed files with 977 additions and 15 deletions
+3
View File
@@ -144,6 +144,9 @@ func main() {
defer chats.Close()
}
srv := &http.Server{Addr: *addr, Handler: server.HandlerWithOptions(ctx, options, store), ReadHeaderTimeout: 5 * time.Second}
// Deferred before WaitRuns so it runs after the runs settle: the owned stage
// service is stopped only when no stage session is still active on it.
defer opencode.StopIdleStageService()
defer server.WaitRuns(srv.Handler)
go func() {
<-ctx.Done()