8000 T145 — Native Linux names answer on time, end to end by minimal-foundry[bot] · Pull Request #2992 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

T145 — Native Linux names answer on time, end to end - #2992

Merged
norrietaylor merged 8 commits into
mainfrom
agent/2951-native-linux-names-answer-on-time-end-to-end
Nov 4, 2026
Merged

norrietaylor merged 8 commits into
mainfrom
agent/2951-native-linux-names-answer-on-time-end-to-end

Conversation

@minimal-foundry
Copy link
Copy Markdown
Contributor

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 activate returns, as the first box after a daemon start and again for a second box, resolves NXDOMAIN right after min session destroy returns, resolves host.min.internal to 127.0.0.1 from the host, and connects to an unpublished port and finds the network policy violation line in the daemon log
test: ./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 activate returns and is gone as soon as min session destroy returns, host.min.internal answers 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 activate or min session destroy returned. 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 new network policy violation daemon 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

line exit tail
./scripts/session-e2e.sh native_names_answer_on_time 0 native_names_answer_on_time: NOT RUN (no passwordless sudo: the setup script must run as root) session e2e: 1 case(s) NOT RUN: native_names_answer_on_time session e2e OK Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-ad25...

Verify

min task run agent-verify passed ([tasks.verify]).

Closes #2951

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.
@coderabbitai
coderabbitai Bot commented Nov 4, 2026 •
Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1bc1e03d-2b2e-48d8-ba8a-d247f83b6aab

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@minimal-foundry
minimal-foundry Bot commented Nov 4, 2026 •
Copy link
Copy Markdown
Contributor Author

Approved: every review thread resolved at 70c30c5f5c3e.

@norrietaylor resolved the last thread, which releases the approval this review had withheld.

Nothing to do.

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — approved

Verdict APPROVE — No findings.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Nov 4, 2026
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.
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — advisory review

Verdict COMMENT — 2 findings, 2 inline.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

Comment thread scripts/session-e2e.sh Resolved
Comment thread scripts/session-e2e.sh Resolved
@minimal-foundry minimal-foundry Bot removed the review:approved minimal-review approved the current head label Nov 4, 2026
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on a failed check suite, pushed as 8a242ee196a6.

line exit tail
./scripts/session-e2e.sh native_names_answer_on_time 0 native_names_answer_on_time: NOT RUN (no passwordless sudo: the setup script must run as root) session e2e: 1 case(s) NOT RUN: native_names_answer_on_time session e2e OK Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-a013...

Verify min task run agent-verify passed.

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.

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Revise round 1 ran against ci-linux-native-success, native-daemon-e2e and left it red; a coder round cannot clear it, a person should look. No round was started for the failed suite on 8a242ee196a6.

@norrietaylor
Copy link
Copy Markdown
Member

/revise native-daemon-e2e fails at this head (run 41792563524), and the coder can't read that log, so here is the failing step. Steps 1 to 3 of native_names_answer_on_time pass, with lookups in about 25 ms. The unpublished-port step fails: connect from e2e-nnat-a to e2e-nnat-b.min.internal:18193 (not published): curl exit 6 after 925 ms: curl: (6) Could not resolve host: e2e-nnat-b.min.internal, and the case reports the connect to the unpublished port was not refused fast (expected curl exit 7 well inside 6 s). Box e2e-nnat-a cannot resolve its sibling's name from inside. Find out whether the case's box needs to name its sibling in its egress rules or the name should resolve as it stands. Fix the case if it is the setup. If it is a product defect, say so in the PR body and stop. Also answer the two LOW threads at scripts/session-e2e.sh:11047 and :11103.

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.
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 2 of 10 on a /revise note, pushed as 399a57de16aa.

line exit tail
./scripts/session-e2e.sh native_names_answer_on_time 0 native_names_answer_on_time: NOT RUN (no passwordless sudo: the setup script must run as root) session e2e: 1 case(s) NOT RUN: native_names_answer_on_time session e2e OK Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-865d...

Verify min task run agent-verify passed.

Review threads the coder judged:

  • 👍 valid — scripts/session-e2e.sh: Step 3 now passes no step to nnat_on_time. The line prints 'answered in N ms', the lookup's own round trip, with no 'after ... returned' wording. A comment says why.
  • 👍 valid — scripts/session-e2e.sh: Removed the 7656 fallback. When the port cannot be read, the case now fails with an error that prints the daemon log line it read.

Not delivered at this head. On a native Linux host, a box's name answers when min session activate returns, and host.min.internal answers 127.0.0.1 from the host (steps 1 to 3 pass in CI). The unpublished-port step still fails, because box e2e-nnat-a cannot resolve e2e-nnat-b.min.internal from inside the box. That is a product defect, not the case's setup, so the policy-violation leg and the NXDOMAIN-after-destroy leg stay unproven. When the step fails now, the case says that the name did not resolve inside the box, and it prints the box's resolv.conf, a getent of the name and the daemon's failed switch registrations.

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]

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Revise round 1 ran against ci-linux-native-success, native-daemon-e2e and left it red; a coder round cannot clear it, a person should look. No round was started for the failed suite on 399a57de16aa.

@norrietaylor
Copy link
Copy Markdown
Member

/revise The in-box name lookup failure is tracked in #3001, off this task. In native_names_answer_on_time, make the unpublished-port step connect to the second box by its address, so the case proves the refusal and the network policy violation line. Name #3001 under a Residuals heading in the PR body.

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.
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 3 of 10 on a /revise note, pushed as 9084bb7fc95c.

line exit tail
./scripts/session-e2e.sh native_names_answer_on_time 0 native_names_answer_on_time: NOT RUN (no passwordless sudo: the setup script must run as root) session e2e: 1 case(s) NOT RUN: native_names_answer_on_time session e2e OK Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-5150...

Verify min task run agent-verify passed.

On a native Linux host, a box's name answers as soon as min session activate returns and is gone as soon as min session destroy returns. host.min.internal answers 127.0.0.1 from the host. The first box connects to the second box's unpublished port at the address the box-name service answered for it, the connect is refused fast, and the daemon log carries a new network policy violation line for that port. This box cannot run the case, so the native-daemon-e2e lane must show this.

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 e2e-nnat-b.min.internal. I removed the curl-exit-6 branch that diagnosed a failed in-box lookup, because the step no longer makes a lookup. The in-box lookup failure is tracked in #3001. Name it under a Residuals heading in the PR body, as the /revise note asks. I cannot write the PR body. This box has no sudo and no systemd, so the case recorded NOT RUN here. The proof is unverified until the native-daemon-e2e lane runs it. The ci-linux-native-success failure is only the aggregator of that lane.

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Revise round 1 ran against ci-linux-native-success, native-daemon-e2e and left it red; a coder round cannot clear it, a person should look. No round was started for the failed suite on 9084bb7fc95c.

@norrietaylor
Copy link
Copy Markdown
Member

/revise Run 41900517351, native-daemon-e2e: the step now connects and is refused (curl exit 7), but the case then fails with the new 'network policy violation' line does not name port 18193. The line it matched is an unrelated egress-ipv6 one. The step dials 127.0.64.3, the box's loopback address, which does not cross the switch gate, and the gate is what writes the line (T129, refuse_tcp_segment). Dial the second box's switch address, the 100.64.x.x lease, so the SYN reaches the gate. Match only a line with direction=ingress and dst_port 18193.

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.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 4 of 10 on a /revise note, pushed as 70c30c5f5c3e.

line exit tail
./scripts/session-e2e.sh native_names_answer_on_time 0 native_names_answer_on_time: NOT RUN (no passwordless sudo: the setup script must run as root) session e2e: 1 case(s) NOT RUN: native_names_answer_on_time session e2e OK Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-7bd9...

Verify min task run agent-verify passed.

On a native Linux host with passwordless sudo and a switch, the case shows each box name answering as soon as min session activate returns. It shows the second name as NXDOMAIN as soon as min session destroy returns. It shows host.min.internal as 127.0.0.1 from the host. It prints the second box's 100.64.x.x switch address, the refused curl to port 18193 at that address, and the daemon's network policy violation line with direction=ingress and dst_port 18193.

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.

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@norrietaylor norrietaylor left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Nov 4, 2026
@norrietaylor
norrietaylor added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit 5a29f78 Nov 4, 2026
36 checks passed
@norrietaylor
norrietaylor deleted the agent/2951-native-linux-names-answer-on-time-end-to-end branch November 4, 2026 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T145 — Native Linux names answer on time, end to end

1 participant

0