Repository navigation
T145 — Native Linux names answer on time, end to end - #2992
Conversation
Add the session-e2e case native_names_answer_on_time. With the box-name service installed on a native Linux host, it times each lookup from the moment activate or destroy returns, checks host.min.internal on the host, and finds the policy-violation line for a refused connect to an unpublished port.
|
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. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The new case conforms to §7.1. It checks that a new box's name answers A and that a destroyed box answers NXDOMAIN (line 255). It checks that host.min.internal is 127.0.0.1 on the host (line 248), and that an unpublished port on an own_ip box is refused (line 254, AT10). The PR shows the case only as NOT RUN. The ci-linux-native lane runs it before merge. Read that lane log and make sure the case ran and passed.
Ruled at 0715b37 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
The native_names_answer_on_time case activated its target box with no rules, so the box-zone check dropped the SYN to curl's timeout. Give it the rules and published port the NET-072/073 proof uses, log the switch at debug, and print the zone decisions when the refusal is slow.
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The new commit changes only the e2e case. Box b now has the same zone rules as box a and one published port. Port 18193 stays unpublished, and the case still needs a fast refusal and a network policy violation line. This agrees with §7.1 line 254: the target's ingress is enforced at connection time. The earlier PASS on this PR stands. The leg is still NOT RUN until the native Linux lane runs it.
Ruled at 8a242ee against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
|
Round 1 of 10 on a failed check suite, pushed as
Verify On a native Linux host with passwordless sudo and systemd, ./scripts/session-e2e.sh native_names_answer_on_time prints each lookup with its answer and its latency after activate and destroy return, shows host.min.internal at 127.0.0.1 from the host, and shows a refused connect to an unpublished port with the matched 'network policy violation' log line. This round only fixes beat 4. Its CI outcome is not yet observed. Notes from the agent: Revise round 1: native-daemon-e2e failed at beat 4 ('not refused fast'). The CI excerpt did not include the curl exit line. In this case, box b (the target) had no --allow-subnets/--allow-protocols. The passing NET-072/073 proof (proof_github_only_allowlist) gives both boxes '--allow-subnets 100.64.0.0/10 --allow-protocols tcp' and a published --ingress port, and its unpublished-port leg is refused fast. So I gave box b the same rules plus --ingress 18194:18194. This is a diagnosis by comparison with that proof, and no run confirmed it, because this box has no sudo and no systemd. I also added minimald::net::switch=debug to the case's RUST_LOG, and on a slow refusal the case now prints the 'box-zone connection decided at connect' and 'network policy violation' log lines. The next CI run will show the conjunction's decision if the fix is not sufficient. ci-linux-native-success is the lane aggregator, and it fail 8000 s only because native-daemon-e2e fails. |
|
Revise round 1 ran against |
|
/revise |
…ux-names-answer-on-time-end-to-end
When the first box cannot resolve its sibling's name, the unpublished-port step now says so, and prints the box's resolv.conf, a getent of the name and the daemon's failed switch registrations. A zone name needs no egress entry, so this failure is not the case's setup. The case now fails when the answerer port cannot be read from the daemon log, in place of a silent fall back to 7656. The host.min.internal lookup prints its own round trip, not a time after a step that did not just run.
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The compare conforms to §7.1. The case now fails when it cannot read the answerer port, and no longer falls back to 7656 without a message. A box that cannot resolve its sibling's name is a named failure with diagnostics. The new comment agrees with §5.3 line 152: a zone name needs no egress entry. No assertion is relaxed, so the PASS on the previous head stands. The case is still NOT RUN until the native Linux lane runs it.
Ruled at 399a57d against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 2 unresolved threads — minimal-foundry[bot] scripts/session-e2e.sh, minimal-foundry[bot] scripts/session-e2e.sh. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
|
Round 2 of 10 on a /revise note, pushed as
Verify Review threads the coder judged:
Not delivered at this head. On a native Linux host, a box's name answers when Notes from the agent: For the PR body: the step-4 failure is a product defect, not the case's setup. The box does not need to name its sibling in its egress rules. By the code: (1) an own-IP box's resolv.conf names its switch gateway (net/provider.rs own_ip_plan, subnet.dns_server()). (2) The relay's DNS gate forwards a zone A query to the switch's resolver, and it refuses nothing for a box with --allow-subnets and no name list (net/dns_gate.rs decide/refuses, the unit test box_zone_resolution_needs_no_allow_entry). (3) Every own-IP attach registers its name on the one switch that the daemon shares across its boxes (net/gvproxy_network.rs finish_own_ip_attach, register_dns_name). The case uses the same activate flags as the NET-072/073 peers that resolve each other on the VM lanes. A fast curl exit 6 (925 ms) fits gvproxy's NXDOMAIN for a name in the zone with no record. So the record is missing on the native switch, or the registration failed. The registration is best-effort and logs only a warning. I could not see the run log, so I did not find the root cause. The case now prints the evidence for the next run. No native case in session-e2e.sh proves box-to-box resolution by name yet. The other between-box cases gate on E2E_VM or MINVMD_GVPROXY_BIN. I did not work around the defect, for example with a host-address peer or a proxy dial. …[truncated] |
|
Revise round 1 ran against |
|
/revise The in-box name lookup failure is tracked in #3001, off this task. In |
…ux-names-answer-on-time-end-to-end
The unpublished-port step now connects to the address the box-name service answered for the second box, not to its name. A lookup from inside a box fails on native Linux, and #3001 tracks it off this task. The step still proves the fast refusal and the network policy violation line in the daemon log.
There was a problem hiding this comment.
arch-review: PASS · the full ruling
Step 4 now connects to the second box at the address that the box-name service answered. It does not use the name. The leg still requires a fast refusal (curl exit 7) and a new network policy violation line. So it still proves the §7.1 line 254 ingress check at connection time. The in-box lookup of a sibling name fails on native Linux, and §7.1 line 248 says it must answer. That is a residual on #3001, outside this task. The earlier PASS on 399a57de stands.
Ruled at 9084bb7 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 2 unresolved threads — minimal-foundry[bot] scripts/session-e2e.sh, minimal-foundry[bot] scripts/session-e2e.sh. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
|
Round 3 of 10 on a /revise note, pushed as
Verify On a native Linux host, a box's name answers as soon as Notes from the agent: Revise round 3. The unpublished-port step (beat 4) now connects to box b by the A address the box-name service answered after b's activate, not by |
|
Revise round 1 ran against |
|
/revise Run 41900517351, |
…ux-names-answer-on-time-end-to-end
The refused connect dialled the box's loopback address, which never crosses the switch gate that writes the violation line. Read the 100.64.x.x lease from /proc/net/fib_trie and dial that. Match only a violation line with direction=ingress and dst_port 18193.
|
Round 4 of 10 on a /revise note, pushed as
Verify On a native Linux host with passwordless sudo and a switch, the case shows each box name answering as soon as Notes from the agent: Revise round 4: beat 4 dialled 127.0.64.x, the loopback address the name answers. A SYN to that address never crosses the switch gate (refuse_tcp_segment), so the case matched an unrelated egress-ipv6 line. Beat 4 now reads box b's switch lease from /proc/net/fib_trie inside box b. This is the same method other cases in the script use. The case then dials that address. It counts and matches only violation lines that carry direction=ingress and dst_port 18193, in the JSON form and the text form, and waits up to 30 s for a new one. I checked the filter against sample lines locally. This box has no sudo, so the case printed NOT RUN and its body did not execute. The native-daemon-e2e lane must still run it. The thread verdicts from earlier rounds do not change. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The compare changes only beat 4 of the names case. Beat 4 now dials the second box at its switch lease, and it counts only ingress violation lines for the closed port. Section 7.1 line 254 puts target ingress enforcement at connection time, and the switch gate is where that happens. The field names match what policy.rs writes. The rest of the case keeps the PASS on 9084bb7. The case is NOT RUN on the agent box, so the native Linux lane must run it.
Ruled at 70c30c5 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 2 unresolved threads — minimal-foundry[bot] scripts/session-e2e.sh, minimal-foundry[bot] scripts/session-e2e.sh. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
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 70c30c5f5c3e 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.
There was a problem hiding this comment.
Read at 70c30c5. The refused connect now reaches the gate, and the log line names dst_port 18193 with direction ingress. Both open threads are met. Arch passes.
T145 — Native Linux names answer on time, end to end
slice: S22
kind: integration
covers: none
size: M
est: 60 code, 160 tests
executor: agent
difficulty: routine
model: standard
diagnostics: a person reads the case's output, which prints each lookup with the time since activate or destroy returned, and the daemon log lines it searched for the policy-violation line
observability: the case prints each lookup, its answer and its latency, and the log line it matched
layers:
- e2e:
- scripts/session-e2e.sh: adds the case native_names_answer_on_time: on a native host with the box-name service installed, resolves a new box's name right after
min session activatereturns, as the first box after a daemon start and again for a second box, resolves NXDOMAIN right aftermin session destroyreturns, resolveshost.min.internalto 127.0.0.1 from the host, and connects to an unpublished port and finds thenetwork policy violationline in the daemon logtest: ./scripts/session-e2e.sh native_names_answer_on_time
produces: none
consumes: none
depends on:
- blocked by #2940
- blocked by #2947
- blocked by #2941
proof: On a native Linux host, a box's name answers as soon as
min session activatereturns and is gone as soon asmin session destroyreturns,host.min.internalanswers 127.0.0.1 from the host, and a connection refused at an unpublished port is logged as a policy violation.Proof
A person can run ./scripts/session-e2e.sh native_names_answer_on_time on a native Linux host with passwordless sudo and a staged switch. The case installs the box-name service, restarts the daemon, and prints each lookup with its answer and its latency from the moment
min session activateormin session destroyreturned. It fails unless the first lookup answers the first box's name after the daemon start and a second box's name, and unless the destroyed box's name is NXDOMAIN on the first lookup. host.min.internal must be 127.0.0.1 at the service and through the host's resolver. A connect from one box to the other's unpublished port must be refused fast (curl exit 7), and the case prints the newnetwork policy violationdaemon log line that names the port. This run did not show this: the box has no sudo, so the case reported NOT RUN.Notes from the agent: The proof is not shown on this box. sudo is not installed here, so the case took its NOT RUN gate and the script exited 0. The native Linux lane with passwordless sudo and E2E_NATIVE_SWITCH must run it. The unpublished-port leg is box-to-box (own_ip boxes through the native switch), because the switch gate emits the policy-violation line (switch.rs refuse_tcp_segment, UNPUBLISHED_PORT). A connect from the host to a box loopback address on a closed port is a kernel refusal that logs nothing. 'On time' means the first lookup made with no wait after the command returned. If it is late, the case polls for 20 s only to print when the answer came, and then fails. The answerer port is read from the daemon's interim record before the handover, as native_answerer_survives_session_stop does (fallback 7656). The case also checks host.min.internal through getent, because the setup script points the host resolver at the service. Depends on #2940, #2947 and #2941. If those are not merged, the timing legs can fail on the lane.
Tests
./scripts/session-e2e.sh native_names_answer_on_timeVerify
min task run agent-verifypassed ([tasks.verify]).Closes #2951