Skip to content

dev-proxy: rebuild() uses execSync and blocks the supervisor for the length of the build #748

Description

@debugmcpdev

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions