Repository navigation
T3 — Names through the shipped proxy, end to end - #1704
Conversation
Add the min_internal_names_through_proxy case to scripts/session-e2e.sh, driving the :7654 egress proxy the way a client does: from inside a real box, through the proxy, at an HTTP responder in another box. NET-001 routes a live box's name and an own-address box's published port, and asserts every refusal is logged (400/403/502, each with its record); NET-002 routes the deprecated three-label form and asserts its notice; NET-003 lands host.min.internal on the host's loopback from host- and own-address boxes; NET-004 routes the deprecated literal on switch lanes and asserts the egress relay's notice. Each request prints its status and the daemon log line it produced, in order, so the transcript and the min bug bundle's log tail read as the same narrative. A routed request leaves no record at any level, and the case says so where that is true. Two host capability gates degrade by observed fact rather than by host detection, the own-IP proof's switch gate being the precedent: a host that is itself a sandbox cannot run a session program, and a host that already runs a minimald owns :7654 forever (EGRESS_PROXY_PORT is a fixed constant). The first keeps the hostname-registration assert, which is daemon-side; the second keeps host.min.internal, which needs no listener. CI's native lane has neither conflict and runs everything. The proof blocks become functions behind a dispatch on the script's first argument, so a single case runs standalone; no argument still runs every proof in today's order.
…ugh-the-shipped-proxy-end-to-end
session-e2e.sh invokes `min` by name and trusts PATH to hold this repo's CLI — true in CI, which exports target/debug, but not on a host that is itself a minimal session box: there the in-sandbox `min` helper (crates/mctx/src/min_helper.sh) shadows the real CLI, answers only add/task/search/check, and prints its usage for every other subcommand, so the min_internal_names_through_proxy case died at its first `min session activate` with a bare 'Usage: min <subcommand>' that named no real cause. Keep the PATH `min` when it takes --version (the helper has none), else fall back to a build of this checkout — its own target dir, then the environment's CARGO_TARGET_DIR — and put the winning dir ON PATH, because the CLI autospawns `minimald` by name and the pair must come from one build. Fail with the reason and the fix when none is found.
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
Reviewed: 1 finding, none blocking at Address the comments on the diff. Clobber: none: |
…ugh-the-shipped-proxy-end-to-end
|
Babysitter review of 40bd677 against the T3 plan block on #1627 (NET-001..004). The one layer intent is met in all three parts: every proof block is a function, the top-level case dispatches on the first argument and runs today's order with none, and High — the native lane failure is this PR's, and deterministic. All earlier proofs and most of the new case passed on the native lane: NET-001 routed 200, NET-002 routed with its notice, the three refusals logged, NET-003 returned High — the test line can pass without asserting anything. The "exit 0" in the status comment came from the skip path on the coder's host. Medium
Low
No files outside the layers. Round 1 is running on the failed suite; the |
The native CI lane failed the new min_internal_names_through_proxy proof at
its NET-003 resolution check: the proof grepped curl's verbose trace for a
`Connected to host (ip) port N` line, a shape the curl every box ships
(upstream pins 8.22) no longer prints — it says `Established connection to
host (ip port N) from local port M` instead — so the grep came back empty
and a request that had just succeeded (200, the host's marker) was read as
a resolution failure.
Ask curl directly instead: `%{remote_ip}` is the address of the connection
it made, and write-out spelling has been stable for a decade — the proof
already leans on `%{http_code}` for every status. The assertion becomes an
exact match on 127.0.0.1, and the error now prints what it got instead of
assuming nothing was there.
…ugh-the-shipped-proxy-end-to-end
|
Round 1 of 10 on a failed check suite, pushed as
Verify The min_internal_names_through_proxy case now completes the native CI lane: .min.internal and host.min.internal route through the shipped hostname proxy with every refusal logged (NET-001 to NET-004), each request printed with its status and the daemon log line it produced. The lane's only failure — the NET-003 resolution check grepping a 'Connected to host (ip)' line from curl's -v trace, wording the curl every box ships (8.22) no longer prints — now reads the address from curl's %{remote_ip} write-out instead. Notes from the agent: Root cause of the failed checks (native-daemon-e2e, and its aggregator ci-linux-native-success): the proof's proxy_assert_host_by_name grepped curl's verbose trace for 'Connected to host.min.internal' to recover the resolved address. The pinned upstream pkgs repo ships curl 8.22.0, which prints 'Established connection to host (ip port N) from local port M' — no 'Connected to' line at all — so the grep came back empty and a request that had just succeeded (200 + HOST_LOOPBACK_OK, the annotation is the check run's) was read as a resolution failure. Verified locally with curl 8.22.0: the old grep matches nothing, and -w '%{remote_ip}' returns 127.0.0.1 for a hosts-file-resolved name; the proof already leans on -w '%{http_code}' for every status, so the write-out is the established stable surface. Everything the run reached before that assertion passed on CI (routing, both deprecation/refusal records, the ghost-name and dead-port refusals, the 400), and nothing assertable follows it on the native lane (the own-address half is MINVMD_GVPROXY_BIN-gated, skipped there), so this one probe was the last native-lane failure. What this box could not run: the case's in-box half — this host is itself a session box and cannot nest sandboxes, so the case degrades at its exec gate here; the daemon-side assertions were reproduced in a network namespace (routing, all four refusals, every log record pattern and their poll windows pass on…[truncated] |
|
/revise Round 1 (c49ecbb) fixed the curl parse and the native lane is green. The rest of the review stands at 58acaf7, plus the bot's Medium.
The NET-004 |
Both capability gates degraded to a skip on every lane, so an exec that never worked or a proxy port this run's daemon never owned still printed green. They now fail wherever the assertions are the lane's business - under CI, and on every VM-backed target - and only a developer host with neither variable set may skip, as a warning annotation, never folded into a passing transcript. The per-request log window is filtered to minimald::net::, so a routed request reports the gap (the proxy logs refusals and deprecation notices, not the requests it serves) instead of quoting whatever SSH-handshake warning landed in the same second. The proofs that share lifecycle's session (session_exec, guest_egress, sandbox) mint an equivalent one when they run alone, so every case the dispatch accepts really is runnable by itself, as the header claimed. The min-resolution block honours MINIMAL_E2E_MIN so a release smoke can pin the build it smokes, the bind-retry loop uses a named counter ($_ rebinds after every command, so the old test never matched), and the NET-004 log branch is marked developer-only, since every lane with a switch runs with E2E_VM=1.
The "standalone case: ..." line printed inside lifecycle's own group too, where the proof doing the minting is lifecycle itself. Say what it does instead, which is true wherever the helper runs.
|
Round 2 of 10 on a /revise note, pushed as
Verify Review threads the coder judged:
The Notes from the agent: Round-2 findings, all six addressed in scripts/session-e2e.sh, the one layer file: (1) both capability gates now fail wherever the assertions are the lane's business — CI set, or E2E_VM set — and only a developer host with neither may skip, as a ::warning:: that names what was asserted and says the gate would fail on CI; (2) the per-request log window is filtered to |
|
Babysitter verification of round 2 (fc9a6ea, 27b0935) against the
Merge follows build-linux, e2e and minimal-review on 27b0935. |
The MINIMAL_E2E_MIN gate's error message promised a min "with its matching 'minimald' beside it" but only checked -x and the basename, so a lone `min` passed and the run died later, confusingly, at the first activate's autospawn. The PATH branch had the same gap: it kept any real `min` without checking that the daemon it spawns by name was reachable. The daemon is not always minimald: macOS is always VM-backed (no native minimald builds there) and every Linux VM lane passes --provider local-minvmd, so the gate now derives the daemon this run will spawn — minimald native, minvmd VM-backed (Darwin or the provider flag, never E2E_VM, which marks teardown, not the backend) — and holds every branch to it: MINIMAL_E2E_MIN must carry the sibling beside it, the PATH `min` is kept only when the daemon is findable on PATH (exactly how autospawn resolves it), and one gate after all three branches fails naming the missing half instead of letting the run die at autospawn.
proxy_assert_host_by_name asserted 127.0.0.1 whenever the daemon log was readable (native), which is right only for the host-address box: its /etc/hosts is pinned by the HostNet plan. The same function serves the own-address box, whose lease is a switch address on EVERY host — native included, a developer host driving a switch by hand — so the switch zone answers the name, never /etc/hosts, and that run tripped the 127.0.0.1 assertion spuriously. CI never saw it because the own-address half runs only on VM lanes, where the log is guest-side and the check was skipped. The assertion is now gated on the box's address mode (a third argument, host or own), not on the lane: the host-address box keeps its pinned 127.0.0.1 natively, and the own-address box keeps printing what it resolved without asserting the literal — as every VM lane already did.
|
Round 3 of 10 on the runtime's review findings, pushed as
Verify Converted to a draft: something above needs a person before review. Review threads the coder judged:
At this branch the proxy case still proves Notes from the agent: The one test: line exits 1 in any sandbox shaped like this one — a session box whose PATH |
|
Babysitter verification of round 3 (9fdf9fa, 0524fe5): both minimal-review findings fixed. The min-resolution gate now checks the daemon the run will autospawn ( The draft came from the coder's sandbox, where the test line found no built |
There was a problem hiding this comment.
Babysitter approval: T3 verified against the plan block through three rounds, all lanes green at 0524fe5, minimal-review concluded on this head (one Low, resolved), CodeRabbit passed.
T3 — Names through the shipped proxy, end to end
slice: S0
kind: integration
covers: none
size: M
est: 120 code, 100 tests
executor: agent
difficulty: routine
model: standard
diagnostics: the bundle's daemon log tail shows the routed and refused requests of the run in order
observability: the case prints each request, its status and the daemon log line it produced
layers:
- e2e:
- scripts/session-e2e.sh: wraps each proof block in a function behind a top-level case on its first argument, running every block in today's order when no argument is given, and adds the case min_internal_names_through_proxy
test: ./scripts/session-e2e.sh min_internal_names_through_proxy
produces: none
consumes: none
proof:
<name>.min.internalandhost.min.internalrouted through the hostname proxy that already ships, own-address sessions on the VM host included, with every refusal logged (NET-001 to NET-004).depends on:
- blocked by #1611
- blocked by #1612
Proof
scripts/session-e2e.sh now has a min_internal_names_through_proxy case — standalone as
scripts/session-e2e.sh min_internal_names_through_proxy, and last in the no-argument lane — that drives the shipped :7654 hostname proxy from inside a real box: a live box's two-label name routes to it, an own-address box's published port routes to its lease on switch lanes, every refusal comes back logged (the 400, the 403 for an unpublished port, both 502s, each with its daemon record), the deprecated three-label form and the deprecated literal route and leave their deprecation notices, and host.min.internal reaches the host's loopback from host- and own-address boxes. Every request is printed with its status and the daemon log line it produced, in order, so the transcript and the min bug bundle's log tail read as the same narrative.Notes from the agent: This box cannot run the full case, and the case is built to say so rather than lie: it is itself a minimal session (the agent sandbox), so (a) nested session sandboxes die at spawn — hakoniwa's /etc remount EPERMs inside a box, every
min session execfails with 'the session program has exited' — and (b) the ambient daemon hosting this session owns 127.0.0.1:7654 (EGRESS_PROXY_PORT is a fixed constant, not configurable), so this run's daemon can never own the proxy port. The case therefore has two host-capability gates, keyed on observed fact per the suite's own switch-gate precedent: a spawn gate that keeps only the hostname-registration assert (daemon-side, needs no box) and a listener gate keyed on the daemon's own 'session hostnames will not route' warning that keeps only host.min.internal (needs no listener). Both were verified live here: the registration assert passed and the spawn gate took its skip path with the real blocker printed; the 7654 conflict was confirmed live too (an ambient daemon outside the session's PID namespace holds the port and answers with the shipped proxy's exact 502/400 responses).…[truncated]Tests
./scripts/session-e2e.sh min_internal_names_through_proxyVerify
min task run agent-verifypassed ([tasks.verify]).Base
The base branch moved while the coder worked; it was merged in before the tests ran.
Closes #1627