Skip to content

[Fix] Self-hosted tasks stuck at Booting environment with fetch failed#556

Draft
roomote-roomote[bot] wants to merge 1 commit into
developfrom
fix/docker-worker-control-plane-trpc-12jlfovikseml
Draft

[Fix] Self-hosted tasks stuck at Booting environment with fetch failed#556
roomote-roomote[bot] wants to merge 1 commit into
developfrom
fix/docker-worker-control-plane-trpc-12jlfovikseml

Conversation

@roomote-roomote

Copy link
Copy Markdown
Contributor

Opened on behalf of Matt Rubens. View the task or mention @roomote-roomote for follow-up asks.

Related issue

Fixes #555

Why this PR exists

  • A maintainer explicitly invited this PR in the linked issue or discussion
  • I am a maintainer / this is internal Roomote work

What changed

Self-hosted Docker tasks no longer die immediately at boot with fetch failed when the deployment’s public TRPC_URL cannot be reached from the task sandbox.

When DOCKER_WORKER_NETWORK is set, the controller now injects the in-network API alias (http://api:3001) as the worker TRPC_URL instead of forwarding a public reverse-proxy URL. Already in-network api hostnames are kept; local Docker without a control network still rewrites localhost to host.docker.internal.

Note for operators: TRPC_URL / AUTH_TOKEN are still passed via docker exec -e, so they intentionally do not appear in docker inspect Config.Env. Missing inspect values alone do not mean spawn skipped env injection.

How it was tested

  • @roomote/controller Vitest: spawn-docker-worker.test.ts (22 passed), including control-plane TRPC URL cases
  • @roomote/controller check-types
  • Pre-push suite (oxlint, residual eslint, check-types:fast, knip)

Checklist

  • The PR title follows the repo convention: [Fix], [Feat], [Improve], [Refactor], [Docs], or [Chore] followed by a user-facing description
  • This PR is small and scoped to one change
  • pnpm lint and pnpm check-types pass locally
  • I added tests or included a clear manual validation note above
  • I removed secrets, tokens, private keys, and customer data from code, logs, and screenshots
  • If this change should appear in the changelog, I ran pnpm changeset

Linked work items

Closes #555

Self-hosted sandboxes with DOCKER_WORKER_NETWORK blackhole the docker
gateway, so public TRPC_URL values fail with fetch failed at boot.
@roomote-roomote

roomote-roomote Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

No code issues found. See task

Reviewed 8adf130

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Worker containers missing TRPC_URL/AUTH_TOKEN env vars — task stuck at 'Booting environment'

1 participant