Repository navigation
fix(op,minimald): fetch a box build's web sources in its classifier leaf (0.7 backport) - #3101
Conversation
A web-source fetch for a build placed for a box opens each connection from a socket created in that box's classifier leaf, through a loopback relay, and asks its name query from the same leaf. The box's egress verdict then decides the fetch (NET-155). On a VM host the frames carry the box mark, so the host gate decides them by the box's rules and not by the node-plane baseline. The cache lookup and the content-hash check stay as they are. A fetch that the box's rules refuse fails the build with the source host. The node-plane fetch record no longer lists a web source fetched in a box's leaf. A gs:// source, and a web source of a box with no leaf, still leave from the daemon and are recorded. Backports [#2795](#2795) to the 0.7 line. The change is T124 from main with these names adapted, because the line predates two moves on main: - sandbox::config is sandbox2::config, in op and in minimald's tests. The line predates the crate rename in [#2106](#2106). - box_ops::{BuildPlacement, BuildTap} is session_sop::{BuildPlacement, BuildTap}, in the new test in minimald's session/tests.rs. main's box_actor/tests.rs is that file on the line. (cherry picked from commit c7f6ddd)
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
Reviewed: 2 findings, none blocking at Address the comments on the diff. Clobber: not checked in depth. If that was not intentional, restore the earlier change. |
|
This agrees with the arch as written. Rule 11 of the owner ruling on gominimal/arch#167 (https://github.com/gominimal/arch/issues/167#issuecomment-6695894260) keeps #2795 and this backport as the temporary solution until build boxes are available. The two minimal-foundry findings ( |
Backports #2795 (
c7f6ddd67) torelease/0.7.x, as onecherry-pick -xcommit.Refs #3058. This fixes that issue for host-address boxes, the default network mode, but does not close it.
On
v0.7.3-rc1every web source leaves from the daemon, so on a VM host the node-plane baseline drops the frames and the first launch of a box with such a package waits about four minutes and then fails. With this change, a box with a classifier leaf fetches its web sources in that leaf, and the box's egress rules decide the fetch.Adaptation
The picked code did not compile on this line. Two names changed, and nothing else:
sandbox::configsandbox2::configcrate::box_ops::{BuildPlacement, BuildTap}crate::session_sop::{BuildPlacement, BuildTap}box_opsdoes not exist hereNo other commit is needed. #2720 and #2723 are already on the line.
Still open
own_ipbox has no classifier leaf, so its web sources still leave from the daemon and are dropped, even when the box allows the host. This is #2802.gs://sources still leave from the daemon, also #2802.Testing
Real microVM on macOS arm64, comparing a build of this branch with a build of
81f7ce2c. The branch was rebased after testing over161a18cf, which changes only.github/workflows/release.yml.81f7ce2cstorage.googleapis.comsourceclaude-codeat pkgs08b41ede--deny-all-egress--network own_ip --allow-dns-hosts storage.googleapis.com"Worked" means
execexited 0 and the log showed the fetch in the box's leaf. The extracted file was not confirmed in the box, andclaudewas not launched.just fmt-check,just check-version,just clippy,just deny,just test,just doctestandjust zoned-link-checkpass, at the macOS scope.just cistops atclippy-strict, which compares againstmain. Againstorigin/release/0.7.xit reports 4 hits, all in T124'sremote_storage.rs, the code asmainhas it. They are left as they are.just test-cross: clippy passes. Tests were run with--no-fail-fast, because the recipe stops at the first failing target. Failures incheckouts,common(shell_harnesses),minimal,minimaldandsandbox2also occur on81f7ce2c, and none is unique to this branch. All of T124's tests pass.just e2e,just test-vm, and the root lane.After the release,
git cherrylists this commit, and its fix is onmainas #2795.