8000 test(e2e): run own-ip cases on vm lanes when the host has no tun device by norrietaylor · Pull Request #2008 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

test(e2e): run own-ip cases on vm lanes when the host has no tun device - #2008

Merged
norrietaylor merged 7 commits into
mainfrom
fix/e2e-vm-lane-tun-guards
Oct 7, 2026
Merged

norrietaylor merged 7 commits into
mainfrom
fix/e2e-vm-lane-tun-guards

Conversation

@norrietaylor
@norrietaylor norrietaylor commented Oct 6, 2026 •
Copy link
Copy Markdown
Member

Summary

scripts/session-e2e.sh skipped several own-IP cases whenever the host had no /dev/net/tun. On a VM lane, though, the own-IP box opens its tap inside the Linux guest, and the guest has the device. The host check was the wrong precondition there, so the macOS VM lane never ran these cases and said nothing about it. #1984 fixed the listen-published-port case. This PR applies the same guard to the other VM-capable cases: [ -z "${E2E_VM:-}" ] && [ ! -c /dev/net/tun ].

The native-only cases keep their guard. Their skip text now says why they need the host device.

Per-site decisions

Site Decision Reason
deny-all answer proof (proof_own_ip_deny_all_box_answers_published_port) Gate on native lane (E2E_VM unset) Runs only with MINVMD_GVPROXY_BIN, the VM switch. The case already has VM-lane branches: guest-side records, the host socket table on KVM, and a named skip of the forwarder-address leg on a macOS host. The box's tap opens in the guest.
port-publish half (po_port_half) Gate on native lane Also gated on MINVMD_GVPROXY_BIN. It already handles a macOS VM host: "address legs SKIPPED on this lane ... this host has no /proc", and the by-name legs still run. The tap opens in the guest.
min net expose (proof_min_net_expose_publishes_lists_and_refuses) Gate on native lane Its header says it "runs whole on every lane". It has an E2E_VM branch for the T94 host-held grant path. With a VM switch, the tap opens in the guest. On a native lane (E2E_NATIVE_SWITCH), the host check still applies.
fresh-install loopback publish Keep guard, reword skip Returns early when E2E_VM is set or the host is not Linux. It installs a pair host-side and runs the box natively, so the tap opens on this host.
network posture own-IP half (two sites) Keep guard, reword skip Same early native-only return. The own-IP box runs on this host.
box-name page check (bn_tun) Keep guard, reword text Returns early on a VM target, because the answerer is guest-side. The box runs natively on this host.
expose from inside the box (proof_expose_from_inside_box) Changed to [ -z "${E2E_VM:-}" ] && [ ! -c /dev/net/tun ] (cc99ce5, after #2006 merged) The VM branch (eib_vm_ask_legs and the allow, deny and nobody-attached legs) opens the box's tap inside the guest. Before this change the macOS VM lane skipped every expose leg, so they were proven on KVM only. The same commit corrects the two-VM leg's comment: the default VM's boxes are destroyed by then, and the leg uses its own port because their forwards can outlive them.

Validation

  • bash -n scripts/session-e2e.sh: syntax OK.
  • shellcheck scripts/session-e2e.sh: no findings, exit 0. No just recipe covers this script, so I ran it directly.
  • I did not run just e2e locally, because it needs a booted VM. The CI lanes below are the proof.

What CI proves

  • macOS VM lane (ci-macos-success, session e2e on the Apple Silicon runner): the macOS host has no /dev/net/tun. On this lane the deny-all answer proof, the port-publish half and min net expose should now run instead of printing the host-tun SKIP line.
  • KVM lane (ci-linux-kvm-success): the host has the device, so behaviour does not change there. It confirms nothing regressed.
  • Native Linux lane (ci-linux-native-success): E2E_VM is unset there, so every guard behaves as before.

Summary by CodeRabbit

  • Tests
    • End-to-end network checks now support VM-backed runs without requiring the host’s network tunnel device.
    • Skip messages clarify whether a network tunnel is needed on the host or is handled inside the VM.
    • VM exposure checks use a separate port when published forwards may remain active after a VM stops.

The deny-all answer proof, the port-publish half and the min net expose
case skipped whenever the host had no /dev/net/tun. On a VM lane the
own-IP box opens its tap inside the Linux guest, which has the device,
so the macOS VM lane never ran them. Gate the host check on a native
lane, as the listen-published-port case already does.

The fresh-install loopback publish, the network posture own-IP half and
the box-name page check are native-only: they return early on a VM lane
and open the tap on this host, so they keep the guard. Their skip text
now says why the host device is required.
@coderabbitai
coderabbitai Bot commented Oct 6, 2026 •
Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

  • Run on-demand review

This review includes 1 billable file and costs up to $0.25.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 15 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: 7063ec91-cb6e-4bd5-a954-d2b12e079057
📥 Commits

Reviewing files that changed from the base of the PR and between 92a2d12 and dc2ab23.

📒 Files selected for processing (1)
  • scripts/session-e2e.sh

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 50e3d84d-7094-43e1-9dee-ffd3355f6d7f
📥 Commits

Reviewing files that changed from the base of the PR and between b2646a3 and 92a2d12.

📒 Files selected for processing (1)
  • scripts/session-e2e.sh

Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 1 remain after this review.


📝 Walkthrough

Walkthrough

The session end-to-end proofs now apply host TUN device checks only to native runs. A two-VM expose proof comment explains why the alpha VM uses a separate port.

Changes

Session end-to-end proofs

Layer / File(s) Summary
Own-IP proof gating and port note
scripts/session-e2e.sh
Own-IP proofs skip for a missing host TUN device only on native runs. The two-VM expose proof comment notes that a published forward may remain after a box ends and explains the alpha VM’s separate port.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: evanspearman

Merge Risk: ⚪ Minimal · up to 92a2d

VM-backed proofs use a guest-side tap, while native runs keep the host TUN check. No concrete merge-blocking risk is established by this change.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: running own-IP tests on VM lanes when the host lacks a TUN device.
Description check ✅ Passed The description includes a detailed summary, per-site decisions, validation results, and CI coverage. It does not include the template’s Checklist section, but the description is otherwise mostly comp…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the tap at dawn
Native paths pause when TUN is gone
VM taps open out of sight
Two ports keep the forwards right
The proof runs on; the burrow’s bright

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

The group skipped on any host without /dev/net/tun, so the macOS VM lane
never ran its expose legs. The own-IP box opens its tap inside the guest
on a VM lane, so gate the skip on a native lane, as the other own-IP cases
now are. Also correct the two-VM leg's comment: the default VM's boxes are
gone by then, but their forwards can outlive them.
@norrietaylor
norrietaylor marked this pull request as ready for review October 6, 2026 05:31
@norrietaylor
norrietaylor requested a review from a team as a code owner October 6, 2026 05:31
@minimal-foundry
minimal-foundry Bot commented Oct 6, 2026 •
Copy link
Copy Markdown
Contributor

Approved: no findings at dc2ab234122f.

Nothing to do.

Clobber: none: git log on the script shows the head commit (451d3723, the brace fix) and the VM-lane commit (cc99ce53) on top of #1984/#2006; no recent fix reverted.

@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 6, 2026
norrietaylor and others added 2 commits October 6, 2026 10:57
…macOS bash expands them

Under a UTF-8 locale, bash 3.2 reads the en dash's lead byte as part of the
name, so "$mnx_lo–$mnx_hi" trips set -u as an unbound "mnx_lo\xe2". The
NET-043/NET-044 expose group only reached these lines once it ran on the
macOS VM lane.
@minimal-foundry minimal-foundry Bot removed the review:approved minimal-review approved the current head label Oct 6, 2026
@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 6, 2026
@norrietaylor
norrietaylor enabled auto-merge October 6, 2026 23:00
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 7, 2026
Merged via the queue into main with commit 1d1b81a Oct 7, 2026
35 checks passed
@norrietaylor
norrietaylor deleted the fix/e2e-vm-lane-tun-guards branch October 7, 2026 00:32
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.

2 participants

0