Repository navigation
fix(minimald): an own-address box on a native Linux host resolves a sibling's <box>.min.internal - #3397
Conversation
An own-address box with the session e2e's shape (TCP only, subnets that cover the switch) sends a sibling's A query to the gateway. The relay forwards it, and the switch resolver's zone reply reaches the box unchanged, on a per-daemon /24 with the host-exposures table.
proof_native_names_answer_on_time now runs getent ahostsv4 and curl for e2e-nnat-b.min.internal inside e2e-nnat-a. getent must answer the sibling's switch address, and curl must not exit 6. On a failure the case prints the box's resolv.conf and the daemon's registration and relay DNS lines. A successful gvproxy name registration now logs a debug line, so a missing record and a lost reply read differently.
|
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: CONDITIONS · 1 condition · the full ruling
The code in this PR conforms to the design. The relay test is a correct proof of §5.3 at relay level. The PR does not fix #3354, and its e2e beat 5 has not run on a native host. §7.1 line 249 requires that a box resolves a sibling's <name>.min.internal in-guest, and nothing here proves that on native Linux. The PR body says Fixes #3354, so a merge closes an open defect. C1 changes it to Refs #3354. Then the change can merge, and #3354 stays open as the residual.
Ruled at bbb2309 against gominimal/arch@15b603e6afb8 by claude-opus-5-5.
…ress-box-on-a-native-linux-host-resolv
There was a problem hiding this comment.
Reviewed against D3001 at bbb2309b. This adds proof and diagnostics, not a fix. a_sibling_box_name_resolves_through_the_relay shows that an own-address box with the e2e's TCP-only policy has its UDP 53 query to the gateway, and the resolver's zone reply, pass the relay unchanged on the native /24 shape. A successful register_dns_name now logs at debug, so a failed in-box lookup can be told apart from a missing record. Beat 5 of proof_native_names_answer_on_time adds the in-box getent and curl lookup. Per arch C1, the body now says Refs #3354: beat 5 has run on no lane yet (macOS prints NOT RUN), so #3354 stays open until it passes on a native Linux lane.
The relay proof ran on the default switch's 100.64.0.x, a subnet no native daemon gets. It now runs the box, its sibling and the resolver on a per-daemon /24 (100.64.37.0/24), with the gate and the relay both keyed to it. A new registration proof replays two boxes' zone publishes on one native switch through gvproxy's merge and lookup, and the sibling's names answer at its lease.
…ress-box-on-a-native-linux-host-resolv
|
Round 1 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:
Not delivered on this branch yet. A person can see two unit proofs: a 8000 box on a native daemon's own /24 (100.64.37.0/24) gets a sibling's e2e-nnat-b.min.internal A query forwarded to that /24's gateway resolver and the zone reply back unchanged, and two boxes' zone publishes on one native switch answer the sibling's name at its lease. The e2e beat (getent ahostsv4 e2e-nnat-b.min.internal and curl inside e2e-nnat-a) is written but has not passed on a native Linux lane, so the defect is not shown fixed. Notes from the agent: No product code changes. Static reading of the relay (switch.rs, dns_gate.rs), the registration (gvproxy_network.rs, policy.rs) and the rendered gvproxy config found no defect, and both unit proofs pass on the native shape without a fix. The previous relay proof used 100.64.0.0/24, a subnet no native daemon gets (switch_subnet_for_octet takes octet 1..=254). This round adds a spawn_native_relay_with harness in switch.rs tests and moves the proof to 100.64.37.0/24. policy.rs needed no change: its body is what gvproxy's merge and lookup resolve. The defect, if it is real, sits outside what these tests reach: the live gvproxy-min or the box's own resolver stack. Only beat 5 of proof_native_names_answer_on_time reaches it. The PR body must say Refs #3354, not Fixes #3354, until that beat passes on a native Linux lane. No commit on this branch carries a closing keyword. |
There was a problem hiding this comment.
arch-review: CONDITIONS · 1 condition · the full ruling
The relay and registration proofs conform to §5.3 line 153 and §7.1 line 249. The placement is correct. The task's proof leg is beat 5 of proof_native_names_answer_on_time, and nobody has run it. On lanes without a native daemon, sudo and a staged switch, it reports not_run. The PR body still says Fixes #3354, so the merge will close the defect on an open leg. Make the change in C1. Then the change conforms, and the end-to-end proof stays open on #3354.
Ruled at fb2a5a2 against gominimal/arch@15b603e6afb8 by claude-opus-5-5.
|
/revise merge Do:
|
…ress-box-on-a-native-linux-host-resolv # Conflicts: # crates/minimald/src/net/switch.rs
…ress-box-on-a-native-linux-host-resolv
|
Round 2 of 10 on a /revise note, pushed as Resolved conflicts in:
Verify Converted to a draft: something above needs a person before review. Review threads the coder judged:
No new proof this round. The branch now merges origin/main without conflicts. The relay test still shows that the box's resolver at the gateway of the native /24 answers a sibling's e2e-nnat-b.min.internal name. The in-box getent/curl check (beat 5 of proof_native_names_answer_on_time) is still not run on a native Linux host with gvproxy. Notes from the agent: Merged origin/main with merge commit 3f2a9df. The one conflict was in the spawn_relay_on test harness in crates/minimald/src/net/switch.rs. The resolution keeps main's (gate, name) match. This match gives a named box with no policy an ungated, named relay, and spawn_relay takes main's new box_name argument. The resolution also keeps this PR's subnet parameter in place of SwitchSubnet::default(), so the native /24 harness still works. I changed nothing else. The net:: failures are order-dependent and exist on origin/main too (checked in a temporary worktree). The e2e beat is not run because of the limits of this box. The open thread is valid. The PR body must say Refs #3354, not Fixes #3354, until a native lane prints the beat 5 pass line. I cannot edit the PR body. The runner or a person must make that change. The directive says to keep Fixes #3354, and this thread asks for the opposite, so a person must decide. |
There was a problem hiding this comment.
Re-read at 0cd6aec8. Since fb2a5a27 the only change is a merge of main. The switch.rs conflict is resolved in the test harness: spawn_relay_on takes the subnet and the existing callers pass SwitchSubnet::default(), so the native /24 relay test and main's harness both hold. Required CI is green, and the native lane printed the beat 5 pass line (now in Proof).
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 3 unresolved threads — minimal-arch[bot] scripts/session-e2e.sh:12262, minimal-foundry[bot] crates/minimald/src/net/dns_gate.rs:2716, minimal-arch[bot] scripts/session-e2e.sh:12262. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
There was a problem hiding this comment.
arch-review: CONFIRM · the full ruling
The code conforms to §7.1 line 249 and §5.3 line 153. A TCP-only box's sibling lookup reaches the gateway resolver, and the reply comes back unchanged. This change has no code fix, so the defect proof is beat 5 on a native lane. The PR body says that beat passed at this head in job 132186667407. I could not check that run from this sandbox. Confirm that the job ran at 0cd6aec, did not record the case as NOT RUN, and printed the beat 5 line. If it did, the ruling is PASS.
Ruled at 0cd6aec against gominimal/arch@327e1b57d16b by claude-opus-5-5.
|
Confirming the arch CONFIRM on |
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 0cd6aec8f0ca 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.
Defect
Fixes #3354
crates/minimald/src/net/dns_gate.rscrates/minimald/src/net/switch.rscrates/minimald/src/net/gvproxy_network.rscrates/minimald/src/net/policy.rsscripts/session-e2e.shTask marker
Proof
Beat 5 passed on the native lane at
0cd6aec8(native-daemon-e2e, job 132186667407):The agent's notes below were written before this run.
Not delivered on this box. With this branch, a native Linux lane that has passwordless sudo and the gvproxy switch runs a new beat 5 in proof_native_names_answer_on_time. Inside e2e-nnat-a, getent ahostsv4 e2e-nnat-b.min.internal must exit 0 with e2e-nnat-b's switch address, and curl to http://e2e-nnat-b.min.internal:18194/ must not exit 6. Nobody has seen that beat pass yet. A person can now see the relay-level proof pass: the test a_sibling_box_name_resolves_through_the_relay shows a native-shaped relay (per-daemon /24, host-exposures table, TCP-only box with subnets that cover the switch) forwarding the sibling's A query to the gateway and passing the resolver's zone reply back to the box unchanged.
Notes from the agent: I did not find a code defect, and I did not reproduce the bug. The new relay test passed before any code change, on both the default /16 relay and the native /24 shape with host exposures. So the relay forwards the query and the reply as the task asks. The registration body (dns_add_body) and the call site in finish_own_ip_attach also look correct: each own-IP box registers and . in the min.internal. zone of the switch it attaches to. For this reason I made no change to policy.rs, because its layer note makes a change conditional on the native switch not holding the sibling record, and I could not observe that. I could not run a native own-IP pair here: no gvproxy (fetch-gvproxy.sh needs go.dev, and the GitHub release asset host does not resolve), no sudo, and the box sandbox does not start on this host. The changes are: (1) the relay-level proof in dns_gate.rs; (2) a debug log line in gvproxy_network.rs when a *.min.internal registration on gvproxy succeeds, so that a failing lookup can tell a missing record from a lost reply (before, only a failure was logged); (3) beat 5 in proof_native_names_answer_on_time, which runs getent and curl inside e2e-nnat-a. On a failure it prints the box's /etc/resolv.conf, the r…[truncated]
Tests
cargo test -p minimald a_sibling_box_name_resolves_through_the_relaycargo test -p minimald dns_add_bodybash scripts/session-e2e.shVerify
min task run agent-verifytimed out after 1800s, so this PR is a draft.