Skip to content

T120 — Treat the proxy lane as in effect for a host-address box on a VM host - #3025

Merged
norrietaylor merged 5 commits into
mainfrom
agent/2856-treat-the-proxy-lane-as-in-effect-for-a-host-add
Nov 5, 2026
Merged

norrietaylor merged 5 commits into
mainfrom
agent/2856-treat-the-proxy-lane-as-in-effect-for-a-host-add

Conversation

@minimal-foundry

Copy link
Copy Markdown
Contributor

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 the min dash detail pane show the credentialed-upstream row of a host_ip box on a VM host without the "(not in effect: host_ip box)" mark, and a host_ip box on a native Linux host keeps it
observability: 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_ip box that got no proxy variables shows why
layers:
- rule:
- crates/boxes/src/lib.rs: CredentialedUpstream::in_effect takes the host kind with the network mode, and is true for own_ip and for host_ip on a VM host
test: cargo nextest run -p boxes credentialed_upstream_in_effect_by_mode_and_host
- runtime:
- crates/minimald/src/box_runtime.rs: launch_proxy_env reads the new rule, so a host_ip box on a VM host with proxy_env or both steering gets HTTPS_PROXY, HTTP_PROXY, NO_PROXY and NODE_USE_ENV_PROXY
- crates/minimald/src/box_runtime/tests.rs: the test that a host_ip box on a VM host gets the four variables, and one on a native host gets none
test: 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_ip lane in effect on a VM host
- crates/minimal/src/cli.rs: the --credentialed-upstream help ends "Takes effect with --network own_ip, and with --network host_ip on 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, and min session policy shows 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 the min dash detail 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 host label 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, and min session policy -o json passes 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

line exit tail
cargo nextest run -p boxes credentialed_upstream_in_effect_by_mode_and_host 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-0522... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling paths v0.0.1 (/workbench/crates/paths) Compiling client-config v0.0.1 (/wo
cargo nextest run -p minimald host_ip_box_on_vm_host_gets_the_proxy_variables 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-fecc... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling stdlib v0.0.22 (/workbenc
cargo nextest run -p minimal detail_pane_shows_a_host_ip_lane_in_effect_on_a_vm_host 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-89f4... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling client-config v0.0.1 (/wo

Verify

min task run agent-verify exited 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.

e/cargo-home/build/debug/deps/libserial_test-616c86b3b044ed08.rlib --extern sha2=/work/build-cache/cargo-home/build/debug/deps/libsha2-405f5187d962ed1a.rlib --extern size=/work/build-cache/cargo-home/build/debug/deps/libsize-e57ebc05cac6ccb3.rlib --extern stdlib=/work/build-cache/cargo-home/build/debug/deps/libstdlib-f3b17164c250397c.rlib --extern switch=/work/build-cache/cargo-home/build/debug/deps/libswitch-0af40ca30538ccd4.rlib --extern sysinfo=/work/build-cache/cargo-home/build/debug/deps/libsysinfo-82e2106fbfb32fa0.rlib --extern tar=/work/build-cache/cargo-home/build/debug/deps/libtar-d8cf8e5bef99c1a6.rlib --extern tempfile=/work/build-cache/cargo-home/build/debug/deps/libtempfile-64539d81e127ad8f.rlib --extern thiserror=/work/build-cache/cargo-home/build/debug/deps/libthiserror-31ad7b029b93b712.rlib --extern tokio=/work/build-cache/cargo-home/build/debug/deps/libtokio-a9eca338333a2325.rlib --extern tokio_util=/work/build-cache/cargo-home/build/debug/deps/libtokio_util-c623093db2043123.rlib --extern tokio_vsock=/work/build-cache/cargo-home/build/debug/deps/libtokio_vsock-1b22471493ad6549.rlib --extern tracing=/work/build-cache/cargo-home/build/debug/deps/libtracing-be36af57e81cc6b6.rlib --extern tracing_appender=/work/build-cache/cargo-home/build/debug/deps/libtracing_appender-a781743e4fae0de5.rlib --extern tracing_opentelemetry=/work/build-cache/cargo-home/build/debug/deps/libtracing_opentelemetry-75005db83331e3e9.rlib --extern tracing_subscriber=/work/build-cache/cargo-home/build/debug/deps/libtracing_subscriber-ac6841183ad66e15.rlib --extern uuid=/work/build-cache/cargo-home/build/debug/deps/libuuid-19bd2dbddf178337.rlib --extern version=/work/build-cache/cargo-home/build/debug/deps/libversion-ee2066c0d67b2e56.rlib --extern vsock=/work/build-cache/cargo-home/build/debug/deps/libvsock-c2be0d0dc103bb93.rlib --extern vt100=/work/build-cache/cargo-home/build/debug/deps/libvt100-060d3379d50b0dbc.rlib --extern walkdir=/work/build-cache/cargo-home/build/debug/deps/libwalkdir-78bf723f3e841c1f.rlib --extern zstd=/work/build-cache/cargo-home/build/debug/deps/libzstd-b7c20e74c54f6308.rlib -L native=/work/build-cache/cargo-home/build/debug/build/tree-sitter-64b47a9d246aab62/out -L native=/work/build-cache/cargo-home/build/debug/build/tree-sitter-nickel-50eec70fb8e68069/out -L native=/work/build-cache/cargo-home/build/debug/build/zstd-sys-3df630743cf715ff/out -L native=/work/build-cache/cargo-home/build/debug/build/ring-3c60c1595d114743/out -L native=/work/build-cache/cargo-home/build/debug/build/aws-lc-sys-4c33c964f163c571/out -L native=/work/build-cache/cargo-home/build/debug/build/blake3-12a86e91b52050e7/out -L native=/work/build-cache/cargo-home/build/debug/build/blake3-12a86e91b52050e7/out` (exit status: 2)
warning: build failed, waiting for other jobs to finish...
error: command `/usr/bin/cargo '--color=auto' test --no-run --message-format json-render-diagnostics --package boxes --package minimal --package minimald --locked` exited with code 101

Out of scope

These files are outside the task's layers:, so this PR is a draft:

  • crates/minimal/src/dash/render.rs
  • crates/minimal/src/dash/rpc.rs
  • crates/minimal/tests/snapshots/dash_snapshots__detail_pane_shows_a_host_ip_lane_in_effect_on_a_vm_host.snap
  • crates/minimald/src/box_actor/host.rs

Closes #2856

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.
@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 13f1c0f5-4c75-418a-a6e3-67fc0eb7011a

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

@minimal-foundry

minimal-foundry Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Approved: no findings at 4f844fbe9eaf.

Nothing to do.

Clobber: none found.

@minimal-foundry minimal-foundry Bot left a comment

Copy link
Copy Markdown
Contributor Author

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.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Nov 5, 2026
@norrietaylor

Copy link
Copy Markdown
Member

/revise Arch condition C1 at 27c65bb (BEP-085). docs/reference/cli-min.md still states the old own-address-only rule in two places. The owner accepts docs/reference/cli-min.md outside the layers. Change only these two passages:

  1. Line ~391, "The gate that admits the lane sits only in front of own-address boxes. A box in any other mode still prints the row it declared, marked as not in effect …". Make it say that the lane takes effect for an own_ip box on every host, and for a host_ip box on a host that runs boxes in a VM. Every other box still prints the row it declared, with the (not in effect: <mode> box) mark.
  2. Line ~477, "Its effective field is true for an own-address box and false for any other". Make it say that effective is true for an own_ip box, and for a host_ip box on a host that runs boxes in a VM, and false for any other.

Use the same words as the --credentialed-upstream help in crates/minimal/src/cli.rs ("Takes effect with --network own_ip, and with --network host_ip on a host that runs boxes in a VM."). Do not change code. Run just lint-prose docs/reference/cli-min.md and drive the file's new alerts to zero.

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.

@minimal-arch minimal-arch Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@minimal-foundry minimal-foundry Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — advisory review

Verdict COMMENT — No findings.

Panel: 2 of 3 personas ran (correctness, security); did not complete: supply-chain.

@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on a /revise note, pushed as 4f844fbe9eaf.

line exit tail
cargo nextest run -p boxes credentialed_upstream_in_effect_by_mode_and_host 0 ing logos v0.16.1 Compiling codespan v0.13.1 Compiling nickel-lang-vector v0.2.0 Compiling prettydiff v0.8.1 Compiling topiary-tree-sitter-facade v0.7.3 (https://github.com/tweag/topiary.git?rev=838c74ab4058f82bc3c6a12380f22c10f22ac814#838c74ab) Compiling toml_edit v0.25.15+spec-1.1.0
cargo nextest run -p minimald host_ip_box_on_vm_host_gets_the_proxy_variables 0 r v0.14.0 Compiling sendfd v0.4.4 Compiling caps v0.5.6 Compiling close_fds v0.3.2 Compiling crossbeam-channel v0.5.16 Compiling curve25519-dalek v5.0.0 Compiling hakoniwa v1.7.2 (https://github.com/souk4711/hakoniwa.git?rev=0810ffa37620ef5c57de263c8eaa1f4d7633c14a#0810ffa3) Com
cargo nextest run -p minimal detail_pane_shows_a_host_ip_lane_in_effect_on_a_vm_host 0 .0 (/workbench/crates/version) Compiling postcard v1.1.3 Compiling tun-rs v2.8.8 Compiling route_manager v0.2.13 Compiling libcgroups v0.7.0 Compiling ssh-encoding v0.3.0 Compiling darling_core v0.24.0 Compiling signal-hook v0.3.18 Compiling darling_macro v0.24.0 Compiling

Verify min task run agent-verify exited 100 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.

b",
                "span_id": "69e5a8a532fc2ed7",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetPaths",
                "parent_span_id": "2853fe080968cbab",
                "span_id": "a43b635c689f6266",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "2853fe080968cbab",
                "queued_behind": "0",
                "span_id": "992c95af19859692",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "2853fe080968cbab",
                "queued_behind": "0",
                "span_id": "ae0c73d2b67144cd",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "ae0c73d2b67144cd",
                "span_id": "4e5d81b3b19cc3d0",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "ae0c73d2b67144cd",
                "queued_behind": "0",
                "span_id": "82659e49ead4f1e3",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 3 tests still running
        PASS [   2.427s] (1566/2921) minimald box_actor::tests::a_box_nobody_handed_an_address_publishes_at_the_answerers_grant
        PASS [   2.451s] (1567/2921) minimald box_actor::tests::a_box_re_registered_inside_the_landing_window_keeps_its_grant
        PASS [   2.494s] (1568/2921) minimald box_actor::tests::a_contended_walk_never_replaces_a_present_verdict
────────────
     Summary [  53.627s] 1568/2921 tests run: 1567 passed, 1 failed, 26 skipped
        FAIL [   3.410s] (1565/2921) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
warning: 1353/2921 tests were not run due to test failure (run with --no-fail-fast to run all tests, or run with --max-fail)
error: test run failed

Outside the task's layers::

  • crates/minimal/src/dash/render.rs
  • crates/minimal/src/dash/rpc.rs
  • crates/minimal/tests/snapshots/dash_snapshots__detail_pane_shows_a_host_ip_lane_in_effect_on_a_vm_host.snap
  • crates/minimald/src/box_actor/host.rs
  • docs/reference/cli-min.md

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 just lint-prose docs/reference/cli-min.md: vale is not installed on this box, so the prose alerts on the file are not checked.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 5, 2026 03:39
@norrietaylor
norrietaylor marked this pull request as ready for review November 5, 2026 04:00

@norrietaylor norrietaylor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Babysitter review at 4f844fb, against the T120 plan block in #2856 and BEP-085.

  • CredentialedUpstream::in_effect(network, host) is true for own_ip on every host and for host_ip on a VM host only. policy_row, the policy JSON effective, the min dash detail pane, the --credentialed-upstream help and minimald's launch_proxy_env all read it.
  • minimald reads the host kind from its switch transport (HostShuttle is a VM). The dashboard reads it from the sidebar label (host is the native daemon). The owner accepted dash/render.rs, dash/rpc.rs and minimald/src/box_actor/host.rs outside the layers, as callers of the new signature.
  • A box that declares no lane still gets no proxy variables. A host_ip box 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.md now states the lane rule for host_ip on a VM host in both places.

Arch: PASS (C1 met). The minimal-review run approved it with no findings.

@norrietaylor norrietaylor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gate passed at 4f844fb.

@norrietaylor
norrietaylor added this pull request to the merge queue Nov 5, 2026
Merged via the queue into main with commit 83b3ba8 Nov 5, 2026
36 checks passed
@norrietaylor
norrietaylor deleted the agent/2856-treat-the-proxy-lane-as-in-effect-for-a-host-add branch November 5, 2026 04:42
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.

T120 — Treat the proxy lane as in effect for a host-address box on a VM host

1 participant