Skip to content

Commit 8c8ace5

Browse files
PhlipPhlopsclaude
andcommitted
runtime: honour spec.hot-reload instead of always passing --reload
--reload restarted the app mid-request whenever anything under its tree changed; only pass it when hot-reload is true. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M8ryQdPThgWz4ktnLdz9nb
1 parent 97c9a08 commit 8c8ace5

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎runtime.go‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,12 @@ func (s *Runtime) Start(ctx context.Context, req *runtimev0.StartRequest) (*runt
363363
return s.Base.Runtime.StartError(s.Wool.NewError("runner environment not initialized (Init must run before Start)"))
364364
}
365365

366-
proc, err := s.runnerEnvironment.NewProcess(
367-
"uv", "run", "uvicorn", "src.main:app",
368-
"--reload", "--host", "0.0.0.0", "--port", fmt.Sprintf("%d", s.port))
366+
// Local patch (lodestar spike): honour spec.hot-reload instead of always passing --reload.
367+
args := []string{"run", "uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", fmt.Sprintf("%d", s.port)}
368+
if s.FastAPI.Settings.HotReload {
369+
args = append(args, "--reload")
370+
}
371+
proc, err := s.runnerEnvironment.NewProcess("uv", args...)
369372
if err != nil {
370373
return s.Base.Runtime.StartError(err)
371374
}

0 commit comments

Comments
 (0)