Summary
BackendManager.rebuild() in tools/dev-proxy/dev-proxy.mjs runs the build with execSync, so the proxy's event loop is blocked for the whole build — up to DEV_PROXY_BUILD_TIMEOUT_MS (120 s by default, longer on a cold docker rebuild). For that window:
What would help
rebuild() awaits exec/spawn with the same timeout/maxBuffer and the same sanitized-tail contract for the failure and timeout messages. rebuildThenRestart already runs on the lifecycle queue, so the build stays serialized with restarts; the only change in behaviour is that unrelated requests (status, shutdown) are served while it runs. The two integration cases in tests/integration/dev-proxy-startup.test.ts (failed build, hanging build) pin the message contract.
Raised by the review of PR #745; not done there because it changes the supervisor's concurrency model rather than the lint gate the PR is about.
Summary
BackendManager.rebuild()intools/dev-proxy/dev-proxy.mjsruns the build withexecSync, so the proxy's event loop is blocked for the whole build — up toDEV_PROXY_BUILD_TIMEOUT_MS(120 s by default, longer on a cold docker rebuild). For that window:dev_server_statuscannot answer (the request sits in the transport until the build returns);datahandlers cannot drain, so a backend that logs heavily during the build fills its pipe (64 KiB on Linux) and blocks on write until the build ends;execSyncreturns, delaying the shutdown handler'sbackend.stop()— the orphan class Windows: process tree leaks — dev-proxy and backends outlive their parents; only the proxy tier self-reaps #122 was about.What would help
rebuild()awaitsexec/spawnwith the sametimeout/maxBufferand the same sanitized-tail contract for the failure and timeout messages.rebuildThenRestartalready runs on the lifecycle queue, so the build stays serialized with restarts; the only change in behaviour is that unrelated requests (status, shutdown) are served while it runs. The two integration cases intests/integration/dev-proxy-startup.test.ts(failed build, hanging build) pin the message contract.Raised by the review of PR #745; not done there because it changes the supervisor's concurrency model rather than the lint gate the PR is about.