Errors, Process Cleanup, and Shutdown
RuntimeError describes recoverable operating failures from sources,
filtering, process operations, and full channels. The bounded error channel
feeds a configurable hook. That hook may place a CriticalError into a
one-assignment cell, explicitly upgrading severity.
Critical failure belongs to the worker set. A graceful exit closes the event
channel; unexpected critical errors terminate the main task. When the action
worker ends, the main task shuts down the remaining JoinSet workers.
Graceful process shutdown is a protocol:
- send the configured signal to the process group;
- install a monotonic grace timer;
- continue admitting urgent/high controls;
- convert timer expiry into forceful
Stopor restart; - await and reap the child;
- raise completion flags and delete the job.
The CLI escalates repeated quit requests from graceful signal, to immediate
force-stop, to abort. Process completion is converted back into an event, so
--exit-on-error and queued reruns re-enter the same serialized policy path.