Repository navigation
feat(minimald): point a proxy_env box's environment at the proxy - #2492
Conversation
BEP-012: a box whose steering is proxy_env or both, or whose [network.bep] proxy_env is true, gets HTTPS_PROXY and HTTP_PROXY at the Box Egress Proxy's listener on the daemon's switch subnet, NO_PROXY with the local zone, loopback and its no_proxy entries, and NODE_USE_ENV_PROXY=1. A box without a credentialed lane in effect gets none of them. One debug line per box names the variables set.
BEP-012: an own-address box with steering = "proxy_env" and a credentialed lane has HTTPS_PROXY and HTTP_PROXY at the proxy's address on port 8118, NO_PROXY with the local zone, loopback and its no_proxy entries, and NODE_USE_ENV_PROXY=1. A target with no switch records both cases as NOT RUN.
|
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 |
norrietaylor
left a comment
There was a problem hiding this comment.
Babysitter review of T40 against its plan block, at 9352bc55.
Layer env. crates/minimald/src/box_runtime.rs sets HTTPS_PROXY, HTTP_PROXY, NO_PROXY and NODE_USE_ENV_PROXY for a box whose steering is proxy_env or both, or whose [network.bep] proxy_env is true, at the proxy's listener on the daemon's switch subnet. The variables join the connection layer before the sealed deliveries do, over any value with the same name. NO_PROXY carries the four local entries first and the box's no_proxy entries after, in the order BEP-012 writes them. Three unit tests pin the values, the gating and the placement. scripts/session-e2e.sh adds the two cases the plan names, wired into the full run, the single-case dispatcher and the usage text. Each records NOT RUN on a target with no switch.
Consumes. crates/boxes/src/core/bep.rs (Steering, BepSettings.proxy_env, BepSettings.no_proxy, resolved_steering): read, not changed.
Out of the layers. crates/minimald/src/box_actor/host.rs carries the call site: the box actor alone holds the switch, so it reads the subnet and calls the two layer functions before the deliveries join the layer. Eight lines, no logic. The babysitter accepts it under the epic's layer-exception rule and undrafts this PR; the body's "Layer exception" section records it.
For the arch review. The variables are set only when the box declares a credentialed upstream and CredentialedUpstream::in_effect(network) holds. BEP-012's WHERE clause names steering and proxy_env alone. The agent's reason, that an unlaned box cannot reach the proxy's address, is sound. The ruling on whether the narrower condition conforms is the arch review's.
Evidence. The Linux native lane ran both cases as NOT RUN (no MINVMD_GVPROXY_BIN). The KVM and macOS lanes are the ones with a switch; their results decide the proof.
No blocking findings of my own.
Generated by Claude Code
|
Approved: every review thread resolved at @norrietaylor resolved the last thread, which releases the approval this review had withheld. Nothing to do. |
There was a problem hiding this comment.
arch-review: CONDITIONS · 2 conditions · the full ruling
The proxy variables conform to networking §5.4 and §7.1, and the call site in host.rs is in the right owner. Two items remain open. The spec line for BEP-012 does not state the credentialed-lane gate or NODE_USE_ENV_PROXY that the code applies. Amend the spec as C1 says. Both e2e cases recorded NOT RUN, and a NOT RUN case is not a pass. Run them on a lane with a switch and record the result, as C2 says.
Ruled at 9352bc5 against gominimal/arch@109541a48c31 by claude-opus-5-5.
There was a problem hiding this comment.
APPROVE withheld: 3 unresolved threads — minimal-arch[bot] crates/minimald/src/box_runtime.rs:362, minimal-arch[bot] scripts/session-e2e.sh:11704, minimal-arch[bot] scripts/session-e2e.sh:11736.
minimal-review — advisory review
Verdict COMMENT — No findings.
Panel: 2 of 3 personas ran (correctness, security); did not complete: supply-chain.
|
/revise Act on the arch review's C1 at Generated by Claude Code |
The proxy variables are set only for a box whose credentialed lane is in effect for its network mode, as launch_proxy_env does. A box without a lane cannot reach the proxy's address (networking section 7.1).
Spec lint
Advisory. None of this blocks the merge; the review decides. Advisory, and never a merge gate. Linter: |
There was a problem hiding this comment.
arch-review: CONDITIONS · 1 condition · the full ruling
The code conforms to networking §5.4 and §7.1. It sets the proxy variables only for a box with a credentialed lane in effect. The spec amendment at line 228 states that gate for HTTPS_PROXY, HTTP_PROXY and NO_PROXY. The NODE_USE_ENV_PROXY sub-requirement at line 232 still has no lane gate. As written, it requires a steering variable on a box that §7.1 line 244 says is never steered. Make the spec edit in C1. Do not change the code.
Ruled at 33b57a5 against gominimal/arch@109541a48c31 by claude-opus-5-5.
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 2 unresolved threads — minimal-arch[bot] crates/minimald/src/box_runtime.rs:362, minimal-arch[bot] docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md:232. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
norrietaylor
left a comment
There was a problem hiding this comment.
Babysitter review of T40 at 33b57a57 (round 1).
The round changes one spec line and adds one comment under it: BEP-012's main requirement now gates on a credentialed upstream in effect for the box's network mode, which is what launch_proxy_env applies, and the comment names networking §7.1 as the reason. The rest of the diff is main merged in. The code and the e2e cases are as reviewed at 9352bc55; the KVM lane's passing output for both cases stands in the body.
The spec file is outside the task's layers. The change is the arch review's own ask, one requirement line, so the babysitter accepts it under the epic's layer-exception rule.
The spec-lint comment's findings are all P004, a test name the linter did not find in the repository. The two names this PR adds are shell cases in scripts/session-e2e.sh, the same form as the landed bep_second_box_needs_no_sign_in, which the linter also reports. Advisory, and not this PR's.
Open: the arch review's C1 at this head asks for the same gate on the NODE_USE_ENV_PROXY sub-requirement, since the code sets that variable behind the lane gate too. That is the next round.
No blocking findings of my own.
Generated by Claude Code
|
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. Review threads the coder judged:
A proxy_env box with a credentialed upstream in effect has HTTPS_PROXY, HTTP_PROXY, the NO_PROXY list and NODE_USE_ENV_PROXY=1 in its environment (code from earlier rounds). BEP-012 in the spec now states the same credentialed-lane gate that launch_proxy_env applies, with a comment that gives the reason. Notes from the agent: This round changes only docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md. That file is outside the task's layers, but the /revise note asks for this change explicitly. The BEP-012 WHERE clause now also requires a credentialed upstream that is in effect for the box's network mode. A one-line HTML comment under it gives the reason (networking section 7.1). The NODE_USE_ENV_PROXY sub-requirement stays as it was, as the note directs. I did not run the two session-e2e test lines this round. They need a VM lane with a switch (MINVMD_GVPROXY_BIN), and this round changes no code or script. just lint-prose did not run because vale is not installed on this box. |
|
/revise Act on the arch review's C1 at Generated by Claude Code |
The NODE_USE_ENV_PROXY sub-requirement under BEP-012 now carries the same lane gate as the main line, matching the code in box_runtime.rs.
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 2 unresolved threads — minimal-arch[bot] crates/minimald/src/box_runtime.rs:362, minimal-arch[bot] docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
There was a problem hiding this comment.
arch-review: PASS · the full ruling
BEP-012 conforms to the design at this head. The new commit adds the credentialed-lane gate to the NODE_USE_ENV_PROXY sub-line, so both spec lines now match the code. Networking §7.1 line 248 is the source of that gate: only a credentialed-lane box can reach the node-local proxy address. The variables and the NO_PROXY order follow §5.4 lines 170–173 and box.toml lines 142–143. The KVM-lane evidence at 9352bc55 still covers the proxy path, because the compare since then does not touch it.
Ruled at 6c6a4d8 against gominimal/arch@109541a48c31 by claude-opus-5-5.
|
Round 2 of 10 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
A proxy_env box with a credentialed upstream in effect has HTTPS_PROXY and HTTP_PROXY at the proxy address, the NO_PROXY list and NODE_USE_ENV_PROXY=1 in its environment. The spec's NODE_USE_ENV_PROXY sub-requirement now states the same lane gate that the code applies. Notes from the agent: Revise round 2 changes only the spec. The WHERE clause of the NODE_USE_ENV_PROXY sub-requirement under BEP-012 now copies the main line's gate word for word. Its tier and verify lines and its HTML comment are unchanged. No code changed, because launch_proxy_env in box_runtime.rs already returns no variables unless a credentialed upstream is in effect. The spec file is outside the task's layers; the directive asked for this edit. I did not run the two session-e2e.sh test lines: this round changes no code, and they need a VM. just lint-prose did not run because vale is not installed on this box. |
norrietaylor
left a comment
There was a problem hiding this comment.
Babysitter review of T40 at 6c6a4d88 (round 2).
The round changes one spec line: the NODE_USE_ENV_PROXY sub-requirement under BEP-012 now carries the same credentialed-lane gate as the main line, word for word, with its tier, verify and comment kept. The rest of the compare is main merged in. The arch review ruled PASS at this head, and its earlier conditions are answered: C1 by the two spec lines, C2 by the KVM lane's passing run of both cases at 9352bc55, which the compare since then does not touch. The code reviewer ran all three personas with no findings.
The spec file is outside the task's layers; both of its edits are the arch review's own asks, one requirement line each, accepted under the epic's layer-exception rule as the body records.
No blocking findings of my own. Ready for the merge gate once CI finishes at this head.
Generated by Claude Code
There was a problem hiding this comment.
minimal-review — approved
Verdict APPROVE — every review thread is resolved; @norrietaylor closed the last one. The review of 6c6a4d88b7fd withheld this approval on the threads open then. Posted as a comment: the App cannot approve its own pull request; the check and the label carry it.
norrietaylor
left a comment
There was a problem hiding this comment.
Approved by the babysitter at 6c6a4d88 after the merge gate passed: own reviews at every head, arch-review PASS at 6c6a4d88, the code reviewer's approval released, every review thread resolved, every CI lane green including macOS, both e2e cases proved on the KVM lane, and the squash subject lint-clean. The two out-of-layer edits (the host.rs call site and the BEP-012 spec lines) are recorded in the body's "Layer exception" section. Enqueued for a squash merge.
Generated by Claude Code
T40 — Point the box at the proxy
slice: S0
kind: task
covers: BEP-012
size: M
est: 60 code, 200 tests
executor: agent
difficulty: routine
model: standard
diagnostics:
min box spec <box>shows the box's steering, which decides whether the proxy variables are setobservability: one debug log line per box naming the proxy variables set
layers:
- env:
- crates/minimald/src/box_runtime.rs:
HTTPS_PROXY,HTTP_PROXY,NO_PROXYandNODE_USE_ENV_PROXYunderproxy_envorboth- scripts/session-e2e.sh: adds two cases
test: ./scripts/session-e2e.sh bep_proxy_env_and_no_proxy_are_set
test: ./scripts/session-e2e.sh bep_proxy_env_sets_node_use_env_proxy
produces: none
consumes:
- crates/boxes/src/core/bep.rs
proof: A
proxy_envbox has the proxy address, the no-proxy list andNODE_USE_ENV_PROXY=1in its environment.depends on:
- blocked by #2264
- blocked by #2273
- blocked by #2488
Layer exception
crates/minimald/src/box_actor/host.rsis outside T40'slayers:. The change is the call site that wires the layer's two functions into the launch: eight lines that read the switch subnet from the box actor, which alone holds the switch, and calllaunch_proxy_envandplace_launch_proxy_envbefore the sealed deliveries join the connection layer. No logic lives there. Accepted under the epic's layer-exception rule of 2026-10-19; the babysitter undrafted the PR on it.docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.mdis outside the layers too. Round 1 amends the BEP-012 requirement line to state the credentialed-lane gate, which the arch review's C1 asked for. Accepted under the same rule as an arch-required one-liner.Evidence from a lane with a switch
The Linux KVM lane (
test-kvm, run 39845921561, job 120063123094) at9352bc55ran both cases withMINVMD_GVPROXY_BINset, and both passed:Recorded by the babysitter for the arch review's C2.
Proof
A box whose [session.network.bep] steering is proxy_env or both, or whose proxy_env is true, and that has a credentialed lane in effect (own_ip with --credentialed-upstream or a broker grant), has HTTPS_PROXY and HTTP_PROXY set to http://<proxy address on the daemon's switch>:8118, NO_PROXY set to .min.internal,host.min.internal,localhost,127.0.0.1 followed by its no_proxy entries, and NODE_USE_ENV_PROXY=1.
min session exec <box> envshows them. The unit tests prove this. The e2e cases that prove it end to end did not run on this box.Notes from the agent: Outside the layers: crates/minimald/src/box_actor/host.rs got a 7-line change at the launch_host call site. The proxy address depends on the daemon's switch subnet, and only the box actor holds the switch, so box_runtime.rs could not reach the subnet without this call. Both e2e cases record NOT RUN when MINVMD_GVPROXY_BIN is not set, as the other switch cases do. This sandbox has no gvproxy, tun or kvm, so the real evidence must come from a lane with a switch (Linux native with gvproxy, KVM, or macOS). The cases do not need a sign-in or a running proxy: they activate with --network own_ip --credentialed-upstream and read
env. Design decisions: (1) The variables are set only when the box declares a credentialed upstream and CredentialedUpstream::in_effect(network) is true. A box without the lane cannot reach the proxy's address, so the variables would break all of its HTTP traffic. The spec text does not state this condition. (2) Only the uppercase names that the spec gives are set. curl reads only lowercase http_proxy for plain HTTP, so a later task can add the lowercase variants. (3) The proxy values replace a value with the same name in the connection layer, the same as the sealed deliveries do. (4) Only the HTTPS_PROXY format and port are checked by the e2e case, not the exact address, because a native daemon uses a /24 of its own and the VM lane uses the default /16. `cargo clippy -p minimald …[truncated]Tests
./scripts/session-e2e.sh bep_proxy_env_and_no_proxy_are_set./scripts/session-e2e.sh bep_proxy_env_sets_node_use_env_proxyVerify
min task run agent-verifyexited 101 under rustc 1.98.1, which the repository does not pin (1.97.0 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.Base
The base branch moved while the coder worked; it was merged in before the tests ran.
Out of scope
These files are outside the task's
layers:, so this PR is a draft:crates/minimald/src/box_actor/host.rsCloses #2334
Generated by Claude Code