Skip to content

T113 — Admit dns and both steering where the host's switch resolves box names - #2797

Merged
norrietaylor merged 17 commits into
mainfrom
agent/2523-admit-dns-and-both-steering-where-the-host-s-swi
Oct 31, 2026
Merged

norrietaylor merged 17 commits into
mainfrom
agent/2523-admit-dns-and-both-steering-where-the-host-s-swi

Conversation

@minimal-foundry

@minimal-foundry minimal-foundry Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

T113 — Admit dns and both steering where the host's switch resolves box names

slice: S16
kind: task
covers: BEP-062, BEP-078
size: M
est: 120 code, 180 tests
executor: agent
difficulty: needs care
model: standard
diagnostics: on a host whose switch steers box lookups, a grant box with steering = "dns" or "both" is created, and min box spec shows the steering it resolves to; on a native host it is still refused with exit 3 and "This box declares a secret with steering = "dns", but this host has no box DNS resolver. Set steering = "proxy_env" in [network.bep].", pinned by dns_steering_is_admitted_where_the_switch_resolves_boxes
observability: the existing info line of each creation's activation check carries the host fact it used, box_zone_resolver, beside its rule and fields
layers:
- activation:
- crates/minimal/src/cmd/boxes/create.rs: refuse_unhonourable_grants sets HostFacts::box_zone_resolver from the host, not from HostFacts::LOCAL: true where the box's lookups go through the VM host's switch, whose DNS gate steers the credential module's names and asks the proxy's listener (ProxyListenerState::for_switch, T58), and false on a native host, where a steered name always fails closed; the doc line "Every host today is un-enrolled and has no box-zone resolver." goes (#2523)
- crates/minimal/src/cmd/box_spec.rs: the preview reads the same host fact, so min box spec and creation agree
- crates/boxes/src/core/bep.rs: the doc of HostFacts::box_zone_resolver and of HostFacts::LOCAL say where the fact comes from; the BEP-017 refusal is unchanged where the fact is false
test: cargo nextest run -p minimal dns_steering_is_admitted_where_the_switch_resolves_boxes
test: cargo nextest run -p boxes prop_dns_steering_without_resolver_is_exit_3
- gate:
- crates/minimald/src/net/switch.rs: a test builds a dns-steered box's gate as the VM host attaches it, and pins that github.com resolves to the proxy's address while its listener is live and gets SERVFAIL while it is down, never a real address
test: cargo nextest run -p minimald a_dns_steered_grant_box_resolves_the_module_through_the_switch
produces: none
consumes: none
proof: On a host whose switch resolves box names, a GitHub grant box with dns steering is created, git reaches GitHub through the proxy with no proxy variables, and its credentialed names fail closed while the proxy is down.
depends on:
- blocked by #2264
- blocked by #2281
- blocked by #2538

Original issue text

Residual filed from T30 #2519, arch condition C1 at 9b90b4d (review threads 4368950923 and 4368950924), epic #1501.

Situation

T30 adds DnsGate::with_steering and ProxyListenerState in crates/minimald/src/net/dns_gate.rs and crates/minimald/src/net/dns.rs: a steered A lookup answers the Box Egress Proxy's address while its listener is live and SERVFAIL while it is down, and AAAA, HTTPS and SVCB lookups of a steered name answer NODATA. Both carry allow(dead_code) outside the tests, because no production code calls them: BoxGate::for_session in crates/minimald/src/net/switch.rs builds the gate without steering, and nothing reports the listener's state. So in a running daemon a credentialed name of a dns or both box is still forwarded to real DNS while the proxy is down. The switch and the bep host were outside T30's layers.

What closes this

  • BoxGate::for_session (crates/minimald/src/net/switch.rs) calls DnsGate::with_steering(policy, <credential module hosts>, <proxy address on the switch>, <shared ProxyListenerState>) for every box whose steering resolves to dns or both.
  • The switch-side bep host calls ProxyListenerState::set_live when the proxy's listener comes up and when it goes down, so one state is shared by every gate on the switch.
  • The allow(dead_code) interims on ProxyListenerState and with_steering go, and their comments stop naming this issue.
  • A relay-level test proves BEP-062 from a box's resolver: with the proxy stopped, a dns-steered box resolving github.com gets SERVFAIL and never a real address.

Generated by Claude Code

Proof

On the VM host, an own-address box with a GitHub broker grant and steering = "dns" or "both" (or no steering declared) now passes the creation check, and min box spec shows the steering it resolves to. Its switch gate answers github.com with the proxy's address while the proxy listens, so git reaches GitHub through the proxy with no proxy variables. It answers SERVFAIL while the proxy is down. On a native host the same spec is still refused with exit 3 and the no box DNS resolver message.

Notes from the agent: The host fact is host_resolves_box_names(kind, network) in create.rs. It is true only for HostKind::Minvmd with network = own_ip. A host_ip or none box on the VM host keeps the refusal, because only an own-address box gets a steered DNS gate of its own. The min box spec preview assumes an own-address box, as its checks did before. The preview still filters to the BEP-057 refusal (#2445), so it does not show the BEP-017 refusal on a native host. The observability fact goes in two places: a new info line in refuse_unhonourable_grants ('checked the box spec's grants against this host', with box_zone_resolver, steering and accepted), and the box_zone_resolver field on check_activation's existing per-refusal debug line, beside rule and fields. Nothing in this session ran the end-to-end proof that git reaches GitHub in a live VM. The minimald unit test covers the gate's DNS answers only. just clippy-strict was not run. clippy -p minimald -p minimal -p boxes --all-targets is clean.

Tests

line exit tail
cargo nextest run -p minimal dns_steering_is_admitted_where_the_switch_resolves_boxes 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-d335... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling client-config v0.0.1 (/wo
cargo nextest run -p boxes prop_dns_steering_without_resolver_is_exit_3 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-4e59... 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 a_dns_steered_grant_box_resolves_the_module_through_the_switch 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-144e... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling client-config v0.0.1 (/wo

Verify

min task run agent-verify timed out after 1800s, so this PR is a draft.

g switch v0.0.1 (/workbench/crates/switch)
    Checking boxes v0.0.1 (/workbench/crates/boxes)
    Checking sandbox v0.0.1 (/workbench/crates/sandbox)
    Checking diagnostics v0.0.1 (/workbench/crates/diagnostics)
    Checking mlog v0.0.1 (/workbench/crates/mlog)
    Checking async-dialog v0.0.1 (/workbench/crates/async-dialog)
   Compiling minvmd v0.8.0 (/workbench/crates/minvmd)
    Checking mfile v0.0.1 (/workbench/crates/mfile)
    Checking minimald-rpc v0.0.1 (/workbench/crates/minimald-rpc)
    Checking decode v0.0.1 (/workbench/crates/decode)
    Checking checkouts v0.0.1 (/workbench/crates/checkouts)
    Checking graph v0.0.1 (/workbench/crates/graph)
    Checking minimal-client v0.8.0 (/workbench/crates/minimal-client)
    Checking lcache v0.0.1 (/workbench/crates/lcache)
    Checking rcache v0.0.1 (/workbench/crates/rcache)
    Checking op v0.0.1 (/workbench/crates/op)
    Checking check v0.0.1 (/workbench/crates/check)
    Checking orchestrator v0.0.1 (/workbench/crates/orchestrator)
    Checking mctx v0.0.1 (/workbench/crates/mctx)
    Checking minimald v0.8.0 (/workbench/crates/minimald)
    Checking minimal v0.8.0 (/workbench/crates/minimal)
    Finished `dev` profile [unoptimized] target(s) in 52.33s
   Compiling opentelemetry v0.33.1
   Compiling stdlib v0.0.22 (/workbench/crates/stdlib)
   Compiling version v0.8.0 (/workbench/crates/version)
   Compiling rusty-fork v0.3.1
   Compiling serial_test v4.0.1
   Compiling opentelemetry_sdk v0.33.1
   Compiling tracing-opentelemetry v0.34.0
   Compiling opentelemetry-http v0.33.1
   Compiling opentelemetry-appender-tracing v0.33.1
   Compiling proptest v1.12.0
   Compiling google-cloud-gax-internal v0.7.20
   Compiling opentelemetry-proto v0.33.0
   Compiling opentelemetry-otlp v0.33.0
   Compiling google-cloud-longrunning v1.14.0
   Compiling google-cloud-iam-v1 v1.13.0
   Compiling mlog v0.0.1 (/workbench/crates/mlog)
   Compiling google-cloud-lro v1.11.0
   Compiling google-cloud-storage v1.20.0
   Compiling common v0.0.1 (/workbench/crates/common)
   Compiling boxes v0.0.1 (/workbench/crates/boxes)
   Compiling sandbox v0.0.1 (/workbench/crates/sandbox)
   Compiling mfile v0.0.1 (/workbench/crates/mfile)
   Compiling minimald-rpc v0.0.1 (/workbench/crates/minimald-rpc)
   Compiling decode v0.0.1 (/workbench/crates/decode)
   Compiling checkouts v0.0.1 (/workbench/crates/checkouts)
   Compiling minvmd v0.8.0 (/workbench/crates/minvmd)
   Compiling minimal-client v0.8.0 (/workbench/crates/minimal-client)
   Compiling graph v0.0.1 (/workbench/crates/graph)
   Compiling lcache v0.0.1 (/workbench/crates/lcache)
   Compiling rcache v0.0.1 (/workbench/crates/rcache)
   Compiling op v0.0.1 (/workbench/crates/op)
   Compiling check v0.0.1 (/workbench/crates/check)
   Compiling orchestrator v0.0.1 (/workbench/crates/orchestrator)
   Compiling mctx v0.0.1 (/workbench/crates/mctx)
   Compiling minimald v0.8.0 (/workbench/crates/minimald)
   Compiling minimal v0.8.0 (/workbench/crates/minimal)

Base

The base branch moved while the coder worked; it was merged in before the tests ran.

Closes #2523

Residuals

Creation and min box spec now read the box-zone resolver fact from the
host kind: an own-address box on the VM host resolves through the
switch, whose DNS gate steers the credential module's names. A native
host still refuses dns and both steering with exit 3.
@coderabbitai

coderabbitai Bot commented Oct 31, 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: 4a1ce903-cf4b-4007-b2d3-41ba10d16508

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

…and-both-steering-where-the-host-s-swi

# Conflicts:
#	crates/minimal/src/cmd/boxes/create.rs
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

A merge of main before round 1, not counted against the cap (1 of 3), pushed as 2cbde6a48e31.

Resolved conflicts in: crates/minimal/src/cmd/boxes/create.rs

line exit tail
cargo nextest run -p minimal dns_steering_is_admitted_where_the_switch_resolves_boxes 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-fde4... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling client-config v0.0.1 (/wo
cargo nextest run -p boxes prop_dns_steering_without_resolver_is_exit_3 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-2086... 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 a_dns_steered_grant_box_resolves_the_module_through_the_switch 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-e2e7... 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 timed out after 1800s.

 Checking rusty-fork v0.3.1
    Checking rand_xorshift v0.5.0
    Checking unarray v0.1.4
    Checking core_detect v1.0.0
   Compiling serial_test_derive v4.0.1
    Checking proptest v1.12.0
    Checking serial_test v4.0.1
    Checking common v0.0.1 (/workbench/crates/common)
    Checking boxes v0.0.1 (/workbench/crates/boxes)
    Checking sandbox v0.0.1 (/workbench/crates/sandbox)
    Checking mfile v0.0.1 (/workbench/crates/mfile)
    Checking minimald-rpc v0.0.1 (/workbench/crates/minimald-rpc)
    Checking decode v0.0.1 (/workbench/crates/decode)
    Checking checkouts v0.0.1 (/workbench/crates/checkouts)
    Checking graph v0.0.1 (/workbench/crates/graph)
    Checking minimal-client v0.8.0 (/workbench/crates/minimal-client)
    Checking lcache v0.0.1 (/workbench/crates/lcache)
    Checking rcache v0.0.1 (/workbench/crates/rcache)
    Checking op v0.0.1 (/workbench/crates/op)
    Checking check v0.0.1 (/workbench/crates/check)
    Checking orchestrator v0.0.1 (/workbench/crates/orchestrator)
    Checking mctx v0.0.1 (/workbench/crates/mctx)
    Checking minimald v0.8.0 (/workbench/crates/minimald)
    Checking minimal v0.8.0 (/workbench/crates/minimal)
    Finished `dev` profile [unoptimized] target(s) in 1m 05s
   Compiling opentelemetry v0.33.1
   Compiling stdlib v0.0.22 (/workbench/crates/stdlib)
   Compiling version v0.8.0 (/workbench/crates/version)
   Compiling rusty-fork v0.3.1
   Compiling proptest v1.12.0
   Compiling serial_test v4.0.1
   Compiling opentelemetry_sdk v0.33.1
   Compiling tracing-opentelemetry v0.34.0
   Compiling opentelemetry-http v0.33.1
   Compiling opentelemetry-appender-tracing v0.33.1
   Compiling google-cloud-gax-internal v0.7.20
   Compiling opentelemetry-proto v0.33.0
   Compiling opentelemetry-otlp v0.33.0
   Compiling google-cloud-longrunning v1.14.0
   Compiling google-cloud-iam-v1 v1.13.0
   Compiling mlog v0.0.1 (/workbench/crates/mlog)
   Compiling google-cloud-lro v1.11.0
   Compiling google-cloud-storage v1.20.0
   Compiling common v0.0.1 (/workbench/crates/common)
   Compiling boxes v0.0.1 (/workbench/crates/boxes)
   Compiling sandbox v0.0.1 (/workbench/crates/sandbox)
   Compiling mfile v0.0.1 (/workbench/crates/mfile)
   Compiling minimald-rpc v0.0.1 (/workbench/crates/minimald-rpc)
   Compiling decode v0.0.1 (/workbench/crates/decode)
   Compiling checkouts v0.0.1 (/workbench/crates/checkouts)
   Compiling minvmd v0.8.0 (/workbench/crates/minvmd)
   Compiling minimal-client v0.8.0 (/workbench/crates/minimal-client)
   Compiling graph v0.0.1 (/workbench/crates/graph)
   Compiling lcache v0.0.1 (/workbench/crates/lcache)
   Compiling rcache v0.0.1 (/workbench/crates/rcache)
   Compiling op v0.0.1 (/workbench/crates/op)
   Compiling check v0.0.1 (/workbench/crates/check)
   Compiling orchestrator v0.0.1 (/workbench/crates/orchestrator)
   Compiling mctx v0.0.1 (/workbench/crates/mctx)
   Compiling minimald v0.8.0 (/workbench/crates/minimald)
   Compiling minimal v0.8.0 (/workbench/crates/minimal)

Converted to a draft: something above needs a person before review.

On a VM host, a GitHub grant box with an own address and dns or both steering is now created, and min box spec shows the same steering. Its lookups go through the switch: github.com resolves to the proxy's address while the proxy listens, and gets SERVFAIL while the proxy is down. On a native host the box is still refused with exit 3.

Notes from the agent: This round resolved the merge conflict with main in crates/minimal/src/cmd/boxes/create.rs. I kept host_resolves_box_names from this branch. I dropped store_item, because main removed it and nothing calls it now. Main added two SpecInputs initializers in the box_spec.rs tests. The merge commit gives each of them box_zone_resolver: false, so the test target compiles. cargo nextest run -p minimal box_spec also passes (6 tests).

@norrietaylor
norrietaylor marked this pull request as ready for review October 31, 2026 16:07
@norrietaylor
norrietaylor requested a review from a team as a code owner October 31, 2026 16:07
@minimal-foundry

minimal-foundry Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor Author

Approved: every review thread resolved at 3345800b9201.

@norrietaylor resolved the last thread, which releases the approval this review had withheld.

Nothing to do.

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

Requesting changes at 2cbde6a.

1. dns steering is admitted on the VM host, but a dns-only box cannot reach the proxy. crates/minimal/src/cmd/boxes/create.rs:341 (host_resolves_box_names, used at :1242).

  • Under dns, the gate answers github.com with the proxy's address. HTTPS_PROXY is not set, because BEP-012 sets it only for proxy_env or both. So git opens TCP 443 to the proxy's address.
  • The relay admits only TCP 8118 at that address (proxy_lane_admits, crates/boxes/src/core/egress.rs:1103). Everything else at that address is dropped.
  • The proxy listens only on 8118 (crates/switch/src/bep_host.rs:166). It accepts only CONNECT or absolute-form http:// (crates/bep/src/proxy.rs:440-486). It never reads a bare ClientHello.
  • Result: steering defaults to dns (BEP-016). On macOS, a box with an unadorned GitHub grant used to be refused with exit 3 and told to set steering = "proxy_env". With this change it is created, and every HTTPS connection to github.com times out with no message. This fails closed, so it is not a security problem. It is a correctness regression. The plan's proof, "git reaches GitHub through the proxy with no proxy variables", cannot pass.
  • both works only for clients that read HTTPS_PROXY.

I am asking the owner which way to take this (keep refusing dns and admit only both, or add a 443 path at the proxy). The /revise will name the answer.

2. The min box spec half has no effect. crates/minimal/src/cmd/box_spec.rs:253, test near create.rs:3223.

  • render passes only the BEP-057 refusals through its filter (box_spec.rs:78-86), so box_zone_resolver cannot change what it prints.
  • The test's steering {word} check passes with the field set to false, so it proves nothing.
  • On a native host, min box spec still shows a dns spec as fine, while creating that box exits 3. The plan says min box spec and creation must agree. This comes from the interim in #2445, but the new test must fail when the two disagree.

Arch (local build:arch-review at arch 8640f85e): PASS_WITH_CONDITIONS. BEP-062 and BEP-078 conform. C1: the live proof did not run (git to GitHub through the proxy in a VM, with no proxy variables), and agent-verify timed out. File an issue for that end-to-end check and name it in the PR body as a residual.

The switch change is a test only. No address, port, protocol or per-box scoping changes, and default-deny is unchanged.

@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. It admits dns and both steering only for an own-address box on the VM host. That is the one place where the attach builds a steered DNS gate with the switch's listener state (networking §5.4 line 169, §7.1 line 244). Every other host and mode keeps the BEP-017 refusal with exit 3, so the check fails closed. The new switch test proves SERVFAIL while the proxy is down and the proxy address while it is live. The live-VM proof did not run. This ruling does not depend on it.

Ruled at 2cbde6a against gominimal/arch@8640f85e193d 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 — 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 Oct 31, 2026
A dns-only box gets the proxy's address for github.com but has no
HTTPS_PROXY, so git opens port 443 at an address where only the proxy
port is admitted and the proxy reads only CONNECT or absolute-form
requests. Keep dns refused on every host until the proxy takes a direct
TLS connection, and admit both where the VM host's switch steers names.

min box spec now previews the BEP-017 refusal from the same host fact
creation reads, and the test fails if the two disagree.

@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 — 2 findings, 2 inline.

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

Comment thread crates/minimal/src/cmd/boxes/create.rs Resolved
Comment thread crates/minimal/src/cmd/box_spec.rs Resolved

@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: CONDITIONS · 2 conditions · the full ruling

The change now refuses dns steering on every host, and that refusal fails closed correctly. But dns is the design default (§5.4 line 169), and the gap is in the proxy: §5.7 line 208 says the proxy terminates TLS for steered flows. The interim has no issue, so file one and link it (C1). The refusal also sets HostFacts::box_zone_resolver to false on the VM host. As a result, the message and the info line say the host has no box DNS resolver, which is false. Keep the resolver fact a host fact and give the dns interim its own refusal and spec requirement (C2).

Ruled at 1dd3ce1 against gominimal/arch@8640f85e193d by claude-opus-5-5.

Comment thread crates/minimal/src/cmd/boxes/create.rs Resolved
Comment thread crates/minimal/src/cmd/boxes/create.rs Resolved
Comment thread crates/boxes/src/core/bep.rs Resolved
@minimal-foundry minimal-foundry Bot removed the review:approved minimal-review approved the current head label Oct 31, 2026
@norrietaylor

Copy link
Copy Markdown
Member

The owner's answer to finding 1 of my review: admit only both.

  • Keep refusing dns with exit 3 everywhere (BEP-017), the VM host included.
  • Admit both where the host resolves box names (the VM host, own_ip). There, HTTPS_PROXY carries the traffic.
  • The 443 path that would let dns work is filed as T116 — Carry dns-steered TLS to the proxy on port 443 #2805.
  • Finding 2 still applies: the min box spec test must fail when spec rendering and creation disagree.
  • Arch C1: name the live proof as an unrun residual in the PR body. That proof is git reaching GitHub through the proxy under both steering in a VM.

If the round now running already took another direction, I will post a /revise with this answer when it lands.

@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on a review requesting changes, pushed as 1dd3ce192597.

line exit tail
cargo nextest run -p minimal dns_steering_is_admitted_where_the_switch_resolves_boxes 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-8970... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling client-config v0.0.1 (/wo
cargo nextest run -p boxes prop_dns_steering_without_resolver_is_exit_3 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-eacb... 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 a_dns_steered_grant_box_resolves_the_module_through_the_switch 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-7842... 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 timed out after 1800s.

 Checking rusty-fork v0.3.1
    Checking rand_xorshift v0.5.0
    Checking core_detect v1.0.0
    Checking unarray v0.1.4
   Compiling serial_test_derive v4.0.1
    Checking proptest v1.12.0
    Checking serial_test v4.0.1
    Checking common v0.0.1 (/workbench/crates/common)
    Checking boxes v0.0.1 (/workbench/crates/boxes)
    Checking sandbox v0.0.1 (/workbench/crates/sandbox)
    Checking mfile v0.0.1 (/workbench/crates/mfile)
    Checking minimald-rpc v0.0.1 (/workbench/crates/minimald-rpc)
    Checking decode v0.0.1 (/workbench/crates/decode)
    Checking checkouts v0.0.1 (/workbench/crates/checkouts)
    Checking graph v0.0.1 (/workbench/crates/graph)
    Checking minimal-client v0.8.0 (/workbench/crates/minimal-client)
    Checking lcache v0.0.1 (/workbench/crates/lcache)
    Checking rcache v0.0.1 (/workbench/crates/rcache)
    Checking op v0.0.1 (/workbench/crates/op)
    Checking check v0.0.1 (/workbench/crates/check)
    Checking orchestrator v0.0.1 (/workbench/crates/orchestrator)
    Checking mctx v0.0.1 (/workbench/crates/mctx)
    Checking minimald v0.8.0 (/workbench/crates/minimald)
    Checking minimal v0.8.0 (/workbench/crates/minimal)
    Finished `dev` profile [unoptimized] target(s) in 1m 13s
   Compiling opentelemetry v0.33.1
   Compiling stdlib v0.0.22 (/workbench/crates/stdlib)
   Compiling version v0.8.0 (/workbench/crates/version)
   Compiling rusty-fork v0.3.1
   Compiling proptest v1.12.0
   Compiling serial_test v4.0.1
   Compiling opentelemetry_sdk v0.33.1
   Compiling tracing-opentelemetry v0.34.0
   Compiling opentelemetry-http v0.33.1
   Compiling opentelemetry-appender-tracing v0.33.1
   Compiling google-cloud-gax-internal v0.7.20
   Compiling opentelemetry-proto v0.33.0
   Compiling opentelemetry-otlp v0.33.0
   Compiling google-cloud-longrunning v1.14.0
   Compiling google-cloud-iam-v1 v1.13.0
   Compiling mlog v0.0.1 (/workbench/crates/mlog)
   Compiling google-cloud-lro v1.11.0
   Compiling google-cloud-storage v1.20.0
   Compiling common v0.0.1 (/workbench/crates/common)
   Compiling boxes v0.0.1 (/workbench/crates/boxes)
   Compiling sandbox v0.0.1 (/workbench/crates/sandbox)
   Compiling mfile v0.0.1 (/workbench/crates/mfile)
   Compiling minimald-rpc v0.0.1 (/workbench/crates/minimald-rpc)
   Compiling decode v0.0.1 (/workbench/crates/decode)
   Compiling checkouts v0.0.1 (/workbench/crates/checkouts)
   Compiling minvmd v0.8.0 (/workbench/crates/minvmd)
   Compiling minimal-client v0.8.0 (/workbench/crates/minimal-client)
   Compiling graph v0.0.1 (/workbench/crates/graph)
   Compiling lcache v0.0.1 (/workbench/crates/lcache)
   Compiling rcache v0.0.1 (/workbench/crates/rcache)
   Compiling op v0.0.1 (/workbench/crates/op)
   Compiling check v0.0.1 (/workbench/crates/check)
   Compiling orchestrator v0.0.1 (/workbench/crates/orchestrator)
   Compiling mctx v0.0.1 (/workbench/crates/mctx)
   Compiling minimald v0.8.0 (/workbench/crates/minimald)
   Compiling minimal v0.8.0 (/workbench/crates/minimal)

Converted to a draft: something above needs a person before review.

On the VM host, an own-address GitHub grant box with steering = "both" is created. Its switch steers the GitHub names to the proxy while the listener is live and answers SERVFAIL while it is down, so its credentialed names fail closed. min box spec now refuses exactly when creation refuses. A box with dns steering, declared or by default, is still refused with exit 3 on every host. So the part of the proof that says git reaches GitHub with no proxy variables is NOT delivered: the proxy does not take a direct TLS connection.

Notes from the agent: Review item 1 (dns admitted but cannot reach the proxy): valid. The review defers the direction to the owner, and this directive names no answer. I took the fix that holds under both answers. host_resolves_box_names now takes the resolved steering and is true only for both on an own-address VM-host box. dns stays refused everywhere. A 443 path at the proxy (crates/bep/src/proxy.rs, crates/switch/src/bep_host.rs, the relay rule in crates/boxes/src/core/egress.rs) is outside this task's layers. When that path lands, a follow-up task can admit dns by widening the one predicate. Review item 2 (min box spec has no effect): valid. render now passes BepRefusal::NoResolver through its filter. The test now compares creation with the preview for dns/both on VM own-address, native own-address and VM host_ip, and fails if the two disagree. The quic443 test in box_spec.rs used dns, which the preview now refuses. It uses both now, and Quic443::blocks treats both the same as dns. Printed text: on the VM host, a dns box gets the existing BEP-017 refusal, 'This box declares a secret with steering = "dns", but this host has no box DNS resolver. Set steering = "proxy_env" in [network.bep].' On that host, 'has no box DNS resolver' is not exactly the cause. The cause is that the proxy takes no direct connection. The remedy in the message is correct. I kept the pinned wording, because a new refusal is new printed text that …[truncated]

@minimal-foundry
minimal-foundry Bot marked this pull request as draft October 31, 2026 16:57
@norrietaylor

Copy link
Copy Markdown
Member

/revise

Round 1 took the owner's direction: admit only both, and keep min box spec in step with creation. Keep that. Then meet the two arch conditions on 1dd3ce1:

  1. C2, a truthful refusal for dns.
    • Keep HostFacts::box_zone_resolver a host fact: true for an own-address box on the VM host, whatever the steering. Undo folding the steering into host_resolves_box_names.
    • Add a separate BepRefusal variant for steering = "dns" with a credentialed upstream on a host that has the resolver.
    • Its text must not say the host lacks a resolver. State that the Box Egress Proxy does not yet take a direct TLS connection, so dns steering cannot reach it. Name both remedies: steering = "both" or steering = "proxy_env" in [network.bep].
    • Exit 3, as for BEP-017.
    • NoResolver keeps its current meaning. Make its remedy name "both" only where both can work, which today is never on a host without the resolver, so leave it as is.
    • Pin the new text in a test. Keep min box spec refusing exactly when creation does, for both variants.
  2. C1, link the interim. In the PR body, name T116 — Carry dns-steered TLS to the proxy on port 443 #2805 as the issue that lifts the dns refusal (a direct TLS path at the proxy), and add a short note to the spec next to BEP-017 that points at it. Then name the unrun live proof (git to GitHub through the proxy under both steering in a VM) as a residual.

Change nothing in crates/minimald/src/net/switch.rs beyond its test.

… fact

host_resolves_box_names reads only the host kind and the network mode
again, so box_zone_resolver is true for an own-address box on the VM
host whatever its steering. A new DnsWithoutDirectTls refusal (exit 3)
covers dns steering with a credentialed upstream where the host has the
resolver: it says the Box Egress Proxy does not yet take a direct TLS
connection and names both remedies. The interim lifts with #2805.

min box spec previews the new refusal, so it refuses exactly when
creation does, for both refusals.
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 2 of 10 on a /revise note, pushed as 9ee675d4996f.

line exit tail
cargo nextest run -p minimal dns_steering_is_admitted_where_the_switch_resolves_boxes 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-bd4a... 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
cargo nextest run -p boxes prop_dns_steering_without_resolver_is_exit_3 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-0cbf... 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 a_dns_steered_grant_box_resolves_the_module_through_the_switch 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-221c... 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 timed out after 1800s.

ench/crates/mlog)
   Compiling minvmd v0.8.0 (/workbench/crates/minvmd)
    Checking google-cloud-lro v1.11.0
   Compiling serial_test_derive v4.0.1
    Checking google-cloud-storage v1.20.0
    Checking serial_test v4.0.1
    Checking common v0.0.1 (/workbench/crates/common)
    Checking boxes v0.0.1 (/workbench/crates/boxes)
    Checking sandbox v0.0.1 (/workbench/crates/sandbox)
    Checking mfile v0.0.1 (/workbench/crates/mfile)
    Checking minimald-rpc v0.0.1 (/workbench/crates/minimald-rpc)
    Checking decode v0.0.1 (/workbench/crates/decode)
    Checking checkouts v0.0.1 (/workbench/crates/checkouts)
    Checking minimal-client v0.8.0 (/workbench/crates/minimal-client)
    Checking graph v0.0.1 (/workbench/crates/graph)
    Checking lcache v0.0.1 (/workbench/crates/lcache)
    Checking rcache v0.0.1 (/workbench/crates/rcache)
    Checking op v0.0.1 (/workbench/crates/op)
    Checking check v0.0.1 (/workbench/crates/check)
    Checking orchestrator v0.0.1 (/workbench/crates/orchestrator)
    Checking mctx v0.0.1 (/workbench/crates/mctx)
    Checking minimald v0.8.0 (/workbench/crates/minimald)
    Checking minimal v0.8.0 (/workbench/crates/minimal)
    Finished `dev` profile [unoptimized] target(s) in 1m 07s
   Compiling opentelemetry v0.33.1
   Compiling stdlib v0.0.22 (/workbench/crates/stdlib)
   Compiling version v0.8.0 (/workbench/crates/version)
   Compiling rusty-fork v0.3.1
   Compiling serial_test v4.0.1
   Compiling opentelemetry_sdk v0.33.1
   Compiling tracing-opentelemetry v0.34.0
   Compiling opentelemetry-http v0.33.1
   Compiling opentelemetry-appender-tracing v0.33.1
   Compiling proptest v1.12.0
   Compiling google-cloud-gax-internal v0.7.20
   Compiling opentelemetry-proto v0.33.0
   Compiling opentelemetry-otlp v0.33.0
   Compiling mlog v0.0.1 (/workbench/crates/mlog)
   Compiling google-cloud-longrunning v1.14.0
   Compiling google-cloud-iam-v1 v1.13.0
   Compiling google-cloud-lro v1.11.0
   Compiling google-cloud-storage v1.20.0
   Compiling common v0.0.1 (/workbench/crates/common)
   Compiling boxes v0.0.1 (/workbench/crates/boxes)
   Compiling sandbox v0.0.1 (/workbench/crates/sandbox)
   Compiling mfile v0.0.1 (/workbench/crates/mfile)
   Compiling minimald-rpc v0.0.1 (/workbench/crates/minimald-rpc)
   Compiling decode v0.0.1 (/workbench/crates/decode)
   Compiling checkouts v0.0.1 (/workbench/crates/checkouts)
   Compiling minvmd v0.8.0 (/workbench/crates/minvmd)
   Compiling minimal-client v0.8.0 (/workbench/crates/minimal-client)
   Compiling graph v0.0.1 (/workbench/crates/graph)
   Compiling lcache v0.0.1 (/workbench/crates/lcache)
   Compiling rcache v0.0.1 (/workbench/crates/rcache)
   Compiling op v0.0.1 (/workbench/crates/op)
   Compiling orchestrator v0.0.1 (/workbench/crates/orchestrator)
   Compiling check v0.0.1 (/workbench/crates/check)
   Compiling mctx v0.0.1 (/workbench/crates/mctx)
   Compiling minimald v0.8.0 (/workbench/crates/minimald)
   Compiling minimal v0.8.0 (/workbench/crates/minimal)

Converted to a draft: something above needs a person before review.

Review threads the coder judged:

  • 👍 valid — crates/minimal/src/cmd/boxes/create.rs: dns is still refused, as the owner chose, but now through its own refusal, DnsWithoutDirectTls, which names the missing direct TLS path at the proxy (T116 — Carry dns-steered TLS to the proxy on port 443 #2805). The host fact no longer reads the steering. The test now pins both texts, so its name and its assertions agree.
  • 👎 invalid — crates/minimal/src/cmd/box_spec.rs:260: min box spec has no --network flag and does not read a network mode from minimal.toml. Creation gets the mode only from min new --network, which defaults to own_ip. The preview is of the default own-address box, so it cannot know about a host_ip box that a later flag asks for.
  • 👍 valid — crates/minimal/src/cmd/boxes/create.rs: The comment on host_resolves_box_names and the new refusal's doc and log rule now name T116 — Carry dns-steered TLS to the proxy on port 443 #2805 as the issue that lifts the dns interim. The spec note next to BEP-017 is outside this task's layers and is left for a follow-up.
  • 👍 valid — crates/minimal/src/cmd/boxes/create.rs: I took steering out of host_resolves_box_names. dns is now refused in refusals() through BepRefusal::DnsWithoutDirectTls, so the VM host logs box_zone_resolver=true and never prints the no-resolver text.
  • 👍 valid — crates/boxes/src/core/bep.rs: HostFacts::box_zone_resolver is documented as a host fact again, from the host kind and network mode only. The dns case is the new BepRefusal::DnsWithoutDirectTls variant with its own message. It has no spec ID yet, because the spec is outside the layers.

On the VM host, an own-address GitHub grant box with steering = "both" is created, and min box spec shows steering both. A box with steering = "dns" there is refused with exit 3. Its message says that the Box Egress Proxy does not yet take a direct TLS connection, and it names steering = "both" or steering = "proxy_env". On a native host, both modes are still refused for the missing box DNS resolver. min box spec refuses exactly when creation does, with the same text. The switch test pins that github.com resolves to the proxy's address while its listener is live, and gets SERVFAIL while it is down. Residual: nobody ran the live proof (git to GitHub through the proxy under both steering, in a VM). The dns refusal lifts with #2805, which adds a direct TLS path at the proxy.

Notes from the agent: Revise round 2. C2: host_resolves_box_names reads only the host kind and the network mode again, so HostFacts::box_zone_resolver is a host fact, and the info line logs the true value. The new BepRefusal::DnsWithoutDirectTls fires for dns steering with a credentialed upstream where the resolver is present. It exits 3. Its text is pinned in both test lines and in steering_defaults_to_dns. NoResolver is unchanged. Its log rule is "BEP-017 interim (#2805)", because the spec has no requirement ID for it yet. min box spec previews the new variant. I updated two older bep tests (steering_defaults_to_dns, a_store_grant_parses_store_and_id_not_a_broker_scope), because they assumed that default dns was admitted with the resolver. C1: the spec document is outside this task's layers, and the coder instructions forbid me to open it. So I did not add the note next to BEP-017 that points at #2805. A follow-up must add it. Please put #2805 in the PR body as the issue that lifts the dns refusal, and put the unrun live VM proof under both steering as a residual. switch.rs is unchanged this round. This round did not run just clippy-strict.

@norrietaylor

Copy link
Copy Markdown
Member

/revise

Round 2 meets arch C2. Keep DnsWithoutDirectTls, its text, and box_zone_resolver as a host fact. Then:

  1. Merge origin/main. crates/minimal/src/cmd/boxes/create.rs conflicts with T98 — Seal a store handle per accepted store rule at box creation #2803 (T98, store handles), which merged at 18:06Z. Keep both: T98 — Seal a store handle per accepted store rule at box creation #2803's store minting and its store-only refusal text, and this PR's steering checks. Re-run the named tests.
  2. Arch C1: in the PR body, add a residuals section. It names T116 — Carry dns-steered TLS to the proxy on port 443 #2805 as the issue that lifts the dns refusal (a direct TLS path at the proxy). It also names the unrun live proof: git reaching GitHub through the proxy under both steering in a VM.
  3. Remove the code comment // The revise note on #2797 fixes what this says. in crates/boxes/src/core/bep.rs. The text it points to is final.

Do not touch the spec in this PR.

…and-both-steering-where-the-host-s-swi

# Conflicts:
#	crates/minimal/src/cmd/boxes/create.rs
@norrietaylor

Copy link
Copy Markdown
Member

/revise

Thread PRRT_kwDOPdfcxM6yUC20 is valid. My earlier support for the dispute on PRRT_kwDOPdfcxM6ySe7c was wrong. min box create --network defaults to host_ip (crates/minimal/src/cli.rs:745). cmd_box_spec (crates/minimal/src/cmd/box_spec.rs:~260) computes box_zone_resolver for NetworkMode::OwnIp. So min box spec accepts a both grant box, and a default min box create refuses the same spec with the no-resolver text.

  1. Make the preview use the network mode that creation uses by default. Take it from the same source as the --network default (host_ip), so the two cannot drift. Do not hard-code OwnIp.
  2. Pin it with a test: for a spec with a credentialed upstream and steering = "both" on the VM host, min box spec's refusals equal those of a default min box create.
  3. Update the doc on host_resolves_box_names and on the preview so they say the preview is of a default box.

Change nothing else.

min box spec computed the box DNS resolver fact for an own_ip box, but
min box create defaults --network to host_ip. On the VM host the preview
accepted a both-steered grant box that a default creation refused. The
preview now reads the --network default from the flag's definition.

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

Approving at eff2b89. Round 5 fixes the preview mismatch:

  • min box spec reads box_zone_resolver through preview_box_zone_resolver, for the network of a default box.
  • default_box_network() takes that network from the --network flag's own clap default (host_ip), so it cannot drift.
  • The new test asserts that a default min box create and min box spec give the same refusal on the VM host and the native host.

Everything else in the compare comes from the merges of main (#2801, #2808).

@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 5 of 10 on a /revise note, pushed as eff2b899bdae.

line exit tail
cargo nextest run -p minimal dns_steering_is_admitted_where_the_switch_resolves_boxes 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-3d38... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling client-config v0.0.1 (/wo
cargo nextest run -p boxes prop_dns_steering_without_resolver_is_exit_3 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-9508... 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 a_dns_steered_grant_box_resolves_the_module_through_the_switch 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-0287... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling client-config v0.0.1 (/wo

Verify min task run agent-verify timed out after 1800s.

 Checking rusty-fork v0.3.1
    Checking rand_xorshift v0.5.0
    Checking core_detect v1.0.0
    Checking unarray v0.1.4
   Compiling serial_test_derive v4.0.1
    Checking proptest v1.12.0
    Checking serial_test v4.0.1
    Checking common v0.0.1 (/workbench/crates/common)
    Checking boxes v0.0.1 (/workbench/crates/boxes)
    Checking sandbox v0.0.1 (/workbench/crates/sandbox)
    Checking mfile v0.0.1 (/workbench/crates/mfile)
    Checking minimald-rpc v0.0.1 (/workbench/crates/minimald-rpc)
    Checking decode v0.0.1 (/workbench/crates/decode)
    Checking checkouts v0.0.1 (/workbench/crates/checkouts)
    Checking minimal-client v0.8.0 (/workbench/crates/minimal-client)
    Checking graph v0.0.1 (/workbench/crates/graph)
    Checking lcache v0.0.1 (/workbench/crates/lcache)
    Checking rcache v0.0.1 (/workbench/crates/rcache)
    Checking op v0.0.1 (/workbench/crates/op)
    Checking check v0.0.1 (/workbench/crates/check)
    Checking orchestrator v0.0.1 (/workbench/crates/orchestrator)
    Checking mctx v0.0.1 (/workbench/crates/mctx)
    Checking minimald v0.8.0 (/workbench/crates/minimald)
    Checking minimal v0.8.0 (/workbench/crates/minimal)
    Finished `dev` profile [unoptimized] target(s) in 55.06s
   Compiling opentelemetry v0.33.1
   Compiling stdlib v0.0.22 (/workbench/crates/stdlib)
   Compiling version v0.8.0 (/workbench/crates/version)
   Compiling rusty-fork v0.3.1
   Compiling serial_test v4.0.1
   Compiling opentelemetry_sdk v0.33.1
   Compiling tracing-opentelemetry v0.34.0
   Compiling opentelemetry-http v0.33.1
   Compiling opentelemetry-appender-tracing v0.33.1
   Compiling proptest v1.12.0
   Compiling google-cloud-gax-internal v0.7.20
   Compiling opentelemetry-proto v0.33.0
   Compiling opentelemetry-otlp v0.33.0
   Compiling google-cloud-longrunning v1.14.0
   Compiling google-cloud-iam-v1 v1.13.0
   Compiling mlog v0.0.1 (/workbench/crates/mlog)
   Compiling google-cloud-lro v1.11.0
   Compiling google-cloud-storage v1.20.0
   Compiling common v0.0.1 (/workbench/crates/common)
   Compiling boxes v0.0.1 (/workbench/crates/boxes)
   Compiling sandbox v0.0.1 (/workbench/crates/sandbox)
   Compiling mfile v0.0.1 (/workbench/crates/mfile)
   Compiling minimald-rpc v0.0.1 (/workbench/crates/minimald-rpc)
   Compiling decode v0.0.1 (/workbench/crates/decode)
   Compiling checkouts v0.0.1 (/workbench/crates/checkouts)
   Compiling minimal-client v0.8.0 (/workbench/crates/minimal-client)
   Compiling graph v0.0.1 (/workbench/crates/graph)
   Compiling lcache v0.0.1 (/workbench/crates/lcache)
   Compiling rcache v0.0.1 (/workbench/crates/rcache)
   Compiling op v0.0.1 (/workbench/crates/op)
   Compiling check v0.0.1 (/workbench/crates/check)
   Compiling orchestrator v0.0.1 (/workbench/crates/orchestrator)
   Compiling minvmd v0.8.0 (/workbench/crates/minvmd)
   Compiling mctx v0.0.1 (/workbench/crates/mctx)
   Compiling minimald v0.8.0 (/workbench/crates/minimald)
   Compiling minimal v0.8.0 (/workbench/crates/minimal)

Converted to a draft: something above needs a person before review.

Review threads the coder judged:

  • 👍 valid — crates/minimald/src/net/switch.rs:8032: Agreed on scope: the switch test proves only the gate's answers (proxy address while live, SERVFAIL while down). No code change this round. The live leg, where git reaches GitHub in a VM, is owed under Prove both steering live: git reaches GitHub through the proxy from a VM box #2813, and the result is recorded there.
  • 👍 valid — crates/minimal/src/cmd/box_spec.rs: min box spec now computes box_zone_resolver for a default box. The network comes from the --network default (host_ip), read from the flag's clap definition. A test pins that its refusals equal a default min box create's on the VM host with steering = "both".

On the VM host, an own_ip GitHub grant box with steering = "both" is admitted, and min box spec shows its steering. The switch test shows that github.com resolves to the proxy's address while the listener is live and gets SERVFAIL while it is down. min box spec now previews a default box (--network host_ip), so it refuses exactly what a default min box create refuses. This branch does not show the live leg, where git reaches GitHub from inside a VM. That leg is owed under #2813.

Notes from the agent: Round 5 changes only what the directive asks for. The new create.rs function default_box_network reads the --network default from the clap definition of ActivateArgs, so cli.rs stays untouched and the value cannot drift. min box spec reads it through box_spec::preview_box_zone_resolver. The docs on host_resolves_box_names and on the preview now say that the preview is of a default box. The named minimal test now also checks that, for each steering (both included), on the VM host and on a native host, the refusal from min box spec equals the refusal from a default min box create. Against the old OwnIp preview, this check fails on the VM host for both. I did not run the live VM leg (git to GitHub in a VM). That leg is owed under #2813.

@norrietaylor
norrietaylor marked this pull request as ready for review October 31, 2026 21:16

@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 — 1 finding, 1 inline.

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

Comment thread crates/minimal/src/cmd/box_spec.rs Resolved

@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_WITH_CONDITIONS · 1 condition · the full ruling

This push makes the min box spec preview agree with a default min box create, and the preview now fails closed. The switch gate and the admission rules keep the status of the last ruling. One gap stays open. min box create --network own_ip admits a both grant box on the VM host, but the preview of that box refuses it. Design line 476 gives min box spec a --network <mode> flag, and line 489 says the preview shows what the entry gets. Add the flag as C1 says, or file C1 as an issue and link it from the PR.

Ruled at eff2b89 against gominimal/arch@8640f85e193d by claude-opus-5-5.

Comment thread crates/minimal/src/cmd/box_spec.rs Resolved
Comment thread crates/minimal/src/cmd/box_spec.rs Resolved
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 6 of 10 on the runtime's review findings: the coder changed nothing. Revise round 6. I changed no code this round. The one open thread asks min box spec to show the own_ip admission. That needs a --network flag on BoxSpecArgs in crates/minimal/src/cli.rs, which is outside the task's layers. A follow-up issue can add it, and box_spec.rs can then pass that network to host_resolves_box_names in place of default_box_network(). I ran all three test lines at the merged head (a322bbbd), and each one passed.

Review threads the coder judged:

  • 👎 invalid — crates/minimal/src/cmd/box_spec.rs:271: This was deliberate (6aa6f8e). min box spec has no network input, so it previews a default box (host_ip) and refuses only what a default min box create refuses. The default-network loop in dns_steering_is_admitted_where_the_switch_resolves_boxes calls the real preview_box_zone_resolver and pins tha

@norrietaylor

Copy link
Copy Markdown
Member

/revise

The owner accepted crates/minimal/src/cli.rs into this task's scope (2026-10-31) for the minimal-arch C1 (threads on box_spec.rs:269 and :256). Design line 476 gives min box spec a --network <mode> flag.

  1. Add --network <none|host_ip|own_ip> to BoxSpecArgs in crates/minimal/src/cli.rs. Use the same parser, default (host_ip) and help text as min box create --network, from one shared definition so the two cannot drift.
  2. Put the network in SpecInputs. cmd_box_spec computes box_zone_resolver as host_resolves_box_names(kind, network). render builds its ActivationSpec from that network, not from the hard-coded NetworkMode::OwnIp. Remove preview_box_zone_resolver and default_box_network if they are no longer needed.
  3. Tests, through the production path:
    • On the VM host, min box spec --network own_ip admits a both spec with a credentialed upstream.
    • With no flag, it refuses that spec as a default min box create does.
    • For each network mode and both host kinds, min box spec --network <mode> and min box create --network <mode> give the same refusals.
  4. Update docs/reference/cli-min.md for the new flag.

Change nothing else.

min box spec previewed a host_ip box, so it refused a both-steered
grant box on the VM host that min session activate --network own_ip
admits. The flag now shares one definition (parser, default, help)
with min session activate --network. The preview builds its spec and
reads the host fact from that network, and it now previews the
no-network refusal that the network decides.

@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 — approval withheld

Verdict COMMENT — APPROVE withheld: 3 unresolved threads — minimal-foundry[bot] crates/minimal/src/cmd/box_spec.rs, minimal-arch[bot] crates/minimal/src/cmd/box_spec.rs, minimal-arch[bot] crates/minimal/src/cmd/box_spec.rs. No findings.

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

@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_WITH_CONDITIONS · 1 condition · the full ruling

The compare conforms. min box spec --network now shares one definition with min session activate --network. The preview reads the same host fact as creation, as architecture.md line 1202 requires. The steered switch gate is unchanged from the baseline. The live VM proof is still open. C1 keeps it as the #2813 residual, and #2805 stays a residual for dns steering.

Ruled at 3345800 against gominimal/arch@8640f85e193d by claude-opus-5-5.

Comment thread crates/minimal/src/cmd/boxes/create.rs Resolved

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

Approving at 3345800. Round 7 meets the minimal-arch C1 on eff2b89:

  • min box spec takes --network. The value name, host_ip default and help are shared with min session activate through NETWORK_* in cli.rs.
  • SpecInputs carries the network. render builds the spec from it, and preview_host reads host_resolves_box_names(kind, network).
  • The test parses real argv for both commands for each mode and host kind, and asserts the same refusals.
  • docs/reference/cli-min.md documents the flag.

cli.rs is in scope by the owner's decision. The rest of the compare comes from merges of main.

@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 — every review thread is resolved; @norrietaylor closed the last one. The review of 3345800b9201 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.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 31, 2026
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 7 of 10 on a /revise note, pushed as 3345800b9201.

line exit tail
cargo nextest run -p minimal dns_steering_is_admitted_where_the_switch_resolves_boxes 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-342f... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling client-config v0.0.1 (/wo
cargo nextest run -p boxes prop_dns_steering_without_resolver_is_exit_3 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-5b89... 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 a_dns_steered_grant_box_resolves_the_module_through_the_switch 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-4392... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling client-config v0.0.1 (/wo

Verify min task run agent-verify timed out after 1800s.

 Checking rusty-fork v0.3.1
    Checking rand_xorshift v0.5.0
    Checking core_detect v1.0.0
    Checking unarray v0.1.4
   Compiling serial_test_derive v4.0.1
    Checking proptest v1.12.0
    Checking serial_test v4.0.1
    Checking common v0.0.1 (/workbench/crates/common)
    Checking boxes v0.0.1 (/workbench/crates/boxes)
    Checking sandbox v0.0.1 (/workbench/crates/sandbox)
    Checking mfile v0.0.1 (/workbench/crates/mfile)
    Checking minimald-rpc v0.0.1 (/workbench/crates/minimald-rpc)
    Checking decode v0.0.1 (/workbench/crates/decode)
    Checking checkouts v0.0.1 (/workbench/crates/checkouts)
    Checking minimal-client v0.8.0 (/workbench/crates/minimal-client)
    Checking graph v0.0.1 (/workbench/crates/graph)
    Checking lcache v0.0.1 (/workbench/crates/lcache)
    Checking rcache v0.0.1 (/workbench/crates/rcache)
    Checking op v0.0.1 (/workbench/crates/op)
    Checking orchestrator v0.0.1 (/workbench/crates/orchestrator)
    Checking check v0.0.1 (/workbench/crates/check)
    Checking mctx v0.0.1 (/workbench/crates/mctx)
    Checking minimald v0.8.0 (/workbench/crates/minimald)
    Checking minimal v0.8.0 (/workbench/crates/minimal)
    Finished `dev` profile [unoptimized] target(s) in 55.40s
   Compiling opentelemetry v0.33.1
   Compiling stdlib v0.0.22 (/workbench/crates/stdlib)
   Compiling version v0.8.0 (/workbench/crates/version)
   Compiling rusty-fork v0.3.1
   Compiling serial_test v4.0.1
   Compiling proptest v1.12.0
   Compiling opentelemetry_sdk v0.33.1
   Compiling tracing-opentelemetry v0.34.0
   Compiling opentelemetry-http v0.33.1
   Compiling opentelemetry-appender-tracing v0.33.1
   Compiling google-cloud-gax-internal v0.7.20
   Compiling opentelemetry-proto v0.33.0
   Compiling opentelemetry-otlp v0.33.0
   Compiling google-cloud-longrunning v1.14.0
   Compiling google-cloud-iam-v1 v1.13.0
   Compiling mlog v0.0.1 (/workbench/crates/mlog)
   Compiling google-cloud-lro v1.11.0
   Compiling google-cloud-storage v1.20.0
   Compiling common v0.0.1 (/workbench/crates/common)
   Compiling boxes v0.0.1 (/workbench/crates/boxes)
   Compiling sandbox v0.0.1 (/workbench/crates/sandbox)
   Compiling mfile v0.0.1 (/workbench/crates/mfile)
   Compiling minimald-rpc v0.0.1 (/workbench/crates/minimald-rpc)
   Compiling decode v0.0.1 (/workbench/crates/decode)
   Compiling checkouts v0.0.1 (/workbench/crates/checkouts)
   Compiling minimal-client v0.8.0 (/workbench/crates/minimal-client)
   Compiling graph v0.0.1 (/workbench/crates/graph)
   Compiling lcache v0.0.1 (/workbench/crates/lcache)
   Compiling rcache v0.0.1 (/workbench/crates/rcache)
   Compiling op v0.0.1 (/workbench/crates/op)
   Compiling check v0.0.1 (/workbench/crates/check)
   Compiling orchestrator v0.0.1 (/workbench/crates/orchestrator)
   Compiling minvmd v0.8.0 (/workbench/crates/minvmd)
   Compiling mctx v0.0.1 (/workbench/crates/mctx)
   Compiling minimald v0.8.0 (/workbench/crates/minimald)
   Compiling minimal v0.8.0 (/workbench/crates/minimal)

Outside the task's layers::

  • crates/minimal/src/cli.rs
  • docs/reference/cli-min.md

Converted to a draft: something above needs a person before review.

Review threads the coder judged:

  • 👍 valid — PRRT_kwDOPdfcxM6yUtQx: Added --network to BoxSpecArgs, which shares its parser, default host_ip and help with min session activate --network. cmd_box_spec passes host_resolves_box_names(kind, args.network.into()) through preview_host. (not posted on the thread: not an open thread on the pull request)
  • 👍 valid — PRRT_kwDOPdfcxM6yUtQ0: SpecInputs now carries network. render builds its ActivationSpec from inputs.network and not from a hard-coded OwnIp, so the fact and the spec describe the same box. (not posted on the thread: not an open thread on the pull request)

On the VM host, a GitHub grant box with both steering is admitted by min session activate --network own_ip, and min box spec --network own_ip now shows the same box with 'steering both'. With no flag, or with any other mode, or on a native host, both commands refuse the spec with exit 3 and the same text. The switch test pins that a steered name resolves to the proxy while its listener is live and fails closed while it is down.

Notes from the agent: Revise round 7. cli.rs: the owner accepted it into scope. min box spec takes --network <none|host_ip|own_ip>. The flag uses the same parse_network_mode, default and help as min session activate --network, through the shared constants NETWORK_VALUE_NAME, NETWORK_DEFAULT, NETWORK_HELP and NETWORK_LONG_HELP. I did not flatten a shared struct into ActivateArgs, because that breaks the ActivateArgs struct literals in list.rs, attach.rs, vm_host.rs and tests.rs, which are outside the layers. The rendered help of min session activate is unchanged. The directive says 'min box create'. The command that creates a box from ActivateArgs is min session activate, so the tests and docs name that command. SpecInputs has a network field now. render builds its ActivationSpec from it. cmd_box_spec computes box_zone_resolver through preview_host, which calls host_resolves_box_names(kind, network). Creation computes its fact through the new creation_host(kind, &ActivateArgs). preview_box_zone_resolver and default_box_network are removed. One change beyond the directive's list: render now also previews BepRefusal::NoNetworkWithGrant (BEP-009). Without it, --network none gives different refusals from the two commands, so item 3 cannot hold. The test parses real argv for both commands, for no flag and for each mode on both host kinds, and asserts the same network, the same host fact and the same refusal text. Creation gets an egress that allows the GitHub hosts in the test, because min box spec has no egress flags and the preview …[truncated]

@minimal-foundry
minimal-foundry Bot marked this pull request as draft October 31, 2026 22:31
@norrietaylor
norrietaylor marked this pull request as ready for review October 31, 2026 22:45
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 31, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 31, 2026
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 31, 2026
Merged via the queue into main with commit 6898af6 Oct 31, 2026
36 checks passed
@norrietaylor
norrietaylor deleted the agent/2523-admit-dns-and-both-steering-where-the-host-s-swi branch October 31, 2026 23:30
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.

T113 — Admit dns and both steering where the host's switch resolves box names

1 participant