Repository navigation
feat(minvmd): start the Box Egress Proxy beside gvproxy so git and gh reach GitHub - #2497
Conversation
The support bundle now carries providers/<name>/bep.log, beside the VM host daemon's run.log, and the newest segments of the Box Egress Proxy's audit log under bep/audit/.
A production macOS boot now starts the Box Egress Proxy on the socket the switch peer dials. The token goes to its standard input, its output to bep.log beside the socket, and the pool binds the boxes' shares once the proxy is started. The stand-in stays behind MINVMD_BEP_STUB.
minvmd starts bep serve from its own directory, so minvmd-build now builds bep there and signs it before minvmd's own codesign.
Adds bep_git_and_gh_against_private_repo. The T14 and T16 grant legs now share one gate: off macOS, without gvproxy or without a sign-in they record NOT RUN. On macOS the proxy that minvmd starts must answer on its control socket, or the case fails with the proxy's log.
|
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 |
There was a problem hiding this comment.
arch-review: CONDITIONS · 4 conditions · the full ruling
The proxy now starts beside gvproxy, as §7.1 line 244 says. The host-side gate keeps the box→host default-deny of line 248. But BEP-015 is not met. Every BEP leg records NOT RUN on every lane. Also, git in a box has no credential helper, and no task plans one (Gatehouse line 718). C1 asks for a macOS pass against the live proxy. C2 asks you to plan the helper. C3 limits pool shares to credentialed-lane boxes and corrects the comments that call the T45 gate "still ahead". C4 corrects the installer claim and files the release gap.
Ruled at f99e712 against gominimal/arch@109541a48c31 by claude-opus-5-5.
norrietaylor
left a comment
There was a problem hiding this comment.
Babysitter review of T18 against its plan block, at f99e7126.
Layer host. crates/minvmd/src/cmd/run.rs starts bep serve --listener <provider>/gvproxy-bep.sock on a production macOS boot, hands it this boot's token as 64 hex digits on standard input and never in argv, appends its output to bep.log beside the socket, and a watcher thread stops it with the supervisor and logs one warn line if it exits on its own. The stand-in keeps its flag; the two never contend for the path. A missing or failed proxy is a warn and the boot goes on without a credentialed lane. proxy_is_started_with_the_per_boot_token pins the argv, the stdin token, the log and the stop. One judgement call to flag for the arch review: bep_box_source now registers the boxes' pool shares when either acceptor started, where before only the stand-in did; the doc comment and the production-wiring test's doc say why.
Layer ship. The justfile builds and signs bep beside minvmd on macOS, with BEP_CODESIGN_IDENTITY for a stable identity, since the Keychain admits the keys only to the signed program that made them. crates/minimal/src/diag/collect.rs collects bep.log from each provider dir and the newest audit segments from the proxy's audit directory, with provenance lines; two tests pin it.
Layer e2e. scripts/session-e2e.sh adds bep_git_and_gh_against_private_repo, wired into the full run, the dispatcher and the usage text, and gates it and the residual legs from T14, T42 and T16 through one bep_live_gate: off macOS, without gvproxy or without a sign-in they record NOT RUN; on a lane that qualifies the gate restarts the daemon without the stub and fails, never NOT RUN, if the proxy is not serving within 60 s. The case needs E2E_BEP_PRIVATE_REPO and records NOT RUN without it.
Two things the epic owner must decide, outside this PR's layers.
- The proof is not shown, and the agent expects
git cloneto fail: the forwarder substitutes only a request that already carries the sealed value,ghreadsGH_TOKEN, butgitreads no such variable and nothing inminimaldgives a box a git credential helper at creation. The babysitter checked: no code undercrates/minimald,crates/boxesorcrates/minimalwrites a credential helper or a gitconfig for a box. BEP-015 forbids tool configuration beyond what the box carries at creation, so the helper belongs to the box's launch, which is T42's and T16's ground, not T18's. - CI cannot run the live legs on the macOS lane as it stands. The lane's e2e job builds its testbed with a direct
cargo build -p minvmd, sobepis not besideminvmdthere and the daemon boots without the proxy; and the runner holds no GitHub sign-in, so the gate records NOT RUN before it looks. The workflow is frozen, so shippingbepinto the testbed is a workflow change, and the sign-in and private repository are runner provisioning.
Commits. All four pass commitlint.
No blocking findings of my own on the code. The two decisions above are put to the epic owner.
Generated by Claude Code
|
Reviewed: no findings; approval withheld, 1 thread unresolved at APPROVE withheld: 1 unresolved thread — minimal-arch[bot] crates/minvmd/src/cmd/run.rs:1493. Resolving the last thread releases the approval on this head. Resolve the open threads. Resolving the last one releases the approval on this head; no new review is required. Clobber: none seen. |
The pool now reads a listening flag the watcher keeps: set while bep runs and its listener socket is new, cleared when it exits. Shares go only to rows that declare a credentialed upstream, the same rows the gate's proxy_lane_admits lets reach the proxy address. The comments name that gate and say the installer does not ship bep yet.
git sends no Authorization header without a credential helper, and no box ships one yet. The comment names the gap so the clone step's failure on a live lane is not read as a proxy fault.
…oxy-beside-gvproxy-so-git-and-gh-reach
There was a problem hiding this comment.
APPROVE withheld: 6 unresolved threads — minimal-arch[bot] scripts/session-e2e.sh:11753, minimal-arch[bot] scripts/session-e2e.sh:11710, minimal-arch[bot] crates/minvmd/src/cmd/run.rs, minimal-arch[bot] crates/minvmd/src/cmd/run.rs, minimal-arch[bot] crates/minvmd/src/cmd/run.rs, ….
minimal-review — advisory review
Verdict COMMENT — No findings.
Panel: 1 of 3 personas ran (correctness); did not complete: security, supply-chain.
|
Round 1 of 10 on the runtime's review findings, pushed as
Verify Review threads the coder judged:
Not delivered on this branch. A macOS boot of minvmd starts Notes from the agent: Revise round 1. run.rs: the box source is now gated by a |
There was a problem hiding this comment.
arch-review: CONDITIONS · 4 conditions · the full ruling
The host half now conforms. Shares bind only for credentialed-lane rows while the proxy listens, as §7.1 line 248 requires. Four gaps still have no issue, and rule 6 refuses a residual that nobody owns. These are the shipped git-credential-helper (C1, Gatehouse §6.4 line 718), the installer that does not ship bep (C2), the BEP proof legs that no lane runs (C3), and the bep/gvproxy user split (C4, Gatehouse §6.10 line 831). File each issue, name it where the code states the gap, and list it in the PR body. Then the change conforms with those residuals open.
Ruled at a5547ff against gominimal/arch@109541a48c31 by claude-opus-5-5.
|
/revise Arch review 5623925208 at a5547ff rules CONDITIONS with four residuals to name. The issues now exist; this round names them where the code states each gap and lists them in the PR body. It also finishes the T45 comment edit that round 1 left. Name the residual issues (threads 4356113702, 4356113708, 4356113718, 4356113724)
Finish C3 from the previous review (thread 4355956171)
Keep every other file unchanged. The Proof section is unchanged by this round. Generated by Claude Code |
|
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:
Unchanged by this round. From a box that holds only a sealed member, git clone, git push and gh api succeed against a private repository. This is true only on a lane with bep, a sign-in and E2E_BEP_PRIVATE_REPO, after #2499 ships a git credential helper. #2500 owns that macOS lane. On this branch the code now names each residual issue where it states the gap. Notes from the agent: Directive item 5 (the ## Residuals section in the PR body) is not mine to do. The runner writes the PR body. Add these four lines: #2498 release artefacts ship no bep. #2499 git credential helper and its spec requirement. #2500 macOS lane for the live proxy legs (the T14 #2490 and T16 #2495 residuals moved there). #2285 T38, the bep/gvproxy/VM OS user split (BEP-047). crates/switch/src/bep_host.rs is outside the layers. The directive asked for it, and only two comment lines changed there. Other sentences around those two lines are still stale: 'not even T69 binds on a production boot yet' and 'the supervisor wires NoBoxes there'. A production boot with a listening bep now wires CredentialedBoxes. The directive limited that file to two lines, so I left those sentences as they were. The three new tests construct CredentialedBoxes directly and run as plain #[test]. The e2e lines (./scripts/session-e2e.sh bep_git_and_gh_against_private_repo, bep_second_box_needs_no_sign_in, bep_box_env_holds_sealed_value_only) did not run: this box has no /dev/kvm and no libkrun. The script changed only in comments, and bash -n passes. cargo clippy -p minvmd -p switch --all-targets showed no warnings in these crates. The one warning (chunks_exact) is in minimald-rpc, which this round does not touch. |
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 10 unresolved threads — minimal-arch[bot] scripts/session-e2e.sh:11757, minimal-arch[bot] scripts/session-e2e.sh:11714, minimal-arch[bot] crates/minvmd/src/cmd/run.rs, minimal-arch[bot] crates/minvmd/src/cmd/run.rs, minimal-arch[bot] crates/minvmd/src/cmd/run.rs, …. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
There was a problem hiding this comment.
arch-review: CONDITIONS · 1 condition · the full ruling
The host and ship layers conform to §7.1 line 244. The proxy runs beside gvproxy, and only credentialed-lane rows get a share while bep serve listens. The residuals now name their issues, and the OS-user interim names #2285. One edit is open. The crates/switch/src/bep_host.rs docs still say that a production boot wires NoBoxes and that only the stand-in registers rows. Make the change in C1. BEP-015 stays open on #2499 and #2500, and its legs are not passes.
Ruled at 7092a59 against gominimal/arch@109541a48c31 by claude-opus-5-5.
norrietaylor
left a comment
There was a problem hiding this comment.
Babysitter review at 7092a59, after rounds 1 and 2.
Round 1 (a5547ff) fixed the MEDIUM finding and the host half of the arch conditions. BepProxy::spawn records the socket identity at the listener path before the start, and the watcher sets a listening flag only while the child runs and a socket that is not the stale one sits at the path, clearing it on exit, wait error or stop. bep_box_source takes that flag, and CredentialedBoxes returns no share while it is false and, while true, only the rows whose declares_credentialed_upstream() holds, which the gate egress::proxy_lane_admits (#1885) also admits. The stand-in passes an always-true flag, which matches its bind-before-return start. The wiring test registers a second, lane-less row and proves it holds no share.
Round 2 (7092a59) names the four residual issues where the code states each gap (#2498 in the BEP_BIN_ENV doc, #2285 for the BEP-047 interim in the BepProxy doc, #2499 and #2500 in the e2e case header), replaces the two "still ahead" lines in switch::bep_host with the landed gate, and adds three tests that pin which rows get a share and that the shares follow the flag. The PR body now carries a Layer exception for the two bep_host.rs lines and a Residuals section.
Read against spec 24 §7.1 and the arch rulings 5623734228 and 5623925208. Nothing left for the runtime from those; C1 and C3 of the second ruling are filed and named, so the change conforms with those residuals open. A macOS pass against the live proxy stays owned by #2500.
Generated by Claude Code
norrietaylor
left a comment
There was a problem hiding this comment.
Babysitter review at e875443, after round 6.
Round 6 closes the LOW finding on the proxy log. cap_bep_log runs before the log is opened: a log past 8 MiB moves aside to bep.log.old, replacing an older copy, and a log at or under the cap or no log stays as it is. A failure to move it is logged and the start goes on, which is the right side to fail on for a log. The test covers no log, a log at the cap and a log past the cap with an older .old present. The diag bundle's retention note in crates/minimal/src/diag/collect.rs says so and that the bundle does not collect bep.log.old; that file is in the ship layer, so no layer exception.
The diff touches no proxy, share or watcher logic, so the arch pass (5624582210, PASS_WITH_CONDITIONS with every condition held on #2500, #2499, #2498, T38 #2285 and the macOS half of the parent tie on #2501) stands. The native lane is green on this head, so the earlier concurrent_boots_never_draw_the_same_proxy_port failure on c2bc795 was transient and this run was its one re-run.
Generated by Claude Code
|
Round 7 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:
From a box that holds only a sealed member, git clone, git push and gh api succeed against a private repository, through the bep serve proxy that minvmd starts beside gvproxy. This round makes no change to that path. It only makes the bundle test hermetic. Notes from the agent: Round 7 addresses one review thread. logs() now delegates to a private logs_with_audit() that takes the audit dir. The production call still passes bep::audit::default_dir(). The test passes a temp dir, so a real ~/.minimal/bep/audit on the host never enters its bundle. I did not run the minvmd test line or the three session-e2e.sh lines this round, because the change does not touch their code and the e2e legs need a VM lane. clippy -p minimal --all-targets shows no warnings in minimal. The warnings it prints are in minimald and minimald-rpc, which this round does not touch. |
norrietaylor
left a comment
There was a problem hiding this comment.
Babysitter review at 714be7b, after round 7.
Round 7 closes the LOW test-hermeticity finding in crates/minimal/src/diag/collect.rs: logs() keeps its signature and delegates to logs_with_audit(), which takes the audit directory, and bundle_collects_the_proxy_log_and_audit_segments passes a temp dir there instead of calling bep_audit a second time, so a real audit log under the host's home never enters the test's bundle. Production behaviour is unchanged: logs() still reads bep::audit::default_dir(). The file is in the ship layer.
Nothing here bears on the arch conditions; the pass (5624582210) stands with every condition held on #2500, #2499, #2498, T38 #2285 and #2501.
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 714be7b7e5a3 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.
|
Round 8 of 10 on a failed check suite: the coder changed nothing. Noop. The cargo-deny job fails on a new RUSTSEC advisory, "Non-constant-time mask generation and |
|
Round 9 of 10 on a failed check suite: the coder changed nothing. Round 9 directive lists failed checks only, and no review threads. I found no failure that this branch causes. (1) cargo-deny: the advisories gate fails on a vulnerability in a dependency under ssh-key/ssh-cipher. The deny.toml warning about RUSTSEC-2026-0009 also comes from main. This branch does not change Cargo.lock or deny.toml, and both are outside the task layers. A separate pull request on main must fix it. (2) tests: the log excerpt does not name the failing test. Locally, all of minimal (724) and switch (62) pass. Of the 610 minvmd tests, 609 pass. net::egress_gate::tests::a_query_dropped_at_the_queue_is_not_observed failed once on a 5 s timing window, then passed when it ran alone. This branch does not touch crates/minvmd/src/net. So that test is the probable flake, but the CI log does not prove it. (3) ci-success and ci-linux-native-success are aggregators that fail because of (1) and (2). Local clippy is rustc 1.98.1, not the 1.97.0 pin. It warns only in untouch…[truncated] |
|
/revise Base merge only. main now carries the cargo-deny fix: c9114e1 (#2503) moves ctutils to 0.4.5 for RUSTSEC-2026-0385, and cargo-deny is green on main. This branch still carries the old lock, so ci-success is red on 714be7b for that reason alone.
The Proof section is unchanged by this round. Generated by Claude Code |
|
Round 10 of 10 on a /revise note: the coder changed nothing. every commit this round put on the branch above 714be7b is a merge of the base branch, so it carries no work of its own |
norrietaylor
left a comment
There was a problem hiding this comment.
Babysitter review at 236f312.
This head is the merge of main c5ea7aa into the branch, made with GitHub's update-branch at the owner's word after the runtime's rounds were exhausted. It brings only main's changes: the ctutils 0.4.5 lock bump from #2503, which clears RUSTSEC-2026-0385 for cargo-deny, and the minimal CLI fix from #2226. Nothing of this PR's own changes, so the reviews at 714be7b and the arch pass (5624332061 at a1c15c5, PASS_WITH_CONDITIONS with every condition held on #2500, #2499, #2498, T38 #2285 and #2501) stand on the same diff.
Generated by Claude Code
There was a problem hiding this comment.
arch-review: PASS_WITH_CONDITIONS · 4 conditions · the full ruling
The ruling on c2bc795a stands for this head. The new log cap moves only bep.log, the proxy's stdout and stderr. It does not touch the audit segments, which Gatehouse §6.10 line 836 makes the source of record. The hermetic bundle test now goes through the production path. BEP-015 is still not proved end to end. C1 to C4 stay open, and each one has a filed issue.
Ruled at 236f312 against gominimal/arch@109541a48c31 by claude-opus-5-5.
norrietaylor
left a comment
There was a problem hiding this comment.
Approved for merge at 236f312.
All twelve babysit gates pass on this head: own review, arch PASS_WITH_CONDITIONS with its conditions filed as #2498, #2499, #2500 and #2501, minimal-review concluded, every review thread resolved and re-verified on the head, ci-success, ci-linux-native-success, ci-linux-kvm-success, ci-macos-success and ci-shell-installer-success green, CodeRabbit and license/cla green, ready for review, no needs-human, Closes #2275. The squash title passes commitlint.
Generated by Claude Code
T18 — Run the proxy beside gvproxy so git and gh reach GitHub from a box
slice: S0
kind: task
covers: BEP-015
size: L
est: 280 code, 220 tests
executor: agent
difficulty: unknown ground
model: strongest
diagnostics: the support bundle carries the proxy's log tail and the audit log segments, collected beside the VM host daemon's log
observability: one info log line when the VM host daemon starts the proxy, naming its socket and pid, and one warn line when it exits
layers:
- host:
- crates/minvmd/src/cmd/run.rs: starts
bep servebeside gvproxy with the per-boot token in production, the stub staying test-onlytest: cargo nextest run -p minvmd proxy_is_started_with_the_per_boot_token
- ship:
- justfile: builds and signs the bep binary beside minvmd
- crates/minimal/src/diag/collect.rs: collects the proxy log and the audit segments
test: cargo nextest run -p minimal bundle_collects_the_proxy_log_and_audit_segments
- e2e:
- scripts/session-e2e.sh: adds the case; the T14 leg
bep_second_box_needs_no_sign_inrecords NOT RUN on every lane until this task startsbep serve, and must record a pass on the macOS lane against the live proxy (arch C1 on #2490, residual filed here; do not change that leg to pass without a proxy); the T16 grant legsbep_root_ca_present_in_box_trust_store, the grant half ofbep_root_ca_absent_from_box_without_credentialed_upstreamandbep_trust_env_points_at_bundle_and_rootrecord NOT RUN off macOS the same way and must each record a pass on the macOS lane against the live proxy (arch C2 on #2495, residual filed here)test: ./scripts/session-e2e.sh bep_git_and_gh_against_private_repo
test: ./scripts/session-e2e.sh bep_second_box_needs_no_sign_in
test: ./scripts/session-e2e.sh bep_box_env_holds_sealed_value_only
produces: none
consumes:
- crates/bep/src/main.rs
- crates/bep/src/forward.rs
proof: From a box holding only a sealed member, git clone, git push and gh api succeed against a private repository.
depends on:
- blocked by #2259
- blocked by #2272
- blocked by #2273
- blocked by #2274
- blocked by #2334
- blocked by #2483
- blocked by #2488
Proof
Not shown on this branch. A macOS boot of minvmd now starts
bep serve --listener <provider>/gvproxy-bep.sock. It gives the per-boot token on standard input, appends the proxy output to /bep.log, and binds the boxes' pool shares.min bugcollects bep.log and the newest audit segments. The e2e case bep_git_and_gh_against_private_repo runs git clone, git push and gh api from a proxy_env grant box, but only on the macOS lane with a sign-in and E2E_BEP_PRIVATE_REPO set. Nobody ran it, and I expect the git half to fail. See notes.Notes from the agent: 1) Likely product gap for the proof: git in a box has no way to send the sealed value. The forwarder substitutes only a request that carries a sealed value (Authorization Bearer/token/Basic x-access-token:), and a request without one goes upstream unchanged. gh reads GH_TOKEN, so
gh apican work. git reads no GH_TOKEN, and nothing in minimald gives a box a git credential helper at creation (I found no gitconfig or credential.helper writer). The case does not configure git in the box, as BEP-015 says. So I expectgit cloneof a private repo to fail on the macOS lane until a box carries a credential helper (for examplegh auth git-credential) at creation. That change is in minimald, which is outside this task's layers. 2) Judgement call in run.rs: bep_box_source now registers the boxes' pool shares whenbep servestarted, not only under MINVMD_BEP_STUB. Without that, no box connection reaches the proxy. The credentialed-only gate rule (NET-145, #1665) is still ahead. The proxy admits only deliveries that carry the boot token, and it redeems only for boxes its control socket registered. I updated the doc comments and the production_wiring test doc. 3) minvmd starts bep only on macOS, because bep exits on other hosts. It does not start bep under MINVMD_BEP_STUB, or when gvproxy is absent. The binary is MINVMD_BEP_BIN, elsebepbeside minvmd. A missing or failed proxy is a warn, and t…[truncated]Tests
cargo nextest run -p minvmd proxy_is_started_with_the_per_boot_tokencargo nextest run -p minimal bundle_collects_the_proxy_log_and_audit_segments./scripts/session-e2e.sh bep_git_and_gh_against_private_repo./scripts/session-e2e.sh bep_second_box_needs_no_sign_in./scripts/session-e2e.sh bep_box_env_holds_sealed_value_onlyVerify
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.Closes #2275
Layer exception
crates/switch/src/bep_host.rsis outside this task'slayers:. Round 2 changed two comment lines there (lines 80 and 334) and nothing else: the credentialed-only gate they called "still ahead" landed asegress::proxy_lane_admitsin #1885, and arch condition C3 on review 5623734228 (thread 4355956171) asked for the same edit inswitch::bep_hostthatbep_box_sourcegot. Round 3 changed two doc paragraphs in the same file (the module doc around line 80 and theNoBoxesdoc around line 336) for arch condition C1 on review 5624123100 (threads 4356289331, 4356289343): they now say a boot with no listening acceptor wiresNoBoxesand a boot whosebep servelistens wiresCredentialedBoxes. Comment text only. Accepted under the layer-exception rule of 2026-10-19 (arch-required comment changes).Residuals
bep;scripts/dist-build.shand the release workflow build onlyminvmd(arch C4 on 5623734228, C2 on 5623925208).bepin its testbed, a sign-in andE2E_BEP_PRIVATE_REPO, and the T14 feat(minimal): mint sealed GitHub sign-in references and register the box with the proxy #2490 and T16 feat(minimald): put the proxy's root certificate in a grant box's trust store #2495 residuals (arch C1 on 5623734228, C3 on 5623925208).bepstarts as minvmd's own user, the user of gvproxy and the VM too; BEP-047 requires distinct OS users (arch C4 on 5623925208).bep serverunning on macOS, andscripts/reap-vms.shhas no pattern for it; Linux gets a parent-death signal in this PR (review finding 4356469274 at a1c15c5).Generated by Claude Code