Skip to content

Server takes the listen resolver's address list as final (#15) - #18

Merged
Khang5687 merged 1 commit into
fork-mainfrom
feat/resolver-verdict
Sep 16, 2026
Merged

Khang5687 merged 1 commit into
fork-mainfrom
feat/resolver-verdict

Conversation

@Khang5687

Copy link
Copy Markdown
Owner

Ticket: #15 (parent spec #1, ADR 0003). Closes #15.

The server takes the shared listen resolver's address list as final. The resolver's addresses is now typed as a non-empty list (loopback always prepended; the loopback-only verdict reads off the set of addresses beyond loopback), and the server's local addresses.length === 0 ? [loopback] : addresses fallback and the ?? loopback on the URL host are deleted — both now unrepresentable, not merely unreachable. The loopback-only policy lives in one place.

One deviation from the ticket wording: the server does not add a literal read of the resolver's loopback-only verdict. That verdict answers "did the selection reach beyond loopback"; the server's reachability check answers "is any bound address non-loopback", and the two differ for a plain loopback selection (which must still report not remote-reachable, pinned by an existing test). Reading the verdict there would reintroduce a wrong branch. The fallback derivation is gone, which is the ticket's intent.

Verification: typecheck clean on server, tailscale and desktop. Seam 1 harness 9/9, listen address + listen interfaces 25/25, desktop exposure 24/24, runtime state / startup access / auth utils / bin 48/48 — all unchanged. Full server suite 4030 passed; the 12 failures are the known local-environment ones (symlink realpath, local npm/mise layout), none touching listen code.

The server's interface path re-applied a loopback fallback the shared
resolver already owns: an `addresses.length === 0 ? [loopback]` branch and
a `?? loopback` on the URL host. Both were unreachable, because
`resolveListenAddresses` always seeds loopback -- but the return type said
the list could be empty, so every caller kept a guard.

Type the resolver's addresses as a non-empty list, loopback first, and drop
both guards on the server. The resolver builds the set of addresses beyond
loopback directly, so its loopback-only verdict reads off that set instead
of counting entries.
@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Sep 16, 2026
@Khang5687
Khang5687 merged commit a66bc48 into fork-main Sep 16, 2026
7 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant