Repository navigation
feat(minimald): steer the credentialed names of dns and both boxes through the gate (T58) - #2567
Conversation
The in-VM daemon cannot see the Box Egress Proxy, which runs on the host. Add a ProxyListening verb to the box control wire, served on the guest report door from the proxy's own listening flag, and false when the boot runs no proxy. The DNS gate of a dns or both box reads it before it answers a steered name (BEP-062). minimald's native control socket and minimal-client's registration reply match the new variants so the workspace still compiles.
…roxy BoxGate now builds every box's DNS gate with the GitHub module's names steered to the Box Egress Proxy's switch address when the box's steering resolves to dns or both. The switch shares one listener state, which asks the VM host daemon over the report door whether the proxy listens and caches the answer for two seconds. A native host has no one to ask, so its steered names always get SERVFAIL (BEP-062). minimald now depends on bep for the module host set, so Cargo.toml and Cargo.lock change.
The relay's DNS gate now steers dns and both boxes' credentialed names, so leg 1 of bep_dns_steering_fails_closed_end_to_end is a hard assertion: a lookup that is not SERVFAIL while the proxy is down fails the case. The known-gap branch goes.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Approved: every review thread resolved at @norrietaylor resolved the last thread, which releases the approval this review had withheld. Nothing to do. |
…s-or-both-box-s-credentialed-names-thr
There was a problem hiding this comment.
arch-review: PASS_WITH_CONDITIONS · 1 condition · the full ruling
The change wires the DNS steering into production and it fails closed on every path that cannot decide. That conforms to Networking §5.3 lines 147 and 151. The guest-door read and the bep dependency follow the design's owners. The steered set is the GitHub module only. Section 5.3 line 151 steers every declared credentialed hostname, and store-rule authorities are credentialed hostnames too. Admission refuses dns steering for those boxes today, so the gap is not yet reachable. Do C1: file the issue and link it from credential_module_hosts.
Ruled at fda7934 against gominimal/arch@109541a48c31 by claude-opus-5-5.
A drop guard clears asking however the ask ends, and an ask that ends without an answer records the proxy listener as down.
…s-or-both-box-s-credentialed-names-thr
There was a problem hiding this comment.
arch-review: PASS_WITH_CONDITIONS · 1 condition · the full ruling
The change since the last ruling is one commit. It adds a drop guard to the proxy-listener ask in dns.rs. A cancelled ask now records the listener down and lets a later read ask again. Section 5.3 line 147 requires this fail-closed behaviour. The baseline ruling on fda7934 stands. C1 stays open as the filed residual #2575, and the change can merge with it open.
Ruled at 70b1245 against gominimal/arch@109541a48c31 by claude-opus-5-5.
|
Round 1 of 10 on the runtime's review findings, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
In a running daemon with the proxy stopped, a dns-steered box that resolves github.com gets SERVFAIL and never a real address. When the listener is live, the same lookup gets the proxy's address. On a native host, which runs no proxy, a steered name always gets SERVFAIL. This round also makes sure that an ask about the listener that is dropped or panics cannot freeze the last answer: the state reads down and the next read asks again. Notes from the agent: Revise round 1. One finding, judged valid. ProxyListenerState::refresh now holds a drop guard (AskGuard) that clears |
norrietaylor
left a comment
There was a problem hiding this comment.
Babysitter approval at 70b1245: every merge gate passes at this head (arch PASS at 70b1245, zero open threads, every lane aggregator green). Squash title feat(minimald): steer the credentialed names of dns and both boxes through the gate (T58) and the squashed message pass commitlint. Queued for squash merge.
Generated by Claude Code
|
/revise Round 2 of #2567. The merge queue removed it at 23:04, because CI on the queue branch failed. No round is in flight. Every Rust job stopped at the manifest: #2547 (T50) landed on
Change nothing else. One commit for the manifest fix (the merge commit is separate), Conventional Commits subject, every body line at most 72 characters. Generated by Claude Code |
…s-or-both-box-s-credentialed-names-thr
main's T50 added its own bep line, and this branch added a second one. Cargo refuses the duplicate key. Keep main's line and name both uses in its comment: the git credential helper and the DNS gate's steered host set (BEP-062). Cargo.lock does not change.
There was a problem hiding this comment.
arch-review: PASS_WITH_CONDITIONS · 1 condition · the full ruling
This push merges main and keeps main's bep dependency line in crates/minimald/Cargo.toml. The PR's code is the same as at 70b12456, so the earlier ruling stands. Steered names fail closed while the proxy is down, as Networking §5.3 line 147 requires. C1 stays open as the filed residual #2575. The steered set must also hold the store-rule authorities once the BEP-017 refusal lifts.
Ruled at c8aec36 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. In a running daemon with the proxy stopped, a dns-steered box that resolves github.com gets SERVFAIL and never a real address. Once the listener is live, the same lookup gets the proxy's address. On a native host, which runs no proxy, a steered name always gets SERVFAIL. This round, the branch manifest parses again: crates/minimald/Cargo.toml has one bep dependency, so the Rust jobs get past the manifest. Notes from the agent: Step 1: origin/main was already merged at the branch head (dabc165). git log HEAD..origin/main was empty after a fetch, so no new merge commit was needed. Step 2: one commit (c8aec36) removes this PR's duplicate bep line and folds its BEP-062 comment into a new comment above main's line. That comment names both uses. Cargo.lock did not change. Step 3: clippy with -D warnings fails only in crates/boxes (compose.rs 390, 402, 1019 and primitives.rs 1085, 1302, 1309: must_use lints). This branch does not change crates/boxes. This box runs rustc/clippy 1.98.1, but rust-toolchain.toml pins 1.99.0, so the lint set can differ from CI. Without -D warnings, clippy exits 0 and reports no warning in minimald. I changed nothing else. |
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 c8aec36cb950 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.
Babysitter approval at c8aec36: every merge gate passes at this head (arch PASS at c8aec36, zero open threads, every lane aggregator green). Squash title feat(minimald): steer the credentialed names of dns and both boxes through the gate (T58) and the squashed message pass commitlint. Queued for squash merge.
Generated by Claude Code
T58 — Steer a dns or both box's credentialed names through the relay's gate in production
slice: S9
kind: task
covers: BEP-062, BEP-078
size: L
est: 260 code, 300 tests
executor: agent
difficulty: needs care
model: standard
diagnostics: with the proxy stopped, a dns-steered box resolving github.com gets SERVFAIL, and the daemon log names the box and the name once per minute
observability: one info line when the proxy's listener is reported live and the steered names resolve to it again
layers:
- host:
- crates/minimald-rpc/src/lib.rs: a
BoxControlRequest::ProxyListeningask and itsBoxControlReply::ProxyListening { listening }answer, admitted on the guest reports door besideRowStanding(re-planned 2026-10-25 by the epic owner: the listener state lives in minvmd on the host and the guest relay cannot linkbep_host, so it asks over the report door)- crates/minvmd/src/control.rs: the guest reports door answers
ProxyListeningfrom the proxy'slisteningflag, and answersfalsewhen no proxy runs- crates/minvmd/src/cmd/run.rs: hands
BepProxy::listeningto the control server so the guest door can read ittest: cargo nextest run -p minvmd guest_door_answers_proxy_listening
- relay:
- crates/minimald/src/net/listeners.rs:
proxy_listeningasks over the report door the wayhost_row_standingdoes;None(a native host, which runs no proxy, or a door that does not answer within its deadline) reads as not live, so steered names fail closed with SERVFAIL- crates/minimald/src/net/dns.rs:
ProxyListenerStaterefreshes fromproxy_listeningwith a short cached answer; theallow(dead_code)interim goes- crates/minimald/src/net/dns_gate.rs: the
allow(dead_code)interims onwith_steeringgo, and the comment stops naming #2523- crates/minimald/src/net/switch.rs:
BoxGate::for_sessioncallsDnsGate::with_steering(policy, <credential module hosts>, <proxy address on the switch>, <shared ProxyListenerState>)for every box whose steering resolves todnsorboth- crates/minimald/src/net/gvproxy_network.rs: passes the shared
ProxyListenerStateand the control channel it asks over intoBoxGate::for_session- scripts/session-e2e.sh: in
bep_dns_steering_fails_closed_end_to_end, leg 1'sknown_gapfor the steered A lookup becomes an::error::line andds_fail, andds_a_gapwith its known-gap branch goes, so the leg is a hard assertion of Networking §5.3 line 147 once steering is wired (arch C1 on #2550, widened 2026-10-25)test: cargo nextest run -p minimald a_dns_steered_box_gets_servfail_while_the_proxy_is_down
test: cargo nextest run -p minimald a_steered_name_resolves_to_the_proxy_once_its_listener_is_live
test: cargo nextest run -p minimald a_native_host_steered_name_gets_servfail
produces: none
consumes: none
proof: In a running daemon with the proxy stopped, a dns-steered box resolving github.com gets SERVFAIL and never a real address; once the listener is live the same lookup gets the proxy's address; on a native host, which runs no proxy, a steered name always gets SERVFAIL.
depends on:
- blocked by T30
Proof
A daemon now builds every dns or both box's DNS gate with the GitHub module's names steered to the proxy. The switch shares one listener state, which asks minvmd over the guest report door whether the proxy listens and caches the answer for 2 s. With the proxy stopped, a lookup of github.com from such a box gets SERVFAIL and never a real address, and the daemon log names the box and the name once per minute. When minvmd reports the listener live, the same lookup gets the proxy's switch address, and one info line says so. On a native host there is no door to ask, so a steered name always gets SERVFAIL. The unit tests show this through BoxGate and a stand-in door. The VM e2e leg in session-e2e.sh is now a hard assertion, but I did not run it here.
Notes from the agent: Files touched outside the layers: (1) crates/minimald/src/rpc.rs and crates/minimal-client/src/box_registration.rs. They match BoxControlRequest and BoxControlReply exhaustively, so the new ProxyListening variants needed one arm in each. The native control socket refuses the verb, and registration bails on the reply. (2) crates/minimald/Cargo.toml and Cargo.lock. minimald now depends on bep (path dependency) for bep::module::GITHUB, which is the credential module host set that with_steering takes. The other option was to copy the list into minimald, and a copy can drift. Design choices: BoxGate::for_session keeps its signature, because many test call sites in box_actor, box_runtime and proxy.rs use it. It delegates to a new BoxGate::for_session_steered with ProxyListenerState::down(), so a gate built without a switch state fails steered names closed. gvproxy_network calls for_session_steered with ProxyListenerState::for_switch(&control): one state per control channel, held in a process-wide map. ProxyListenerState::is_live never blocks. A read that finds the answer older than PROXY_LISTENER_CACHE (2 s) spawns one ask, with at most one ask in flight. So after the proxy stops, up to about 2 s…[truncated]
Tests
cargo nextest run -p minvmd guest_door_answers_proxy_listeningcargo nextest run -p minimald a_dns_steered_box_gets_servfail_while_the_proxy_is_downcargo nextest run -p minimald a_steered_name_resolves_to_the_proxy_once_its_listener_is_livecargo nextest run -p minimald a_native_host_steered_name_gets_servfailVerify
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.Layer exception
The epic owner's rule accepts out-of-layer changes a task needs. The babysitter accepted these on 2026-10-25:
crates/minimald/src/rpc.rsandcrates/minimal-client/src/box_registration.rs: both matchBoxControlRequestandBoxControlReplyexhaustively, so the newProxyListeningvariants need one arm in each.crates/minimald/Cargo.tomlandCargo.lock: minimald now depends onbepforbep::module::GITHUB, the host set the DNS gate steers, so the list is not copied. The arch review rules on the new dependency.Residuals
bep::module::GITHUB. Admission refusesdnssteering for any box with a broker grant today, so no box reaches the gap. Thecredential_module_hostsdoc-comment link is part of T114 — Steer a dns box's store-rule authorities to the proxy #2575.Out of scope
These files are outside the task's
layers:, so this PR is a draft:crates/minimal-client/src/box_registration.rscrates/minimald/Cargo.tomlcrates/minimald/src/rpc.rsCloses #2538
Generated by Claude Code