Repository navigation
T97 — Expose a port from inside a box on a VM-backed host, end to end, including the box's own named VM - #2006
Conversation
The case's VM-lane branch no longer counts the allow and guest-audit legs NOT RUN. On a VM lane the whole case runs against the VM host daemon's own records (T84): an allow box's expose publishes through the host-side admission (T94) — the host-held row admits the runtime port at the switch address the box's registration named, the owner-only host audit carries the admission's own line, the policy lists the publish pending per NET-047's pinned contract, and the host's own probe at the published address meets the same bound-but- not-admitted contract the native leg pins (the reach itself is #1897's). The ask legs additionally assert that the attached human's Allow pre-recorded the port in the host row. A deny box refuses inside the box and records nothing on the host: no live row, an empty runtime set in the host row, no audit line at all. And the expose half of T61: with two named VMs, a box created on the non-default VM publishes an in-box expose there, driven through the flagless attach that finds the VM from the box name — with alpha's own row and audit carrying the admission while the default VM answers `no row` and holds no line for the box.
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
The runtime will not revise this pull request again on its own: round 2 would exceed the cap of 1 (the last trigger was a failed check suite). A person decides now. Remove |
The two-VM leg read the default VM's row answer back with 'cat file | tr', and every shellcheck older than 0.11.0 flags that as SC2002 — so the workspace suite's shell_lint gate (crates/common/tests/shell_lint. rs driving scripts/lint-shell.sh) failed the native tests job on CI: ubuntu-latest ships a pre-0.11 shellcheck, while 0.11.0, the version the previous round had installed locally, no longer fires the check and let the finding through. Rewrite the read with the file's own idiom (tr ... < file 2>/dev/null, as the neighbouring err reads do); behaviour is unchanged — the file is unconditionally created two lines above, and a missing file still yields an empty answer.
…ort-from-inside-a-box-on-a-vm-backed-h
|
Round 1 of 1 on a failed check suite, pushed as
Verify Converted to a draft: something above needs a person before review. On a VM-backed host, Notes from the agent: Revise round for the failed check suite on PR #2006; the directive's findings, addressed one by one. (1) |
NET-044 requires an allowed expose to be reachable; NET-047 covers only rejected requests. The VM lane now probes the published address until it gets the in-box server marker and passes when it does. A miss is recorded as a named known gap citing gominimal/inbox#933, so the fix only has to delete that branch. The policy row is asserted present and its text is printed as evidence, not pinned.
|
The runtime will not revise this pull request again on its own: round 2 would exceed the cap of 1 (the last trigger was a failed check suite). A person decides now. Remove |
1 similar comment
|
The runtime will not revise this pull request again on its own: round 2 would exceed the cap of 1 (the last trigger was a failed check suite). A person decides now. Remove |
Every box on a VM lane publishes at the host's 127.0.0.1. The allow box still holds its expose of the case's port there, so the ask-yes leg's expose of the same port got gvproxy's 'proxy already running' (HTTP 500) instead of the answered publish. The ask legs now ask for the next port in the declared range, and the two-VM leg for the one after it.
|
The runtime will not revise this pull request again on its own: round 2 would exceed the cap of 1 (the last trigger was a failed check suite). A person decides now. Remove |
1 similar comment
|
The runtime will not revise this pull request again on its own: round 2 would exceed the cap of 1 (the last trigger was a failed check suite). A person decides now. Remove |
The row and host-audit helpers matched the case's shared port, so after the two-VM leg moved to its own port the alpha row check looked for 3000 while alpha held 3002. Both helpers now take the port, defaulting to the shared one.
|
The runtime will not revise this pull request again on its own: round 2 would exceed the cap of 1 (the last trigger was a failed check suite). A person decides now. Remove |
1 similar comment
|
The runtime will not revise this pull request again on its own: round 2 would exceed the cap of 1 (the last trigger was a failed check suite). A person decides now. Remove |
|
/review |
|
Reviewed: 1 finding, none blocking at Address the comments on the diff. Clobber: none: |
There was a problem hiding this comment.
Design PASS from the architecture review on 82bf0b3. KVM, native, macOS and ci-success are green. The expose legs are proven on KVM only; the PR body says so.
T97 — Expose a port from inside a box on a VM-backed host, end to end, including the box's own named VM
slice: S13
kind: integration
covers: none
size: M
est: 60 code, 220 tests
executor: agent
difficulty: needs care
model: strongest
diagnostics: the bundle from the run carries the VM host daemon's log and its host audit tail, and the in-VM daemon log
observability: the case prints each expose request, the decision, the host-side admission and the host audit line it produced
layers:
- e2e:
- scripts/session-e2e.sh: on both VM lanes, the case expose_from_inside_box's positive legs replace T55's VM-lane refusal:
min net expose 3000inside an allow box publishes through the host admission (T94) and the host reaches it; inside an ask box, answered yes in the host client's dialog through a real PTY attach (scripts/e2e-attach-pty.py, T96) it publishes, answered no it records nothing, and with no attached interactive client it is refused; a deny box is refused; every decision has its line in the VM host daemon's owner-only host audit (T84). With two named VMs on one machine,min net exposerun inside a box on the non-default VM finds that VM from the box name and publishes there (the expose half of T61's "attach and expose find the VM from the box name")test: ./scripts/session-e2e.sh expose_from_inside_box
test: just e2e
produces: none
consumes: none
proof: On a VM-backed host,
min net expose 3000inside a box publishes it under allow through the host-side admission, asks the human attached on the host and applies their answer, refuses on deny or with no attached client, and every decision is in the host audit; with two named VMs, an expose inside a box on the non-default VM finds that VM from the box name and publishes there.depends on:
- blocked by #1671
- blocked by #1967
- blocked by #1969
Proof
On a VM-backed host, the expose_from_inside_box e2e case now runs whole: an allow box's in-box
min net expose 3000publishes through the VM host daemon's host-side admission — the host-held row admits the runtime port at the switch address the box's registration named, and the owner-only host audit carries the admission's own line, both asserted and printed — the human attached on the host is asked and their answer applied (Allow publishes and pre-records the port in the host row, deny records nothing and a later expose asks again, nobody attached is refused fail-closed), a deny box is refused with nothing recorded on the host, and every decision has its line in the host audit; with two named VMs, an expose inside a box on the non-default VM publishes there, driven through the flagless attach that finds the VM from the box name, with alpha's own row and audit carrying the admission while the default VM answers 'no row'.Lane coverage: the expose legs (allow, ask, deny, nobody-attached, audit) are proven on the KVM lane only. macOS skips them under the host tun guard. The follow-up that fixes that guard so they run on macOS is tracked separately. The macOS lane proves the two named VMs, the port split and the listen known gaps.
Notes from the agent: Host limits: this box has neither /dev/kvm (just e2e refuses at its _kvm prerequisite) nor /dev/net/tun (the direct line's case skips at its own gate), so the VM-lane branch could not be executed here — it exercises on CI's KVM lane. To de-risk that, a scratch harness outside the tree extracted the new helpers and patterns from the file and ran 23 synthetic checks (row shapes, audit-line greps, reply-address sed, policy pending row, pty-transcript asserts, registration parses); it caught one real bug — the transcript publish assert used an anchored case pattern that could never match a multi-line transcript — fixed to the file's leading-star substring idiom before committing.
Reach of an allow-exposed port: a known gap, not a contract
The layer says that under allow the host reaches the exposed port. On the current tree it can't. The guest relay gate (
admits_tcp,crates/minimald/src/net/switch.rs) admits only declared ports and listen-watcher publishes, and nothing admits a port thatmin net exposepublished underallow. That violates NET-044, which says an allowed request publishes the port, and in this spec "publish" means reachable (NET-040, NET-016).Per the architecture review, this PR does not pin that behaviour as the contract.
proof_expose_from_inside_box: KNOWN GAP, never an error.The gate-admission fix is tracked separately and blocks closing the epic. When it lands, deleting the known-gap branch turns the reach check into a hard pass.
The pre-existing native allow leg in
proof_expose_from_inside_boxstill treats a reach as an error. The same separate fix covers it.Tests
./scripts/session-e2e.sh expose_from_inside_boxjust e2eVerify
min task run agent-verifyexited 101, so this PR is a draft.Closes #1970