feat(supervisor): supervisor task with state machine

One async task per managed server owns all state transitions via a
tokio::select! loop over cmd_rx and wait_child. Includes RealSpawner
and a smoke test covering the Start → Running → exit → Stopped →
Shutdown happy path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-25 11:44:12 +02:00
co-authored by Claude Sonnet 4.6
parent f1b2306156
commit a3c979511e
3 changed files with 376 additions and 10 deletions
+4
View File
@@ -5,9 +5,13 @@ pub mod child;
pub mod logs;
pub mod policy;
pub mod retry_window;
pub mod supervisor;
pub use backoff::Backoff;
pub use child::{ChildHandle, MockChild, MockChildController, RealChild, spawn_with_logs};
pub use logs::{LogSink, RecordedLine, RingBuffer, RotatingLogWriter};
pub use policy::{RestartDecision, decide};
pub use retry_window::RetryWindow;
pub use supervisor::{
RealSpawner, Spawner, StartAck, StopAck, SupervisorCmd, SupervisorHandle, SupervisorTask,
};