Skip to content

Harden process lifecycle handling#11

Merged
sylvesterdamgaard merged 2 commits into
mainfrom
harden-process-lifecycle
Jun 29, 2026
Merged

Harden process lifecycle handling#11
sylvesterdamgaard merged 2 commits into
mainfrom
harden-process-lifecycle

Conversation

@sylvesterdamgaard

Copy link
Copy Markdown
Contributor

What changed

  • Wire global.process_start_timeout into manager startup paths.
  • Add a manager helper that bounds supervisor startup without tying child process lifetime to a timeout context.
  • Use the bounded start helper for initial startup, API/TUI starts, restarts, scaling from zero, and reload starts.
  • Replace direct parent-process kills with process-group SIGKILL for shutdown timeouts, health-check restarts, and memory-limit restarts.
  • Add coverage that NewManager honors configured ProcessStartTimeout.

Why

process_start_timeout existed in config but was not used. Forced restarts also only killed the parent process in several paths, despite children being started in their own process group.

Validation

  • git diff --check
  • go test ./internal/process could not be run locally because go is not installed in this environment.

@sylvesterdamgaard sylvesterdamgaard marked this pull request as ready for review June 29, 2026 07:30
@sylvesterdamgaard sylvesterdamgaard merged commit c2a87d3 into main Jun 29, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant