Skip to content

fix(deploy): read port from .env instead of inherited DISPATCH_PORT#8

Merged
selfcontained merged 1 commit into
mainfrom
fix/deploy-health-port-resolution
Mar 10, 2026
Merged

fix(deploy): read port from .env instead of inherited DISPATCH_PORT#8
selfcontained merged 1 commit into
mainfrom
fix/deploy-health-port-resolution

Conversation

@selfcontained

Copy link
Copy Markdown
Owner

Summary

  • Deploy health checks were failing because agent shells inherit DISPATCH_PORT from spawn time, which can be stale after a port default change
  • All three scripts (dispatch-deploy, dispatch-server, dispatch-release) now read the port from the server's .env file as the authoritative source
  • Falls back to DEFAULT_PORT only if .env is missing

Test plan

  • Verified resolve_port returns 6767 from .env even when DISPATCH_PORT=8787 is in the environment
  • Health check passes against running server with the fix
  • Full launchctl unload/load restart cycle: server came back healthy on attempt 3 (~5s)

🤖 Generated with Claude Code

Deploy health checks were failing because agent shells inherit
DISPATCH_PORT from when they were spawned, which may be stale
(e.g. 8787 after the default changed to 6767). The scripts now
read the port from the server's .env file as the authoritative
source, falling back to DEFAULT_PORT only if .env is missing.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@selfcontained
selfcontained force-pushed the fix/deploy-health-port-resolution branch from 84ad91b to 601407b Compare March 10, 2026 03:50
@selfcontained
selfcontained merged commit 852d147 into main Mar 10, 2026
1 check passed
@selfcontained
selfcontained deleted the fix/deploy-health-port-resolution branch April 9, 2026 03:01
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.

1 participant