Skip to content

fix(server): preserve wildcard host (0.0.0.0) in pairing URL instead of resolving to container IP - #8642

Open
dlowzzxx wants to merge 3 commits into
pingdotgg:mainfrom
dlowzzxx:fix/host-0.0.0.0-pairing-url
Open

fix(server): preserve wildcard host (0.0.0.0) in pairing URL instead of resolving to container IP#8642
dlowzzxx wants to merge 3 commits into
pingdotgg:mainfrom
dlowzzxx:fix/host-0.0.0.0-pairing-url

Conversation

@dlowzzxx

@dlowzzxx dlowzzxx commented Aug 29, 2026

Copy link
Copy Markdown

Closes #8384

resolveHeadlessConnectionHost resolved 0.0.0.0 -> container external IP (e.g. 172.18.0.2), producing unreachable pairing URLs. Keep explicit wildcard hosts (0.0.0.0/::/[::]) as-is per user bind request, instead of resolving to first non-internal interface.

Updated startupAccess.test.ts: expected URL uses 0.0.0.0.

Verified isWildcardHost + resolveHeadlessConnectionString produce http://0.0.0.0:3773; no behavior change for localhost/explicit hosts.

Type

  • Bug fix
  • AI-assisted (Muse Spark via OpenCode)
  • I can explain every line

Tests

  • I added/updated unit tests
  • New and existing tests pass locally

Breaking Changes

N/A


Note

Low Risk
Narrow change to headless connection-string formatting for wildcard binds; localhost and explicit hosts behave as before.

Overview
Fixes unreachable headless pairing URLs when the server is bound to a wildcard address (e.g. Docker using 0.0.0.0).

resolveHeadlessConnectionHost no longer maps wildcard bind hosts (0.0.0.0, ::, [::]) to the first non-internal interface address (often a container IP like 172.18.0.2). It now keeps the configured wildcard host in resolveHeadlessConnectionString and the derived pairing URL, matching what the user asked the server to bind to.

Unit coverage in startupAccess.test.ts is updated so wildcard binding expects http://0.0.0.0:3773 instead of a resolved LAN/container IP. Explicit hosts and the undefined-host → localhost path are unchanged.

Reviewed by Cursor Bugbot for commit d86ec73. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Preserve wildcard host 0.0.0.0 in pairing URL instead of resolving to container IP

Stops replacing the wildcard host 0.0.0.0 with the container's IP address when generating the pairing URL. The wildcard host is now passed through as-is, keeping the URL usable across network contexts.

Macroscope summarized d86ec73.

…of resolving to container IP

Closes pingdotgg#8384

resolveHeadlessConnectionHost resolved 0.0.0.0 -> container external IP
(e.g. 172.18.0.2), producing unreachable pairing URLs on Docker.
Keep explicit wildcard hosts (0.0.0.0, ::, [::]) as-is per user
explicit bind, matching isWildcardHost guard. Updated test to expect
0.0.0.0 in URL.
@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 50148055-71d3-4bc5-bdcf-d04c7fa9b519

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Aug 29, 2026
Comment thread apps/server/src/startupAccess.ts Outdated
…e concrete address when available

Closes pingdotgg#8384

Reverts to resolving 0.0.0.0 -> concrete external IP when available
(per bot/code review feedback). Keeps non-wildcard hosts explicit.
Updated test expectation.
@github-actions github-actions Bot added size:XS 0-9 changed lines (additions + deletions). and removed size:S 10-29 changed lines (additions + deletions). labels Aug 29, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 7897f1b

Macroscope's review found this PR approvable — The two commits cancel out, leaving the final head identical to the base with no effective file, runtime, or product-default changes. The submitted tree therefore introduces no additional review risk.

Notes:

  • No code objects were reviewed. Approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

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

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Misleading server link for --host 0.0.0.0 address

1 participant