Skip to content

Fix multi-env prod ports: 70xxx exceeds 65535, use 60xxx#49

Merged
aaronVerones merged 1 commit into
mainfrom
fix-prod-port-band
Jul 3, 2026
Merged

Fix multi-env prod ports: 70xxx exceeds 65535, use 60xxx#49
aaronVerones merged 1 commit into
mainfrom
fix-prod-port-band

Conversation

@aaronVerones

Copy link
Copy Markdown
Contributor

Bug

v1.6.0's multi-env prod band was 70xxx (70000–70999), which is above the maximum TCP port (65535). The OS can't bind those ports, so IsPortAvailable returned false and strict mode reported every prod service as "already in use". Result: with --multi-env, all dev forwards (50xxx, valid) worked and all prod forwards (70xxx) failed — confirmed on a real run (a bind() on 70102 raises port must be 0-65535).

Fix

  • Prod band → 60xxx (prod = dev + 10000; same last three digits, only the 50/60 prefix differs, e.g. extractor-config-service = 50102 dev / 60102 prod). Max port is now 60402, well within range.
  • Startup validation: --multi-env now rejects any localPort outside 1–65535 (and an environment with no context) at load, with a clear message — so this class of mistake fails fast instead of surfacing as a misleading "port already in use".
  • Tests updated to the 60xxx band + a validation test; README/config-header updated.

Verified: 60xxx ports bind cleanly; go test ./... green.

🤖 Generated with Claude Code

The prod band shipped in v1.6.0 was 70xxx (70000-70999), which is above the
maximum TCP port (65535). The OS refuses to bind those ports, so IsPortAvailable
returned false and strict mode reported every prod service as "already in use" —
all prod forwards failed while dev (50xxx, valid) worked.

- Move the prod band to 60xxx (prod = dev + 10000; same last three digits, only
  the 50/60 prefix differs). All ports now <= 60402, well within range.
- Add multi-env config validation that rejects a localPort outside 1-65535 (and
  an environment with no context) at load, with a clear message instead of a
  misleading "port already in use" later.
- Update tests (60xxx band + validation) and docs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mk52pPoT73TBHRakrDnGkB
@aaronVerones
aaronVerones merged commit 36c2a3a into main Jul 3, 2026
9 checks passed
@aaronVerones
aaronVerones deleted the fix-prod-port-band branch July 3, 2026 04:01
aaronVerones added a commit that referenced this pull request Jul 3, 2026
The v1.6.0 fix (#47) moved overwatch's dev port to 50030 so all dev ports sit in
the 50xxx band. The v1.6.1 prod-band fix (#49) regenerated environments.yaml
from default.yaml, which silently reverted overwatch back to 3030. Restore it to
50030. overwatch remains dev-only (dev-specific namespace).


Claude-Session: https://claude.ai/code/session_01Mk52pPoT73TBHRakrDnGkB

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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