Repository navigation
T62 — Allow github.com and nothing else, end to end - #1838
Conversation
Add the github_only_allowlist case to scripts/session-e2e.sh: one own-address box whose only reach is --allow-dns-hosts (its one allow-subnets entry is a documentation range, so nothing but a DNS-pinned admission can ever carry a fetch) must still complete the NET-068 toolchain - git clone, npm install, pip install and a container pull - while a second box, allowed github.com but denying every subnet, gets its answer refused and logged; AAAA, HTTPS and SVCB lookups come back empty from the relay; and a sibling pair reaches each other by name under both boxes' rules, with the target's unpublished port and the plane-less box refused at the connect-time conjunction. Every probe prints the daemon-log records it produced - the DNS gate's admissions, the relay's empty-lookup answers, the refused answer, the box-zone connect decisions - read windowed from the daemon's log natively and from the guest boot log on VM lanes (the raised RUST_LOG rides the kernel command line into the guest). The case is ordered last in the whole-lane run: it restarts the daemon for the filter its evidence needs.
|
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 |
|
/revise Round 1. The case's structure is right, and every log string it greps exists in production code. It has not yet run on a lane that executes it, and it does not prove the "nothing else" half of the title. Scope:
The PR body is edited by hand; do not rewrite it. |
Round 1 of the github-only allowlist case proved the allowed half; this round proves the title's other half and removes the two ways the case could fail without the daemon being wrong. The nothing-else half, from the same box, straight after the fetches: one GET of a name the declaration does not name, asserted on the outcome — no HTTP response arrived, whichever way the stack refused it — and on the gate's own record: the window holds no admission for the name. A reply whose name the gate does not recognize pins nothing and warns nothing, so the absence is read out of the log rather than inferred. The fetches in the same run are the live control, so the leg is never skipped for network conditions. The zone legs: the source-half leg moves from the toolchain box to a fifth box allowed only the documentation range, because the violation line it reads is rate-limited to one per source box and rule per minute (WARN_MIN_INTERVAL, crates/minimald/src/net/policy.rs) and the toolchain box has been dropping frames under that rule since its fetches — a fresh box has dropped nothing, so its first drop is the leg's own SYN. The unpublished-port leg now holds the decision record to target_pass=false, and the source-half leg's violation to the source box's own session_id — its switch lease, read the switch-ARP proof's own way (fib_trie) — so both refusals are read off the record that made them. Each toolchain fetch is retried once, and a 429/5xx/TOOMANYREQUESTS in its output is named in the error line, so a registry having a bad minute is not read as a DNS-gate regression. It stays a failure.
…ub-com-and-nothing-else-end-to-end
|
Round 1 of 10 on a /revise note, pushed as
Verify On the KVM/VM lanes that execute it, the github_only_allowlist case now proves the whole title: a box whose declaration names only hostnames runs git/npm/pip/skopeo to completion, then — from the same box, with those fetches as the live control — a GET of a name the declaration does not name (example.org) is asserted to reach no HTTP response (whichever way the stack refused it, printed) and the gate's window is asserted to hold no admission for it; the zone legs each read their refusal off the record that made it (target_pass=false in the unpublished-port decision; the source-half violation attributed to the no-fabric box's own session_id, its switch lease), and a failed toolchain fetch is retried once with a 429/5xx named in its error line so a registry outage is not read as a gate regression. Notes from the agent: Item 5 — 'Show a real run' — cannot be delivered from this session, and I did not fabricate it. This box has no /dev/kvm, no /dev/net/tun and CapEff=0, so no tap/switch can exist and the case skips at its own MINVMD_GVPROXY_BIN gate (the skip line above is not evidence, as the directive says). The transcript must come from CI (Linux KVM) or CI (macOS) on the pushed branch. What to read there: the 'nothing else OK: example.org reached no HTTP response (...)' line (with its rc/status/elapsed/curl line above it and the '-> the window holds no admission for it' half), one 'fetch ' window, one empty-lookup leg ('AAAA ... NODATA' / HTTPS / SVCB), the 'nofabric-to-peer2' leg with '-> the decision record says ...' / '-> the violation record names the source box's own session', and the final 'github-only allowlist OK (toolchain fetched, nothing else reached, ...)' line. The KVM session-e2e job has 60 min and the macOS job 45; the additions cost roughly a fifth activation plus ~10 s (example.org curl max-time) plus ~8 s (zone leg), which fits. Item 1: the example.org leg runs from $goa_t_sid right after the four fetches, so the same run's all…[truncated] |
|
/revise Round 2. Asks 1–4 of round 1 are met; two details of the retry need fixing, and the real-run evidence is still owed. Scope:
The PR body is edited by hand; do not rewrite it. |
…ub-com-and-nothing-else-end-to-end
The VM lanes' boot log is ANSI-painted: tracing's default fmt layer turns it on unless NO_COLOR is set and no lane sets it, and its field rendering italicizes each field NAME and dims the `=` beside it, so `target_pass=false` never appears contiguously — while the message and the value stay plain, which is why every earlier leg of this case matched and the first field assertion (the unpublished zone leg's) failed on both VM lanes. goa_net_since now strips the SGR codes, at the one reader the assertions and the printed transcript share, so a field reads the same on the console shape as on the file shape it was written against. The escape byte is built at runtime and the pattern carries no backslash: a literal `\x1b` is a GNU-ism and `\[` is one GNU sed warns about itself, while the macOS lane's BSD sed reads neither — the bracket expression takes the `[` as a member instead. Each fetch command now clears its own destination before it starts: an attempt killed by `timeout 90` leaves a half-written destination behind, and `git clone` into an existing directory and `skopeo … dir:/tmp/hw` into a non-empty one both refuse deterministically, so the retry would have failed however the upstream was doing. The registry-outage classification now matches a status only inside the shapes one arrives in — the reason phrases, an HTTP status line, or a `status`/`code`/`error` field — and reads both attempts' stderr, now kept separately; the bare digit match read `504 kB` as a 5xx.
…ub-com-and-nothing-else-end-to-end
|
Round 2 of 10 on a /revise note, pushed as
Verify On the pushed head, CI (Linux KVM, job 111113814335) and CI (macOS, job 111111806529) ran the case for real and passed every leg through both published box-zone reaches — the four toolchain fetches, the nothing-else example.org refusal, the empty AAAA/HTTPS/SVCB answers, the denied-range refusal — and the one failure, the unpublished leg's target_pass=false assertion, is root-caused to the VM console's ANSI paint breaking the proof's own field matcher, which this commit fixes at the one reader the assertions and the transcript share; with that, plus the idempotent fetch retry and the status-anchored outage match of the same commit, the next head's KVM or macOS run is the transcript the reviewer asked for: each fetch window, the nothing-else line with its rc/status/elapsed, both empty-lookup legs, 'the decision record says target_pass=false', and 'the violation record names the source box's own session'. Notes from the agent: Directive round 2, all inside proof_github_only_allowlist in scripts/session-e2e.sh; no product code, no other proof, nothing outside the layer's file. Item 1 (idempotent retry): done — all four fetch commands now clear their destination before every attempt (rm -rf /tmp/hello-world, /tmp/npm-stub inside the sh -c, /tmp/pip-stub, /tmp/hw), and the comment above goa_fetch says why: a timeout-killed attempt leaves a half-written destination, and git clone into an existing directory and skopeo dir:/tmp/hw into a non-empty one both refuse deterministically. Item 2 (anchored classification): done — the bare 'toomanyrequests|429|5(00|02|03|04)' is replaced by status-shape-anchored matching (too many requests incl. the docker 'toomanyrequests' code and a hyphenated reason, an HTTP status line, a status/code/error field carrying 429 or a 5xx with a not-followed-by-another-digit boundary, and the 5xx reason phrases), and each attempt now keeps its own stderr (goa--1.err/-2.err) so the classification sees the first failure; both tail…[truncated] |
The comment narrated the debugging state the SGR strip has since removed — that the unpublished zone leg's field assertion failed on both VM lanes — which reads as PR-diary now that the strip makes it pass. Keep the design rationale: the console layer paints ANSI, its field rendering italicizes the name and dims the equals sign, so no name=value is contiguous and the reader has to strip it.
|
Round 3 of 10 on the runtime's review findings, pushed as
Verify Review threads the coder judged:
scripts/session-e2e.sh's github_only_allowlist case still carries the whole hostname-only proof — the toolchain fetches against github.com and friends, the refused-and-logged answer into a denied range, the empty AAAA/HTTPS/SVCB answers, and the sibling boxes reaching each other by name under both boxes' rules — and after this round the comment on goa_net_since, the one reader its assertions and printed transcript share, states the design rationale (the console layer's SGR paint italicizes field names and dims the equals sign, so no name=value is contiguous and the strip is required) without the stale pre-fix clause that said the unpublished zone leg's field assertion still fails. Notes from the agent: Revise round 3; one thread, judged valid and fixed in 79e8351 (comment-only: 1 insertion, 3 deletions in the goa_net_since comment block). Test-line account, honestly: the line exits 0 on this box, but the case does not assert here — it takes its designed skip path twice over. (1) Run exactly as written, it skips at the switch gate ('no MINVMD_GVPROXY_BIN: this target has no switch'), which is what just e2e-native deliberately produces. (2) To get past that I fetched the pinned gvproxy (scripts/fetch-gvproxy.sh, SHA-256 verified against vendor/gvproxy/gvproxy.lock into .scratch/gvproxy, gitignored) and copied it to $HOME/.local/bin/gvproxy-min — the first path switch::installed_gvproxy_bin probes, which is where the real installer stamps it — and re-ran with MINVMD_GVPROXY_BIN set. The hostname-only box then activated, and the case's exec gate refused it: '/dev/net/tun present: false'. That limit is hard on this box, not a staging gap: /dev/net is empty, no tun module is loaded, and CapEff is 0 so mknod is refused; /dev/kvm is absent too, so no VM lane exists here either. The in-box probes therefore cannot run on this host at all, which is exactly the condition the gate exists to turn into a skip outside CI. What a lane that can run it would see: the V…[truncated] |
Both VM lanes failed the github-only allowlist case at its unpublished-port zone leg, in 63 ms on KVM and 48 ms on macOS: the leg asserted NET-062's silent drop for a connect the target's half refuses, but a port the target never published is NET-014's refusal — the gate answers the SYN with a reset, the kernel's own connection-refused shape, so the peer's connect fails at once rather than hanging to its timeout. The two halves of NET-073's conjunction refuse differently, so a zone leg now names the shape it must get. The target's half is asserted as a refused connection (curl exit 7, fast — the same shape the proxy-parity case holds on its direct leg, and the one switch.rs's unpublished_port_connection_refused unit proof pins); the source's half keeps NET-062's drop-without-reset to the timeout, unchanged. The block comment's claim that the unpublished connect dies at the switch with nothing resetting it went with it.
…ub-com-and-nothing-else-end-to-end
|
Round 4 of 10 on a failed check suite, pushed as
Verify The github-only allowlist case's zone legs now assert the refusal shapes the box host actually ships, so the KVM and macOS lanes can carry the case green: a box-zone connect to a sibling's unpublished port is asserted as NET-014's connection-refused (the target's ingress gate answers the SYN with a reset — curl exit 7, fast, never the connect timeout the old probe demanded, which is NET-062's egress-drop shape and stays asserted only for the source-half leg). On the lane that runs the case, a person sees the toolchain fetches complete under the hostname-only allowlist, the denied-range answer refused and logged, AAAA/HTTPS/SVCB answered empty, both peers reach each other by name, the unpublished port refused fast with the kernel's own shape, and the plane-less box's connect dropped to its timeout. Notes from the agent: Round-4 root cause: both failing checks trace to one error — test-kvm's step 13 (and the macOS e2e job, which failed the same way: 63 ms on KVM, 48 ms on macOS) died at 'zone leg peer1-to-peer2-unpublished ... a fast refusal'. The probe demanded a silent drop-to-timeout for the target's unpublished port, but that port is NET-014's refusal: minimald's inbound gate answers the SYN with RST|ACK, 'the kernel's connection-refused shape' (crates/minimald/src/net/switch.rs, refuse_tcp_segment; pinned by the unpublished_port_connection_refused unit test and asserted green end to end by the proxy_refuses_like_direct case's direct leg on the same lanes). The probe, not the system, was wrong — this is a test-only fix inside the task's one layer file. goa_zone_leg now takes the shape it must assert ($7): 'refused' for the target's half (curl exit 7, under 6000 ms), 'dropped' for the source's half (no reset, to the --max-time), and the block comment's wrong 'nothing resets it' claim went with it. The nofabric-to-peer2 leg (source half, never yet run in CI) keeps exactly the drop shape the denied-range leg already passed with in this same run, so no ot…[truncated] |
…ub-com-and-nothing-else-end-to-end # Conflicts: # scripts/session-e2e.sh
…ub-com-and-nothing-else-end-to-end
|
Round 5 of 10 on a conflict with the base branch, pushed as Resolved conflicts in:
Verify At this branch head, ./scripts/session-e2e.sh github_only_allowlist (and the whole-lane run) drives the hostname-only-allowlist box through git clone, npm install, pip install and a container pull, reads each admission, the denied-range refusal and the empty AAAA/HTTPS/SVCB answers out of the daemon's log, and closes with box-zone peers reaching each other by name under both boxes' rules — and the merged file now carries main's proxy-source case in the same lane, github_only_allowlist second-to-last and proxy_sees_each_vm_box_by_its_switch_address last, both dispatchable by name. Notes from the agent: Directive round was a conflict merge, not new code. Resolved 6 marker regions in scripts/session-e2e.sh as a union of the two branches' additions: seed vars (GOA_* + BEPB_), teardown lines, the two case blocks, and the three dispatch spots (list, case pattern, usage). Ordering decision: both branches had appended a case claiming to be 'ordered LAST'; github_only_allowlist now runs second-to-last and proxy_sees each VM box last, because the proxy case leaves a daemon whose environment carries MINVMD_BEP_STUB=1 and its own comment requires nothing to run after it, while github's leftover RUST_LOG filter is irrelevant to a case that stops both daemons and sets its own. Adjusted the three ordering comments to say that truthfully, extended the proxy case's 'MAC and ARP cases above' list with github_only_allowlist, and added the proxy case's header list entry (main never documented its own case there). The merge commit (c1c1cbf) necessarily also carries origin/main's own changes — crates/minvmd/, crates/switch/*, crates/sandbox2/src/lib.rs, docs/specs/18-spec-box-networking/18-spec-box-networking.md — those are the base branch's, not edits of mine; my edit was scripts/session-e2e.sh only. Also verified post-merge that the dispatch accepts proxy_sees_each_vm_box_by_its_switch_address (exit 0, same designed skip) and that every case name in the dispatch list, p…[truncated] |
|
/revise Round 6. This round only adds comments to the test, so the case's behaviour must not change. Scope:
Tests: The PR body is edited by hand; do not rewrite it. |
…ub-com-and-nothing-else-end-to-end
Comments only, inside the github_only_allowlist case: no assertion, timeout or exit-code check changes, and no other case is touched. - the nofabric-to-peer2 leg now says the silent drop it pins is NET-062's own shape, and that the leg is meant to flip when spec 18 amends NET-062 into an active reject; - the undeclared-name leg now records that its rc-28 timeout pins the current behaviour against a known gap: design 5.3 refuses a name egress.allow_dns_hosts does not match at resolution, spec 18 has no requirement for that yet, and the leg flips to curl exit 6, fast, when gominimal/minimal#1869 lands. bash -n and shellcheck -S warning stay clean.
…ub-com-and-nothing-else-end-to-end
|
Round 6 of 10 on a /revise note, pushed as
Verify The github_only_allowlist case is unchanged in behaviour — every assertion, timeout and exit-code check is exactly what the KVM lane last passed — and a reader of it can now see, at each leg the review asked about, which shape is pinned and when it is meant to flip: the nofabric-to-peer2 leg's silent drop is named as NET-062's own shape, meant to flip when spec 18 amends NET-062 into an active reject, and the example.org leg's rc-28 connect timeout is named as current behaviour against a known gap — design §5.3 refuses a name egress.allow_dns_hosts does not match at resolution, spec 18 has no requirement for that yet — that flips to curl exit 6 (could not resolve host), fast, when gominimal/inbox#931 lands. Notes from the agent: Comment-only round, bounded by the directive to comments inside the github_only_allowlist case: 21 added comment lines, zero deletions, no assertion, timeout or exit-code check changed, no other case touched, nothing outside scripts/session-e2e.sh. The case's assertions cannot be exercised on this box by either lane: there is no /dev/kvm (so no minvmd VM lane) and no /dev/net/tun (so the native lane cannot give an own-address box a tap; the container runs as uid 1000 with no sudo, so the node cannot be created). Ran the test line as written (exit 0, case skipped at its switch gate after the script built the CLI pair itself). To get as far as the box can go here, fetched the pinned switch (scripts/fetch-gvproxy.sh, SHA-256 verified against vendor/gvproxy/gvproxy.lock) and re-ran with it resolvable (MINVMD_GVPROXY_BIN plus a copy named gvproxy-min found through MINIMAL_BIN): the case got past its switch gate, spawned the box, and skipped at the exec gate with 'own-IP sandbox produced no in-namespace tap fd (/dev/net/tun present: false)'. So the KVM lane in CI is where this case's assertions run, as the directive's 'passes unchanged on the KVM lane' anticipates; the evidence the case's behaviour is unchanged is the diff itself …[truncated] |
|
The runtime will not revise this pull request again on its own: round 7 would exceed the cap of 6 (the last trigger was a conflict with the base branch). A person decides now. Remove |
|
Round 1 of 6 on a failed check suite: the coder changed nothing. The failed checks are not this change. test-kvm (run 37116426013, this head) failed in 'VM integration harnesses (auto-discovered)' 4 seconds in — before any VM could boot (the same step runs green on main in ~42 s) — and the 'Session e2e via the CLI' step, the only step this PR's diff touches, was skipped, so the case itself has still never been executed by CI. That step consumes a prebuilt |
norrietaylor
left a comment
There was a problem hiding this comment.
Re-approving at 9687134, the main merge after T78. The session-e2e teardown keeps both sides' variables. All lanes and minimal-review are green.
T62 — Allow github.com and nothing else, end to end
slice: S7
kind: integration
covers: none
size: M
est: 60 code, 160 tests
executor: agent
difficulty: routine
model: standard
diagnostics: the daemon log from the run shows each admission and each refused answer
observability: the case prints each fetch, the addresses admitted for it and the outcome
layers:
- e2e:
- scripts/session-e2e.sh: adds the case github_only_allowlist
test: ./scripts/session-e2e.sh github_only_allowlist
produces: none
consumes: none
proof: a hostname-only allowlist lets apt, git, npm, pip and a container pull complete; an answer into a denied range is refused and logged; AAAA, HTTPS and SVCB lookups get empty answers; boxes reach each other by name under both boxes' rules.
depends on:
- blocked by #1627
- blocked by #1638
- blocked by #1647
- blocked by #1648
Proof
The case github_only_allowlist now exists in scripts/session-e2e.sh and runs last in every whole-lane e2e run, so a person watching the KVM or macOS CI lanes (or
just e2elocally) sees the hostname-only allowlist proved end to end: a box whose only allowed egress subnet is a dead TEST-NET-3 CIDR and whose DNS allowlist is exactly the ten NET-068 toolchain hosts clones a repo, installs an npm package, pip-installs a library and pulls a container image to completion, with the case printing each fetch, the addresses the DNS gate admitted for it, and the outcome from the daemon log; a separate box with an allowlist resolving into a denied range gets its curl refused and the refusal logged by the daemon; AAAA, HTTPS and SVCB lookups against the box's relay get empty answers; and two sibling boxes reach each other by name under both boxes' rules — published ports in both directions, the unpublished port refused, and the toolchain box's own zone connect refused by its own egress verdict, each with the deciding daemon record quoted in the case's output.Notes from the agent: scripts/session-e2e.sh was the only file touched; everything else is read-only consultation. The case cannot complete on this box and that is by design, not a gap: own-address boxes need the gvproxy switch for their fabric (a live
min session exechere fails with 'spawning gvproxy at /usr/lib/minimal/bin/gvproxy-min: No such file or directory'), so the case carries the same MINVMD_GVPROXY_BIN gate its own-IP siblings use. Where the fabric exists it runs for real: ci-linux-kvm.yml and ci-macos.yml both export MINVMD_GVPROXY_BIN and run the whole-lane script, which reaches this case last; ci-linux-native.yml runs without it and the case skips there, exactly as its siblings do. Validated live on this host instead of the fabric: (1) the proof's activation command — ten --allow-dns-hosts flags, --allow-subnets 203.0.113.0/24, --allow-protocols tcp, a [session]+[stack] seed, and the user_poli…[truncated]Tests
./scripts/session-e2e.sh github_only_allowlistVerify
min task run agent-verifypassed ([tasks.verify]).Closes #1658