Cells outlive the host (FORGE_CELLS_OUTLIVE=on)
Off by default. With it on, a child's cell runs its proxy and relays in a supervisor of its own and is not tied to this process: stopping the host leaves the cell running (#13755).
On start the host takes its cells back (#13756). Each supervised cell writes children/<body>/cell.json (pid, port, supervisor control directory, start time, name, size) as soon as it is spawned, and clears it when it exits. At boot the host reads every record and, for each:
- the pid must still be the cell its supervisor names (
cell.pidin the control directory, pid and start time), so a reused pid is never adopted or signalled; - the port must answer. A cell that is its supervisor's but silent is stopped and its record cleared, since nothing else would reap it;
- otherwise the cell is held in the registry as if this host had started it. A start for the same body waits for adoption to finish and finds the adopted cell, never a second one. The record is cleared when the cell goes.
Not yet: the beat door still runs in the host, egress bytes of an outliving cell are not in the host's gauges (#13921), and there is no terminal view of adopted cells; they appear in the registry and the log (child forge adopted).