Description
down stops the containers and the pidfile-tracked processes, but the Vite dev server survives
and keeps listening on 3012. Its fallback pkill -f "vite --host localhost --port 3012" never
matches: app:dev passes its flags after --, so the real argv is
vite -- --host localhost --port 3012 --strictPort. stop_pidfile misses it too, because
pkill -P kills only direct children and vite is a grandchild of the recorded pid.
Steps to reproduce
- Start Docker, then run
./scripts/dev-stack.sh up
- Wait for "Stack is up" and confirm http://localhost:3012 answers
- Run
./scripts/dev-stack.sh down
- Run
lsof -nP -iTCP:3012 -sTCP:LISTEN and see a node process still listening
Expected vs actual behavior
Expected: down frees 3010-3013 and its own port report prints (all free).
Actual: a node process still holds 3012, down's own report lists it, and the next up
warns "Port 3012 already in use" and skips the dApp.
Environment
Observed 2026-09-08 while running the stack on feat/185-dev-stack-no-dpm
The pkill pattern dates from 1dfa3ce (2026-06-11), unrelated to the token-forge migration
Additional context
Killing the recorded pid's whole process group would reach the grandchild; matching the real
argv would fix the fallback.
Description
downstops the containers and the pidfile-tracked processes, but the Vite dev server survivesand keeps listening on 3012. Its fallback
pkill -f "vite --host localhost --port 3012"nevermatches:
app:devpasses its flags after--, so the real argv isvite -- --host localhost --port 3012 --strictPort.stop_pidfilemisses it too, becausepkill -Pkills only direct children and vite is a grandchild of the recorded pid.Steps to reproduce
./scripts/dev-stack.sh up./scripts/dev-stack.sh downlsof -nP -iTCP:3012 -sTCP:LISTENand see a node process still listeningExpected vs actual behavior
Expected:
downfrees 3010-3013 and its own port report prints(all free).Actual: a node process still holds 3012,
down's own report lists it, and the nextupwarns "Port 3012 already in use" and skips the dApp.
Environment
Observed 2026-09-08 while running the stack on feat/185-dev-stack-no-dpm The pkill pattern dates from 1dfa3ce (2026-06-11), unrelated to the token-forge migrationAdditional context
Killing the recorded pid's whole process group would reach the grandchild; matching the real
argv would fix the fallback.