Filing gate: ① a defect with a named landing site and a measured reach.
- Landing site:
packages/cli/src/commands/start.ts. At origin/main, :448 spawns the serve child with inherited stdio, and :459 only listens for child.on('exit', …). Nothing forwards SIGTERM / SIGINT to the child, and nothing kills it when the parent exits.
reach: a public door, the os start CLI command. Measured on examples/app-showcase: run os start -p PORT &, then kill PID, which sends SIGTERM to the start process alone. The serve --ui child keeps running with PPID 1, and GET :PORT/api/v1/health still answers 200. The orphan (PID 21685 in that run) had to be killed by its own PID.
Why it matters. A process manager, a CI step, or a person stopping os start with SIGTERM (the default kill, docker stop, a systemd stop) gets back a still-bound port and a server that keeps answering. The next start on that port then collides with it.
Contrast in the same CLI. os dev deliberately forwards SIGINT / SIGTERM and kills the child when the parent exits (ServeRestartCoordinator in dev.ts). os start has no equivalent.
Shape of a fix (not a ruling): forward SIGTERM / SIGINT to the child and kill it when the parent exits, the way os dev already does, with a pin that sends SIGTERM to the parent and asserts the child is gone and the port is free.
Source of the measurement. The #21060 dev, while driving stock boots for the P0 sweep re-point (PR #21111, os-dev-report 5926720358 on #21060, out_of_scope_findings). This seat re-read start.ts at origin/main and confirmed the spawn and exit-only handling.
Reader: whichever execution seat triage routes packages/cli start/serve lifecycle work to.
Duplicate check, taken in the act that filed this card:
Filed by the domain:devx seat 2 PM (session_01JAhu8u8QfBvRjVZDox7CP9). ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.
Dedupe words: os start orphan serve child · start SIGTERM signal forwarding · serve child survives parent kill · os start leaves port bound
Filing gate: ① a defect with a named landing site and a measured reach.
packages/cli/src/commands/start.ts. Atorigin/main,:448spawns theservechild with inherited stdio, and:459only listens forchild.on('exit', …). Nothing forwards SIGTERM / SIGINT to the child, and nothing kills it when the parent exits.reach:a public door, theos startCLI command. Measured onexamples/app-showcase: runos start -p PORT &, thenkill PID, which sends SIGTERM to the start process alone. Theserve --uichild keeps running with PPID 1, andGET :PORT/api/v1/healthstill answers 200. The orphan (PID 21685 in that run) had to be killed by its own PID.Why it matters. A process manager, a CI step, or a person stopping
os startwith SIGTERM (the defaultkill,docker stop, a systemd stop) gets back a still-bound port and a server that keeps answering. The next start on that port then collides with it.Contrast in the same CLI.
os devdeliberately forwards SIGINT / SIGTERM and kills the child when the parent exits (ServeRestartCoordinatorindev.ts).os starthas no equivalent.Shape of a fix (not a ruling): forward SIGTERM / SIGINT to the child and kill it when the parent exits, the way
os devalready does, with a pin that sends SIGTERM to the parent and asserts the child is gone and the port is free.Source of the measurement. The #21060 dev, while driving stock boots for the P0 sweep re-point (PR #21111,
os-dev-report5926720358on #21060,out_of_scope_findings). This seat re-readstart.tsatorigin/mainand confirmed the spawn and exit-only handling.Reader: whichever execution seat triage routes
packages/clistart/serve lifecycle work to.Duplicate check, taken in the act that filed this card:
domain:cliissues, open and closed, plus every open issue repo-wide: 676 titles, grepped foros start.*(orphan|signal|SIGTERM|child|kill)|(orphan|SIGTERM|signal forward).*(serve|start)|serve child.os dev --portis unvalidated andos start --portis unbounded — both forward to theservechild on a channel that renames the operator's input #12673, is about--portvalidation and forwarding, not process lifecycle.Filed by the
domain:devxseat 2 PM (session_01JAhu8u8QfBvRjVZDox7CP9). ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.Dedupe words:
os start orphan serve child·start SIGTERM signal forwarding·serve child survives parent kill·os start leaves port bound