8000 fix(minimald): compile switch opening from the proxy's bound port by gominimal-aw-bot[bot] · Pull Request #2053 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(minimald): compile switch opening from the proxy's bound port - #2053

Merged
norrietaylor merged 2 commits into
mainfrom
inbox-patch/fix/hostname-proxy-switch-opening-bound-port-f87cef8fae192fda
Oct 7, 2026
Merged

norrietaylor merged 2 commits into
mainfrom
inbox-patch/fix/hostname-proxy-switch-opening-bound-port-f87cef8fae192fda

Conversation

@gominimal-aw-bot
Copy link
Copy Markdown
Contributor

Routing-Key: inbox-route/I_kwDOSUhdos8AAAABVhE2Lg

Defect

The hostname proxy's interim opening (the :port every own-address box's
egress gate compiles at the node address, design §7.1) was built once from the
configured port in ServerState::new, and never re-pointed when the proxy
actually bound a different port. record_serving updated only the RPC
discovery field (ServerState.hostname_proxy_port), so an unpinned native
daemon whose default port was busy (bind falls back to an OS-chosen port)
left its own-address boxes unable to reach the proxy at the port it really
served on.

Change

  • net/mod.rs: add SwitchClient::set_hostname_proxy_port, the missing
    mutable setter the session gates (compiled_egress, SessionGate::for_session)
    needed to track the bound port.
  • server.rs: thread the Arc<Mutex<SwitchClient>> through ServerState
    beside the copy Manager::init owns, add a ServerStateHandle mutator, and
    have HostProxyStartup::record_serving's Egress arm re-point the switch
    opening at the port actually bound. The discovery field still carries the
    client-facing reported_port (which may differ in the VM publish-relocation
    case); boxes dial the bound port on the loopback they share with the daemon.
  • Remove the now-obsolete warn_if_proxy_opening_missed mismatch warning (the
    opening always equals the bound port after this fix) and replace its test
    with a behavioral test asserting record_serving points the switch at the
    bound port.

Verification

  • cargo fmt --all --check — clean
  • cargo clippy --workspace --all-targets --locked -- -D warnings — clean
  • cargo test -p minimald — 857 passed; the new
    record_serving_points_the_switch_opening_at_the_bound_port passes. 11
    pre-existing failures are the documented libtest shared-log-buffer artifact
    (each passes in isolation; the canonical nextest runner isolates them per
    process).

The switch's hostname-proxy opening (the interim :port every
own-address box's egress gate compiles) was built from the
configured or default port, never re-pointed when the bind landed
elsewhere. record_serving updated only the discovery field, so an
unpinned daemon whose default port was busy left boxes unable to
reach the proxy on the OS-chosen port it actually served on.

Add SwitchClient::set_hostname_proxy_port, thread the switch
through ServerState beside the copy the sessions manager owns, and
have record_serving re-point the opening at the bound port (boxes
dial the bound port on their shared loopback; the discovery field
still carries the client-facing reported port).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@gominimal-aw-bot
gominimal-aw-bot Bot requested a review from a team as a code owner October 7, 2026 06:37
@gominimal-aw-bot gominimal-aw-bot Bot added the agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. label Oct 7, 2026
@coderabbitai
coderabbitai Bot commented Oct 7, 2026 •
Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 2 billable files and costs up to $0.50.

Or wait 32 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: bfa3be69-2897-4290-9ce8-7fe4e2f68e2d
📥 Commits

Reviewing files that changed from the base of the PR and between c28425a and bdf2e76.

📒 Files selected for processing (2)
  • crates/minimald/src/net/mod.rs
  • crates/minimald/src/server.rs
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@gominimal-aw-bot
Copy link
Copy Markdown
Contributor Author

[inbox-patch:clobber]

This PR would revert recently merged work

Simulating this merge shows it undoing commits that landed on the base branch within the last 3 day(s):

  • fb09fd590 — 100% of its 3 surviving lines in these files would be undone

Before merging, restore the reverted region to its state on the base branch. The rest of this PR is unaffected.

If a listed commit is one this PR intends to supersede, say so and merge — this check reports, it does not block.

@gominimal-aw-bot gominimal-aw-bot Bot added clobber-suspected agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch labels Oct 7, 2026
@norrietaylor norrietaylor changed the title fix: fix(minimald): compile switch opening from the proxy's bound port fix(minimald): compile switch opening from the proxy's bound port Oct 7, 2026
@norrietaylor
Copy link
Copy Markdown
Member

/review

@minimal-foundry
minimal-foundry Bot commented Oct 7, 2026 •
Copy link
Copy Markdown
Contributor

Approved: no findings at bdf2e76db662.

Nothing to do.

Clobber: none: the removed warn_if_proxy_opening_missed was introduced by this PR's own series (git -S on server.rs shows only d2a78b42 and a5f908bd), and the replacement is the point of the change, not a revert.

Boxes read the opening once, at attach, so a box attached before the
proxy was serving keeps the configured port. Name both ports and the
reattach remedy in one warn line, and take the bound port as a plain
u16 in the linux-only setter.
@norrietaylor
Copy link
Copy Markdown
Member

/review

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — approved

Verdict APPROVE — No findings.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — approved

Verdict APPROVE — No findings.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 7, 2026
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 7, 2026
Merged via the queue into main with commit 8a5f5cc Oct 7, 2026
37 checks passed
@norrietaylor
norrietaylor deleted the inbox-patch/fix/hostname-proxy-switch-opening-bound-port-f87cef8fae192fda branch October 7, 2026 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch clobber-suspected review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0