Part of #2914 (one click from a stranger to their own forge).
Today a hosted child is a second App inside the parent's process (spawn/host.ts), so no forge has resources of its own. Add a cell placement beside hosted behind the placement seam (spawn/placement.ts):
The child's forge runs as a separate bun src/main.ts with its data dir, under apps/contain.ts with its size's (#2925) memory, CPU and disk as the cell's limits.
It starts from childEnv (invariant 11). The parent's proxy keeps answering <name>--<host> by forwarding to the child's socket.
hosted stays the fallback where the host cannot hold a cell, and the forge says which one it used.
Done when a child made with size: small is a process in a cell with the small limits, a restart of the parent brings it back, retire stops it, and a test (skipped with a reason where cells are not available) proves the limits are applied. Too big for one run? Split the proxy and the lifecycle into their own issues.
Part of #2914 (one click from a stranger to their own forge).
Today a hosted child is a second
Appinside the parent's process (spawn/host.ts), so no forge has resources of its own. Add acellplacement besidehostedbehind the placement seam (spawn/placement.ts):bun src/main.tswith its data dir, underapps/contain.tswith its size's (#2925) memory, CPU and disk as the cell's limits.childEnv(invariant 11). The parent's proxy keeps answering<name>--<host>by forwarding to the child's socket.hostedstays the fallback where the host cannot hold a cell, and the forge says which one it used.Done when a child made with
size: smallis a process in a cell with the small limits, a restart of the parent brings it back, retire stops it, and a test (skipped with a reason where cells are not available) proves the limits are applied. Too big for one run? Split the proxy and the lifecycle into their own issues.