Skip to content

fix(minimal): skip the port-prompt subscription for a box with no host row - #2187

Merged
norrietaylor merged 3 commits into
release/0.7.0from
fix/quiet-port-prompt-subscribe-0.7.0
Oct 12, 2026
Merged

norrietaylor merged 3 commits into
release/0.7.0from
fix/quiet-port-prompt-subscribe-0.7.0

Conversation

@norrietaylor

@norrietaylor norrietaylor commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

On a VM-backed host, every interactive attach to a box on the default network mode printed two warnings just before the shell took over:

warning: could not subscribe to the box's asks box=<name> error=the VM host daemon holds no row for box "<name>"
warning: this terminal will not show port prompts for box '<name>': the VM host daemon holds no row for box "<name>". Run `min session attach <name>` again to retry.

Nothing was wrong when they printed. The attach subscribed to port prompts for every box on a VM-backed host, but only an own_ip box registers a row with the VM host daemon, and only an own_ip box can ask to publish a port.

What changes

  • The subscription is attempted when the session's record carries a box address pair. A box whose record was read and carries none makes no attempt and prints nothing. The decision is a small pure function, host_asks_target.
  • A record that could not be read does not say the box has no row, so the subscription is still attempted by name, as before this change. An own_ip box keeps its port prompts, and a failed attempt prints the one warning.
  • A subscription that was attempted and failed prints one line, not two: the logged event drops to debug, and the hand-written line keeps its text.
  • The code change is in crates/minimal/src/cmd/session.rs; scripts/session-e2e.sh gains one assertion.

Test plan

  • Three unit tests on host_asks_target: a read record with no address pair gives no target; an address pair with a box name and a control socket gives one; an unreadable record gives the by-name target.
  • scripts/session-e2e.sh: the sandbox proof's default-mode attach fails if its terminal shows the port-prompt warning. It runs in this PR's e2e lanes; not run locally.
  • In a Linux guest at f9b148d: just clippy and the three host_asks_target tests pass. The full just test last ran at 683f643 (3725 passed, 24 skipped).

…t row

On a VM-backed host every interactive attach to a box on the default
network mode printed two warnings before the shell took over. The attach
subscribed to port prompts for every box, but only an own_ip box registers
a row with the VM host daemon, so the row read answered "no row" for a
feature the box does not have.

Subscribe only when the session's record carries box_addresses. A
subscription that was attempted and failed now says so once: the logged
event drops to debug and the printed line stays.
@norrietaylor
norrietaylor requested a review from a team as a code owner October 12, 2026 06:26
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 37d8ef91-29b8-425b-831c-d905b3ab7063

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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@minimal-foundry

minimal-foundry Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Reading f9b148dc4ea9.

This comment updates when the review finishes.

@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 12, 2026
…cord cannot be read

A record that could not be read does not say the box registered no row,
so the attach still subscribes by name and warns once if that fails. A
record that was read and carries no address pair still skips silently.

The session e2e now fails if a default-mode attach prints the port-prompt
warning.
@norrietaylor
norrietaylor merged commit 22bf27a into release/0.7.0 Oct 12, 2026
27 of 28 checks passed
@norrietaylor
norrietaylor deleted the fix/quiet-port-prompt-subscribe-0.7.0 branch October 12, 2026 06:43
norrietaylor added a commit that referenced this pull request Oct 15, 2026
…t row (#2187)

* fix(minimal): skip the port-prompt subscription for a box with no host row

On a VM-backed host every interactive attach to a box on the default
network mode printed two warnings before the shell took over. The attach
subscribed to port prompts for every box, but only an own_ip box registers
a row with the VM host daemon, so the row read answered "no row" for a
feature the box does not have.

Subscribe only when the session's record carries box_addresses. A
subscription that was attempted and failed now says so once: the logged
event drops to debug and the printed line stays.

* fix(minimal): keep the port-prompt subscription when the session's record cannot be read

A record that could not be read does not say the box registered no row,
so the attach still subscribes by name and warns once if that fails. A
record that was read and carries no address pair still skips silently.

The session e2e now fails if a default-mode attach prints the port-prompt
warning.

---------

(cherry picked from commit 22bf27a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant