Repository navigation
T120 — Treat the proxy lane as in effect for a host-address box on a VM host - #3025
norrietaylor merged 5 commits into
Conversation
CredentialedUpstream::in_effect and policy_row take the host kind with the network mode. The lane is in effect for own_ip on every host and for host_ip on a VM host (BEP-085).
launch_proxy_env reads the host kind from the switch transport, so a host_ip box with proxy_env or both steering on a VM host gets the four variables (BEP-085). The launch's debug line names the network mode, the host kind and whether the lane is in effect.
min session policy, its JSON document and the min dash detail pane read the host kind with the network mode, so a host_ip box on a VM host shows its credentialed-upstream row unmarked (BEP-085). The --credentialed-upstream help names both modes.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Approved: no findings at Nothing to do. Clobber: none found. |
|
/revise Arch condition C1 at 27c65bb (BEP-085).
Use the same words as the |
…proxy-lane-as-in-effect-for-a-host-add
The policy reference said the credentialed-upstream lane takes effect only for an own_ip box. It now also takes effect for a host_ip box on a host that runs boxes in a VM, for both the text row and the JSON effective field.
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change conforms to BEP-085 and to the design. Architecture D6 says a host_ip box works with the credentialed path. Networking §7.1 Lanes says the gate for a host_ip box is the cohort union outside the VM, and a native host_ip box has no gate. CredentialedUpstream::in_effect follows that split, and every surface reads the real host kind. The VM-side gate from #2861 exists, so the lane is not marked in effect without a gate.
Ruled at 4f844fb against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
|
Round 1 of 10 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. On a Mac, a host-address grant box with steering = "proxy_env" gets the proxy variables, and min session policy shows its credentialed-upstream row with no not-in-effect mark. The reference for min session policy now states the same rule: the lane takes effect for an own_ip box, and for a host_ip box on a host that runs boxes in a VM. Notes from the agent: Revise round 1 changed only docs/reference/cli-min.md, which the owner accepted outside the layers. Both passages now use the --credentialed-upstream help words. The text example under the first passage still shows a host_ip box with the not-in-effect mark, so the lead-in now says it is a host_ip box on a host that runs boxes natively. No code changed, so I ran no test lines this round. I could not run |
norrietaylor
left a comment
There was a problem hiding this comment.
Babysitter review at 4f844fb, against the T120 plan block in #2856 and BEP-085.
CredentialedUpstream::in_effect(network, host)is true forown_ipon every host and forhost_ipon a VM host only.policy_row, the policy JSONeffective, themin dashdetail pane, the--credentialed-upstreamhelp and minimald'slaunch_proxy_envall read it.- minimald reads the host kind from its switch transport (
HostShuttleis a VM). The dashboard reads it from the sidebar label (hostis the native daemon). The owner accepteddash/render.rs,dash/rpc.rsandminimald/src/box_actor/host.rsoutside the layers, as callers of the new signature. - A box that declares no lane still gets no proxy variables. A
host_ipbox on a VM host reaches the proxy at the address the variables name, through T117's cohort lane. - Round 1 (4f844fb) fixes arch C1:
docs/reference/cli-min.mdnow states the lane rule forhost_ipon a VM host in both places.
Arch: PASS (C1 met). The minimal-review run approved it with no findings.
T120 — Treat the proxy lane as in effect for a host-address box on a VM host
slice: S17
kind: task
covers: BEP-085
size: M
est: 140 code, 200 tests
executor: agent
difficulty: routine
model: standard
diagnostics:
min session policy <box>and themin dashdetail pane show the credentialed-upstream row of ahost_ipbox on a VM host without the "(not in effect: host_ip box)" mark, and ahost_ipbox on a native Linux host keeps itobservability: the launch's existing debug line for the proxy variables names the box's network mode, the host kind and whether the lane is in effect, so a
host_ipbox that got no proxy variables shows whylayers:
- rule:
- crates/boxes/src/lib.rs:
CredentialedUpstream::in_effecttakes the host kind with the network mode, and is true forown_ipand forhost_ipon a VM hosttest: cargo nextest run -p boxes credentialed_upstream_in_effect_by_mode_and_host
- runtime:
- crates/minimald/src/box_runtime.rs:
launch_proxy_envreads the new rule, so ahost_ipbox on a VM host withproxy_envorbothsteering getsHTTPS_PROXY,HTTP_PROXY,NO_PROXYandNODE_USE_ENV_PROXY- crates/minimald/src/box_runtime/tests.rs: the test that a
host_ipbox on a VM host gets the four variables, and one on a native host gets nonetest: cargo nextest run -p minimald host_ip_box_on_vm_host_gets_the_proxy_variables
- surfaces:
- crates/minimal/src/cmd/boxes/policy.rs: the policy row reads the new rule
- crates/minimal/tests/dash_snapshots.rs: a snapshot pins the detail pane of a
host_iplane in effect on a VM host- crates/minimal/src/cli.rs: the
--credentialed-upstreamhelp ends "Takes effect with--network own_ip, and with--network host_ipon a host that runs boxes in a VM." in place of "Takes effect only with--network own_ip."test: cargo nextest run -p minimal detail_pane_shows_a_host_ip_lane_in_effect_on_a_vm_host
produces:
- the in-effect rule for a host-address lane
consumes: none
proof: On a Mac, a host-address grant box with
steering = "proxy_env"gets the proxy variables, andmin session policyshows its credentialed-upstream row with no not-in-effect mark.depends on:
- blocked by #2854
Proof
On a VM host (a Mac), a host_ip box that declares a credentialed upstream with steering = "proxy_env" or "both" gets HTTPS_PROXY, HTTP_PROXY, NO_PROXY and NODE_USE_ENV_PROXY at launch.
min session policy, its -o json document ("effective": true) and themin dashdetail pane show its credentialed-upstream row with no "(not in effect: host_ip box)" mark. A host_ip box on a native Linux host keeps the mark and gets no proxy variables. The proof is unit and snapshot tests. No live VM run was made in this session.Notes from the agent: Files outside the layers, each one needed for the change to compile or to reach a surface the task names: (1) crates/minimald/src/box_actor/host.rs is the only caller of launch_proxy_env and place_launch_proxy_env. It now reads the host kind from the switch transport (HostShuttle means a VM host) through a new box_runtime::host_kind_of. (2) crates/minimal/src/dash/render.rs builds the dash detail pane that calls policy_row. It now reads the host kind from the box's sidebar group. (3) crates/minimal/src/dash/rpc.rs gets host_kind_of_label: the
hostlabel is the native minimald, and every other label is a VM host. (4) The new insta .snap file for the dash snapshot test. Design choices: in_effect and policy_row take paths::HostKind (boxes already depends on paths). format_policy and write_policy_json keep their signatures and render for a VM host, the same default format_policy already used (native_host=false). write_policy_json_noting gets a host_kind parameter, andmin session policy -o jsonpasses daemon_host_kind. place_launch_proxy_env now takes the record and host kind. It logs its debug line for every box that declares a credentialed upstream, with network, host_kind, lane_in_effect and variables, also when no variables were set. Not done: docs/reference/cli-min.md (around line 391) still says the gate that admits the lane sits only in front of own-address boxes. That text is now stale for a host_ip box on a VM hos…[truncated]Tests
cargo nextest run -p boxes credentialed_upstream_in_effect_by_mode_and_hostcargo nextest run -p minimald host_ip_box_on_vm_host_gets_the_proxy_variablescargo nextest run -p minimal detail_pane_shows_a_host_ip_lane_in_effect_on_a_vm_hostVerify
min task run agent-verifyexited 101 under rustc 1.99.0, which the repository does not pin (1.99.1 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.Out of scope
These files are outside the task's
layers:, so this PR is a draft:crates/minimal/src/dash/render.rscrates/minimal/src/dash/rpc.rscrates/minimal/tests/snapshots/dash_snapshots__detail_pane_shows_a_host_ip_lane_in_effect_on_a_vm_host.snapcrates/minimald/src/box_actor/host.rsCloses #2856