Clarify sidecar restart and shutdown semantics #126
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Issue #117 identifies
bot_bottle/sidecar_init.pyas a complexity hotspot. The concrete concern from didericis-claude's review is that the SIGUSR1 handler callssup.restart_daemon("pipelock")directly from signal context. That path can runsubprocess.Popen, create threads, terminate processes, and wait with a timeout while the signal handler is executing. In CPython signals run between bytecodes in the main thread, but the current shape still lets restart work block the supervisor loop and makes stacked signals harder to reason about.The same review also notes that
exit_code()documents graceful shutdown as returning 0, but a child that crashed before shutdown can still make the aggregate code nonzero.Desired outcome
Add a PRD for tightening sidecar restart and shutdown semantics without changing the sidecar contract unnecessarily. The PRD should cover:
Parent context
Carved out from the broader hotspot review in #117.