Skip to content

T15 — Report native DNS as the live surface while the proxy keeps serving - #1802

Merged
norrietaylor merged 21 commits into
mainfrom
agent/1656-report-native-dns-as-the-live-surface-while-the
Oct 2, 2026
Merged

norrietaylor merged 21 commits into
mainfrom
agent/1656-report-native-dns-as-the-live-surface-while-the

Conversation

@minimal-foundry

@minimal-foundry minimal-foundry Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

T15 — Report native DNS as the live surface while the proxy keeps serving

slice: S3
kind: task
covers: NET-018, NET-019
size: M
est: 150 code, 180 tests
executor: agent
difficulty: routine
model: standard
diagnostics: the bundle's daemon log tail names the live name surface at daemon start
observability: one info log line at daemon start naming the live surface and whether the proxy also serves
layers:
- rpc:
- crates/minimald-rpc/src/lib.rs: the list and create responses gain a defaulted name-surface field; their test literals follow
test: cargo nextest run -p minimald proxy_keeps_serving_after_supersession
- daemon:
- crates/minimald/src/rpc.rs: fills the name-surface field from the answerer and the probe
- crates/minimald/src/net/proxy.rs: hosts the proxy-keeps-serving test
test: cargo nextest run -p minimald name_surface_reported_when_both_deployed
- cli:
- crates/minimal/src/cmd/session.rs: activate prints the live surface
- crates/minimal/src/cmd/list.rs: ls prints the live surface
- crates/minimal/tests/cli.rs: the list-response literals follow; hosts the surface test
test: cargo nextest run -p minimal activate_and_ls_report_native_surface
produces: none
consumes: none
proof: On a host with native resolution and published addresses, activate and ls say native DNS is the live surface, and a request through the proxy still routes.
depends on:
- blocked by #1635
- blocked by #1645

Proof

On a host with native resolution and published addresses, min ls and min session activate now say native DNS is the live name surface — each line naming the port the hostname proxy still serves on beside it — and a request through the proxy still routes after that verdict; the daemon's log carries one info line naming the live surface and whether the proxy serves.

Changed files. Eight files change. Two are outside the task's layers, both by design: crates/minimal/src/resolver.rs holds the three-fact verdict (native_surface_at: answerer bound, resolver hook routes the port, reserved range present, no blocker) beside the host's resolver detection, and crates/minimald/src/server.rs is the only point where the answerer's bind can be reported.

Observability. The daemon logs answerer_bound=true when its answerer binds, not at process boot, because start_host_proxies spawns both drivers detached; it makes no claim about the surface, which only the host can decide. The host-side verdict and its facts are an info! line at session start, visible under RUST_LOG=info (min filters at warn otherwise). min ls --json and --raw skip detection, since they never print the verdict. In human mode min ls reads the host's resolver under its own one-second deadline, so a wedged systemd-resolved costs the list one second and the verdict falls back to the proxy.

CLI. min session activate and min ls both print the surface from native_surface_at, never from the daemon's verdict alone and never gated on the advisory being absent.

Session start. min session activate reads this host's resolver state only when the daemon reports an answerer port. A create without one prints neither line and skips the resolvectl queries. When there is a port, the surface verdict is decided first, and its host-side range read (range_present) feeds the resolver advisory too. So the two lines draw on one probe of one host. A hook that routes over a loopback missing the reserved range gets an advisory naming the missing range, never a silent advisory beside a proxy verdict. The daemon's interim_loopback flag is not used for this: on a VM-backed host it reads the guest's loopback.

Range step. The advisory names a missing range but no command to install it: on macOS the root-held range step is not part of the advisory command yet. #1817 (T76) owns that step, and the code comments point at it.

Commit headers reworded by the runtime to fit commitlint. The header the coder wrote is the first paragraph of each of these commits' bodies:

  • feat(minimald,minimald-rpc): report the daemon's live name surface on its replies
  • feat(minimal): have activate and ls say which name surface is live

Tests

line exit tail
cargo nextest run -p minimald proxy_keeps_serving_after_supersession 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-57d5... Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/65a2a/tree/crates/ot) Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/65a2a/tree/crates/args) C
cargo nextest run -p minimald name_surface_reported_when_both_deployed 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-e40c... Compiling stdlib v0.0.21 (/home/runner/.local/state/minimal/sessions/74f7c/tree/crates/stdlib) Compiling version v0.7.0 (/home/runner/.local/state/minimal/sessions/74f7c/tree/crate
cargo nextest run -p minimal activate_and_ls_report_native_surface 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-b087... Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/3d5c7/tree/crates/ot) Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/3d5c7/tree/crates/args) C

Verify

The three plan lines exit 0 at round 3 (ee9640e1, see the round status comment), and min task run agent-verify passed there. Since fdb3c25, cargo nextest run -p minimal activate_and_ls_report_native_surface selects two tests: the in-process words, and activate_and_ls_report_native_surface_verdict_on_host, which takes the real host range probe to a Native verdict on Linux. The PR lanes run both. Round 5 (0024663e) gated the session-start read on the answerer port and shared the verdict's range read with the advisory; its status comment carries the plan lines' exits.

Closes #1656

… its replies

T15 — Report the daemon's live name surface on its replies

NET-018: the ListSessions and CreateSession replies gain a defaulted
name_surface field, so a client can say which surface answers
*.min.internal rather than infer it from the ports. The daemon fills it
from the two halves it can see of design 7.1's supersession condition:
its box-zone answerer serving, and the reserved local range present —
the same bind probe the interim flag comes from, now returned from the
session-start probe rather than collapsed to a bool before the reply is
built.

NET-019: the verdict never stops the proxy, and the one info line says
so — it names the live surface and whether the hostname proxy keeps
serving, and on which port, deduped per verdict so a host that lists
all day logs one line, not one per RPC. The daemon's boot path brings
both listeners up on detached drivers and awaits neither, so the first
reply a client asks for is the first moment a verdict exists; that
line is what a diagnostics bundle's daemon-log tail shows.

Tests: proxy_keeps_serving_after_supersession drives a request through
the real proxy serve loop after the native verdict, and
name_surface_reported_when_both_deployed brings both listeners to
serving over the real SSH wire and asserts both replies and the log
line.
The new name-surface test holds the process-global probe stand-in's
mutex across its awaited list and create, like the interim tests do.
clippy-strict wants that hold spelled as an expect with the reason on
it for lines this branch adds, so name it: the window has to cover the
awaited RPCs.
T15 — Have activate and ls say which name surface is live

NET-018: min ls prints a NAME SURFACE line and min session activate
prints the same words on stderr when the daemon reports native DNS —
both halves of the supersession condition deployed on the host it
serves. The line says the proxy's half with it (NET-019): it names the
port an HTTP(S)_PROXY export points at, so what activation printed
before keeps working beside the verdict and nothing a client captured
goes stale when the surface changes. The proxy verdict prints nothing —
the port lines and the routing warning already tell that story — and
the naming advisory (NET-122) stays what says how to point the host's
resolver at the answerer; the two compose, since the surface says where
names answer from and the advisory how to reach it.

Driven through the compiled binary in activate_and_ls_report_native_
surface: both listeners up the way the daemon's start path brings them,
the reply read first so a daemon that stopped filling the field fails as
the field, then what the user actually sees asserted on both verbs.
@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

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

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 5c892e39-e7c2-4582-94f7-6fe90bd7e86e

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
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@minimal-foundry

minimal-foundry Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Approved: no findings at 7deb739b8b6d.

Nothing to do.

Verdict APPROVE, posted as a comment: the App cannot review its own pull request; the check and the label carry it.

Clobber: none: git log on resolver.rs and rpc.rs shows only this PR's own commits; nothing reverts a recent fix.

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

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 2, 2026

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

  1. Layers, defaults and compat are clean: six files exactly as planned, name_surface is #[serde(default)] to Proxy on both replies with old-daemon decode tests, no deny_unknown_fields in the way, all literals updated.
  2. All three plan tests exist verbatim; activate_and_ls_report_native_surface asserts both verbs, and name_surface_reported_when_both_deployed proves Proxy-then-Native on list and create plus the log line.
  3. HIGH: live_name_surface (rpc.rs:409) reads "host-OS resolution deployed" as "answerer bound" and "published addresses" as the daemon's own (guest) probe, so a Linux host with no resolved link, and every macOS host, is told "native DNS is the live name surface" — right beside the NET-122 advisory telling it to configure the resolver. Gate the CLI line on advisory.is_none() in activate and on Hook::routes + the host probe in ls (resolver.rs already has both; cli-layer edits only).
  4. MEDIUM: the "at daemon start" info line is emitted on the first RPC (needs a plan note or a server.rs follow-up), and native_name_surface_line(None) claims the proxy "still serves" when the daemon reports no proxy port.
  5. LOW: per-ls 254-bind re-probe, name_surface_reported_when_both_deployed never routes through the daemon's proxy, as_str vs serde spelling, published-addresss typo x3.

@norrietaylor

Copy link
Copy Markdown
Member

/revise

Round 1 fixes the NET-018 WHERE condition and three smaller defects; the plan's six files stay the layer list.

  1. The live surface is decided from the host's facts, not the daemon's. NET-018 says native DNS is live WHERE host-OS resolution and published addresses are both deployed on the host. live_name_surface (crates/minimald/src/rpc.rs:409) answers from "the answerer is bound" and the daemon's own loopback probe, which on a VM-backed host is the guest's and always reads present, so a Linux host with no resolver link and every macOS host are told native DNS is live, right beside the NET-122 advisory telling them to configure the resolver. Keep the daemon field as what the daemon can know (rename its doc to say so), and have the CLI decide what it prints: activate (crates/minimal/src/cmd/session.rs) prints native only when the daemon reports native AND the resolver advisory is absent; ls (crates/minimal/src/cmd/list.rs) prints native only when the daemon reports native AND resolver::session_detection() plus Hook::routes(zone_answerer_port) both hold (both already exist in crates/minimal/src/resolver.rs). Extend activate_and_ls_report_native_surface with the negative case: daemon says native, host has no resolver hook, both verbs print the proxy as the live surface. No new dependency on the daemon side.
  2. native_name_surface_line(None) (crates/minimal/src/cmd/list.rs:363) says the proxy "still serves" when the daemon reports no proxy port. Say it is not serving, matching the daemon's own log wording for that state.
  3. The "at daemon start" observability line fires on the first list/create RPC (log_live_name_surface, crates/minimald/src/rpc.rs:445), not at start, so a bundle taken before any RPC has no line. State that in the PR body's Verify section as the interim with the reason (the second listener's port is recorded after start), and name the follow-up; no code change in this round.
  4. Small fixes in the same files: published-addresss typo at rpc.rs:127, rpc.rs:313, crates/minimald/src/net/proxy.rs:887; NameSurface::as_str (crates/minimald-rpc/src/lib.rs:261) returns hostname-proxy/native-dns while the wire spells proxy/native — use one spelling; name_surface_reported_when_both_deployed (rpc.rs:3053) should route one request through the daemon's own proxy after the Native assertion so NET-019 is proved on the daemon side too, not only by the pure function in proxy.rs:879.

Tests to run: the three plan lines, just test for minimal, minimald-rpc, minimald (the latter via the lane), just clippy.

@norrietaylor
norrietaylor enabled auto-merge October 2, 2026 07:29
T15 revise — the surface word, the daemon field's name, and the
daemon-side proof that the proxy keeps serving.

as_str said `hostname-proxy`/`native-dns` while the wire spells
`proxy`/`native`; use the wire's words, so the log's name_surface
field and the reply it came from cannot disagree. The NameSurface docs
now say what the daemon's field is: the daemon's own half of design
7.1's supersession condition — its answerer serving and its own
loopback probe, the guest's on a VM-backed host — never the host's
resolver state, which is the client's half to detect and combine; the
`published-addresss` typos go with them.

name_surface_reported_when_both_deployed now routes one request
through the daemon's own proxy after the Native assertion, so NET-019
is proved on the daemon side too, not only by the pure verdict in
proxy.rs driving a serve loop it spun up itself. The proxy.rs test
helpers move to module scope so the rpc tests can drive the daemon's
real listener.
NET-018's WHERE is about the host, and the daemon's verdict is only its
own half: its loopback probe measures the interface it sits on — the
guest's on a VM-backed host, where it always reads present — so a Native
reply says this daemon answers the zone, never that the host's resolver
resolves it. Deciding what to print from the verdict alone let a daemon
inside a microVM tell the host user that native DNS was live when
nothing on the host looked at the answerer.

The decision is now made from both halves, in the CLI:

- `activate` prints native only when the daemon reports native and the
  NET-122 advisory is absent (no hook to configure, no stub bypass):
  the advisory was already read there, so the gate costs nothing new.
- `ls` reads the host's hook the same read-only way and prints native
  only when it routes to the answerer port the reply names; a
  proxy-verdict host pays no detection at all.

Both verbs say the proxy is the live surface when the halves disagree,
with the port it serves on, and the arm with no port to name now says
the proxy is not serving (the daemon's own log wording) rather than
claiming it still serves.

The test covers both outcomes. The negative case drives both verbs
through the compiled binary on this hook-less host; the positive one
puts a stand-in resolvectl first on `min ls`'s PATH that answers the
reads detection makes exactly the way a configured host's does.
Activate's native arm is asserted on the pure decision, because its
gate also reads /etc/resolv.conf and the hosts: chain — host files no
stand-in can stand in for.

@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 — 1 finding, 1 inline.

Comment thread crates/minimal/src/cmd/list.rs Resolved
@minimal-foundry minimal-foundry Bot removed the review:approved minimal-review approved the current head label Oct 2, 2026
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on a /revise note, pushed as a9195f74800b.

line exit tail
cargo nextest run -p minimald proxy_keeps_serving_after_supersession 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-89b4... Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/85ca4/tree/crates/ot) Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/85ca4/tree/crates/args) C
cargo nextest run -p minimald name_surface_reported_when_both_deployed 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-c534... Compiling stdlib v0.0.21 (/home/runner/.local/state/minimal/sessions/f1b93/tree/crates/stdlib) Compiling version v0.7.0 (/home/runner/.local/state/minimal/sessions/f1b93/tree/crate
cargo nextest run -p minimal activate_and_ls_report_native_surface 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-1f33... Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/9bd3e/tree/crates/args) Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/9bd3e/tree/crates/ot) C

Verify min task run agent-verify passed.

On a host whose resolver routes the zone to the daemon's answerer, min ls and min session activate say native DNS is the live name surface and name the still-serving proxy beside it — but only when the host's own hook is read as routing there (the same two verbs name the proxy as the live surface on a hook-less host), and a request through the daemon's own proxy still routes right beside the native verdict, so a captured HTTP(S)_PROXY export keeps working.

Notes from the agent: Directive items, all four addressed. (1) The reported surface is now decided in the CLI from the daemon's verdict plus the host's own facts: activate prints native only when the daemon says native and the NET-122 advisory is absent (the advisory was already read there); ls reads resolver::session_detection() and requires Hook::routes(zone_answerer_port), paying no detection on a proxy-verdict host. The daemon's field stays what the daemon can know — its NameSurface doc, the live_name_surface doc, and both reply-field docs say so — and no daemon-side dependency was added. The test covers both outcomes: the negative case drives both verbs through the compiled binary on this hook-less host (both print the proxy as live), the positive case puts a stand-in resolvectl first on min ls's PATH that answers the two reads detection makes exactly the way a configured host's does, so ls says native and still names the proxy's port. Activate's native arm is asserted on the pure decision (reported_name_surface) rather than through the binary: its gate is the advisory, whose other reads — /etc/resolv.conf and the hosts: chain — are host files no PATH stand-in can stand in for, so that arm through the binary would assert on whichever host happens to run the suite. (2) name_surface_line(Native, None) now says 'the hostname proxy is not serving', matching the daemon's own log wording for the no-port state, asserted in the test (and the no-native-words negative case kee…[truncated]

@norrietaylor

Copy link
Copy Markdown
Member

/revise

Round 2 carries the architecture conditions on round 1's direction, which minimal-review's open thread on a9195f74 (cmd_ls at crates/minimal/src/cmd/list.rs:326: ls gates on hook.routes(port) alone while activate gates on the advisory's absence, so the two verbs can disagree on one host) states from the code side (the live-surface verdict belongs to the node's host side: minimald on a native host, the min process as the host-side helper on a VM host).

  1. One three-fact function decides, and both verbs print from it. Put the verdict in the host-side helper module (crates/minimal/src/resolver.rs, beside naming_surface / session_detection / Hook::routes), not in command code: native DNS is live only when the resolver hook routes the zone, the answerer is bound, and the published range is present on the host. activate and ls both call that one function; neither path gates on "advisory absent" or on its own probe mix, so the two verbs cannot disagree. T65 inherits it unchanged.

  2. The daemon's field says what the daemon knows. Rename or re-document NameSurface on the list and create replies as "answerer bound in the daemon's namespace" (answerer_bound), with the serde default and the old-daemon decode tests kept. On a VM-backed host the guest's 127.0.64.0/24 probe is Linux loopback and always present, so it is the wrong fact, not an incomplete one: the CLI never prints the daemon field as the surface on a VM host. On a native Linux host the daemon's probe is the host probe and may feed the three-fact function as the published-addresses input. No new RPC input to the guest daemon: the guest is never told host facts it cannot verify.

  3. Log at the right moment, not on the first RPC. Daemon: one info line once the answerer binds. Host side: the helper logs the three-fact verdict at session start beside the advisory. Drop the first-RPC dedup static in log_live_name_surface.

  4. Negative and positive test. Extend activate_and_ls_report_native_surface: a host with no resolver hook (macOS with no resolver file, or Linux with no resolved link), answerer bound, daemon field set → activate and ls both print the proxy as live and the NET-122 advisory; the same host once the hook and the range are present → both print native and no advisory.

  5. PR body. Round 1's item 3 is still open: the Verify section still reads the task-run boilerplate. State the interim (the "at daemon start" line fires on the first list/create RPC because the second listener's port is recorded after start), the reason, and the follow-up; and list the test lines actually run with their results.

Tests to run: the three plan lines, just test for minimal, minimald-rpc and minimald, just clippy.

Round 2 of the NET-018 report: the daemon's reply field says only what
the daemon can know. NameSurface (native/proxy, computed from the
answerer port and the daemon's own range probe) becomes answerer_bound:
a plain bool, serde-defaulted false so a daemon predating the field
decodes as the read that changes nothing. The probe it dropped was the
wrong fact rather than an incomplete one — on a VM-backed host it
covers the guest's loopback, where the reserved range always reads
present — and no new RPC input reaches the guest daemon: the host is
never told host facts it cannot verify.

The observability line moves to the moment it can first be true, and to
the daemon's own moment rather than a request's: the answerer driver's
serving tail logs it once, where round 1 emitted it on the first
list/create RPC behind a process-global dedup static. The proxy half of
the line reads behind a short settle window, because the two listeners
start together on detached drivers and neither waits for the other; a
proxy still unrecorded past the window is named as not serving, and its
own startup line corrects the record when it lands.
The NET-018 verdict moves into the host-side helper module, beside the
detection it reads from, and both verbs print from it: native DNS is
live only when the host's hook routes the zone to the answerer, the
daemon reports its answerer bound, and the reserved range is present on
the host's own loopback. `min ls` folded only the hook in, so on a host
whose routing-domain hook is configured but whose lookups bypass the
resolver it configures, ls printed native while activate printed the
proxy — the hook is dead configuration there, and the proxy is the
surface that answers. The stub-bypass blocker is now part of the one
condition both verbs share, so they cannot disagree.

activate reads the detection once and builds both the NET-122 advisory
and the surface verdict from that single read. The proxy arm prints now
where the daemon's answerer is bound and the host's half is missing;
nothing prints when it is not, so an old daemon's silence cannot be
misread. The native arm of the integration test cannot be driven through
the binary hermetically — the blocker reads /etc/resolv.conf and the
hosts: chain directly, host files no PATH stand-in can replace — so the
arm, and the blocked-hook case, are asserted on the pure decision beside
the function, where every host runs them.

@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 — 1 finding, 1 inline.

Comment thread crates/minimald/src/rpc.rs Resolved
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

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

The coder ran out of its 7200s before it finished. If it left work uncommitted, its last commit is the runtime's snapshot of that work as it stood — the commit message says so — and not a finished step: it may not build or pass its tests.

line exit tail
cargo nextest run -p minimald proxy_keeps_serving_after_supersession 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-9f46... Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/cc298/tree/crates/args) Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/cc298/tree/crates/ot) C
cargo nextest run -p minimald name_surface_reported_when_both_deployed 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-9cd2... Compiling stdlib v0.0.21 (/home/runner/.local/state/minimal/sessions/c2558/tree/crates/stdlib) Compiling version v0.7.0 (/home/runner/.local/state/minimal/sessions/c2558/tree/crate
cargo nextest run -p minimal activate_and_ls_report_native_surface 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-e673... Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/706b5/tree/crates/args) Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/706b5/tree/crates/ot) C

Verify min task run agent-verify exited 101.

r-8d8aa00ba968566b,libfixedbitset-c47ab05690b2c977,liboci_spec-a509a56b1c174aeb,libserde_json-dd71bb1329387d5f,libitoa-17247a2c8a875a3d,libzmij-a9f64107b4f67e7b,libstrum-0870597cc0b980a9,libconst_format-d017f48238471de7,libkonst-4cbe07639d476c66,libkonst_macro_rules-33f9ae435d3d8390,libregex-a45380dfb0c18c16,libregex_automata-15d52b09c1eb3da6,libaho_corasick-4ecd245a8ac8a72e,libmemchr-f635c68eca474dfb,libregex_syntax-4a7e88b4afb8f2c4,libderive_builder-8a22a8cad7605b54,libtun_rs-783729cb9f06ba1d,libnetconfig_rs-8b4a7e3f0cb3f076,libnetlink_sys-a674cf2c3070d0fa,libnetlink_packet_route-0080c9501633cc0e,libnetlink_packet_core-c082569e93b60f4f,libnix-003b564a724f9248,libthiserror-d480180f980aa8a1,liblog-367969b2b60f5a63,libgetifaddrs-2417586577946490,libipnet-2f9694cec626d833,libbyteorder-9898653c1ae8ad14,libnix-92e1ec51eec4296e,libbytes-97dfa7eb158589c1,libsendfd-45837fc6edb93657,libtempfile-e9119629cf7bea1d,libgetrandom-b71ea123c379e4b2,libfastrand-a6018bd3d43190c6,libonce_cell-95bf9403d1811857,libportable_atomic-eb019a898abb5d0a,librustix-6c1ccdf526613d4b,liblinux_raw_sys-3f2dd9ef9c127637,libserde-75035935062ebae6,libnix-0cb1499e952ee516,libmemoffset-97cc09cc8ed0335c,libbitflags-0492bab2449ba0a3,libserde_core-ee9647d9df6f413c,libcfg_if-e3caa094f03d0de5,liblibc-836828b86c8ecf52}.rlib" "<sysroot>/lib64/rustlib/x86_64-unknown-linux-gnu/lib/{libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,libcfg_if-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,liblibc-*,librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-L" "/work/build-cache/cargo-home/build/debug/deps/rustcIk6Z3a/raw-dylibs" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/work/build-cache/cargo-home/build/debug/build/tree-sitter-6d857ef690a7a05e/out" "-L" "/work/build-cache/cargo-home/build/debug/build/tree-sitter-nickel-3f36464d3516a3fb/out" "-L" "/work/build-cache/cargo-home/build/debug/build/zstd-sys-c7912bebb9979a47/out" "-L" "/work/build-cache/cargo-home/build/debug/build/blake3-bbcf47287b18f779/out" "-L" "/work/build-cache/cargo-home/build/debug/build/aws-lc-sys-ff63e510f19823f4/out" "-L" "<sysroot>/lib64/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/work/build-cache/cargo-home/build/debug/deps/netns_root_integration-1b9ef06bb1cdc065" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: /usr/bin/ld: final link failed: No space left on device
          collect2: error: ld returned 1 exit status
          

error: could not compile `minimald` (test "netns_root_integration") due to 1 previous error
error: command `/usr/bin/cargo '--color=auto' test --no-run --message-format json-render-diagnostics --package minimal --package minimald --package minimald-rpc --locked` exited with code 101

Outside the task's layers::

  • crates/minimal/src/resolver.rs
  • crates/minimald/src/server.rs

Converted to a draft: something above needs a person before review.

On a host with native resolution and published addresses, activate and ls say native DNS is the live surface, and a request through the proxy still routes.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft October 2, 2026 10:43
auto-merge was automatically disabled October 2, 2026 10:43

Pull request was converted to draft

@norrietaylor

Copy link
Copy Markdown
Member

/revise

Round 3 closes the parts of round 2 that did not land. The coder hit its 7200 s budget, and the PR body was never refreshed. Round 2's three-fact function (native_surface_at, crates/minimal/src/resolver.rs:866) and the answerer_bound wire field are correct: keep both as they are.

  1. Prove NET-018's positive arm on its verify line. Add a #[cfg(target_os = "linux")] test in resolver.rs asserting live_name_surface_at(&(routing_hook(), None), Some(port), true).await == Some(LiveSurface::Native). It runs the real host range probe, which reads present on Linux. In activate_and_ls_report_native_surface (crates/minimal/tests/cli.rs:1650), after the negative arm, format the live daemon's list reply with format_ls(.., Some(LiveSurface::Native)). Assert that NAME SURFACE: native DNS is the live name surface and the hostname proxy still serves on 127.0.0.1:{port} are printed, and that no advisory text appears. Assert that name_surface_line(LiveSurface::Native, created.hostname_proxy_port) produces the words activate prints. Say in the test doc that this is the in-process positive arm and why the binary cannot reach it.
  2. Make the daemon's log line say what the daemon knows. In log_live_name_surface (crates/minimald/src/rpc.rs:428-442), replace name_surface = "native" with answerer_bound = true. Reword the message so it no longer says "the live name surface is native": name the bound answerer and its port, say that native DNS is live once the host's resolver routes the zone and that min ls reports the host's surface, and keep the proxy half. Update the matcher and asserts in name_surface_reported_when_both_deployed (rpc.rs:3124 onward).
  3. Add the host-side verdict log at session start. In activate_session (crates/minimal/src/cmd/session.rs:666-700), emit one tracing::info! beside the advisory with the verdict and the facts behind it: surface, hook_routes, blocker, answerer_bound, range_present. Do not log on ls.
  4. Skip detection when ls will not print it. In cmd_ls (crates/minimal/src/cmd/list.rs:324), call live_name_surface only when neither --json nor --raw is set. Correct the comment's "a proxy-only host pays nothing" claim, since the answerer is bound on every current daemon.
  5. Fold min_command back into run_min (crates/minimal/tests/cli.rs:1358) unless item 1 reuses it.
  6. Rewrite the PR body. Name the 8 changed files and state that resolver.rs (revise ask 1) and server.rs (the answerer-bind log) are outside the plan layers, and why. State the observability placement: the line fires at the answerer's bind, not at process boot, because the drivers are spawned detached, and the proxy half waits up to a 2 s settle. Name the follow-up, if any. Delete the stale "six files", "first list or create RPC" and "gated on the daemon's verdict alone" sentences. Replace the Verify boilerplate with the test lines actually run and their results.

Tests to run: the three plan lines, just test for minimal, minimald-rpc and minimald, just clippy.

The surface line emitted at the answerer's bind claimed the live name
surface was native — unqualified, on the field and the headline — even on
a host whose resolver never consults the answerer, so a bundle's daemon
tail could tell a support engineer the opposite of what min ls had told
the user. The line now says what this daemon knows: its box-zone
answerer is bound on a port, native DNS becomes the live name surface on
the host once its resolver routes the zone to it, and min ls reports
that host's verdict; the proxy's half is unchanged. The field the daemon
records is answerer_bound, matching the fact the RPC replies carry.
The verdict's host-side record: activate now emits one info line beside
its advisory naming the verdict and the three facts it was read from
(surface, hook_routes, blocker, answerer_bound, range_present), because
the daemon's own line can name only the answerer it binds. The range
fact rides a new verdict-carrying form of the same decision, so the one
read the session start makes decides the advisory, the verdict, and the
log; a verdict that settled without a probe records a range never read
as None. ls still does not log.

ls also reads the detection only in the modes that can print the
verdict: --json and --raw never carried the line, so they no longer pay
the resolver read; the answerer is bound on every current daemon, so
every human list still does.

Proves NET-018's positive arm on its verify line: the resolver test runs
the real host bind probe under the pinned three-fact call, and the cli
test feeds the native verdict through the formatter both verbs print
from over the live daemon's reply, asserting the native words, the
proxy's half, the advisory's absence, and that activate prints the same
line.
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

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

line exit tail
cargo nextest run -p minimald proxy_keeps_serving_after_supersession 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-bae6... Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/c92fd/tree/crates/args) Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/c92fd/tree/crates/ot) C
cargo nextest run -p minimald name_surface_reported_when_both_deployed 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-c1d7... Compiling stdlib v0.0.21 (/home/runner/.local/state/minimal/sessions/166c1/tree/crates/stdlib) Compiling version v0.7.0 (/home/runner/.local/state/minimal/sessions/166c1/tree/crate
cargo nextest run -p minimal activate_and_ls_report_native_surface 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-3fa1... Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/4840a/tree/crates/ot) Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/4840a/tree/crates/args) C

Verify min task run agent-verify passed.

Outside the task's layers::

  • crates/minimal/src/resolver.rs
  • crates/minimald/src/server.rs

Converted to a draft: something above needs a person before review.

Review threads the coder judged:

  • 👍 valid — crates/minimald/src/rpc.rs:445: Fixed both ways: the daemon's line now records answerer_bound=true and says the bound answerer and its port, native DNS once the host's resolver routes the zone, min ls reports the host's surface - never a surface claim; and the host-side verdict is logged at session start (surface, hook_routes, b

On a host with native resolution and published addresses, min session activate and min ls say native DNS is the live name surface, with the hostname proxy's port still named beside it and a request through the proxy still routing; the daemon's log now records only the fact it can know (answerer_bound, the bound port) and points at min ls for the host's verdict, which activate also logs beside its advisory with the three facts behind it (surface, hook_routes, blocker, answerer_bound, range_present).

Notes from the agent: Round 3 addressed every directive item. NET-018 reports the host's live name surface while NET-019 keeps the proxy serving: the list and create replies carry a defaulted answerer_bound field (minimald-rpc) that the daemon fills from its answerer's bind (minimald/src/rpc.rs), the CLI decides the live surface in one three-fact function over the host's own reads (resolver.rs) and prints it at activate and ls, and the native words keep the proxy's half. Changed files (8): crates/minimald-rpc/src/lib.rs, crates/minimald/src/rpc.rs, crates/minimald/src/net/proxy.rs, crates/minimald/src/server.rs, crates/minimal/src/resolver.rs, crates/minimal/src/cmd/session.rs, crates/minimal/src/cmd/list.rs, crates/minimal/tests/cli.rs. Two of the eight are outside the task's plan layers, by need: crates/minimal/src/resolver.rs, because the verdict is the host's and its only honest compute site is where the host's resolver state is read, beside the detection and the advisory the session start shares a read with (added in round 2 for the same reason, kept per the directive); and crates/minimald/src/server.rs, because the observability line's only honest emit point is the answerer driver's serving tail, which lives there. Observability placement: the daemon's line fires at the answerer's bind, not at process boot, because the proxy and answerer drivers are spawned detached and neither waits for the other; the line's proxy half therefore reads the recor…[truncated]

…line

Rename the resolver's Linux positive-arm test so the plan's verify filter
runs it beside the in-process words. Correct the session-start log comment
(min filters at warn unless RUST_LOG is set) and the run_min lifetime doc.
@norrietaylor
norrietaylor marked this pull request as ready for review October 2, 2026 13:05

@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 — 1 finding, 1 inline.

Comment thread crates/minimal/src/cmd/list.rs Resolved
The review on `min ls` asked whether the most frequently-invoked verb
should pay the session-start's resolver detection on every human-mode
run: two resolvectl queries that each could block five seconds — ten on
a wedged systemd-resolved — and two subprocess spawns a healthy host
pays for a line the reply cannot carry.

The deliberate answer: the line stays (it is the list's status, and the
proof of NET-018 names it), but the read behind it is sized for the verb
that pays it. The list reads at its own one-second deadline — the same
one GIT_PROBE_TIMEOUT gives the list's own host-side subprocess probes —
and the two queries run under that one deadline together, so a wedged
systemd-resolved costs a list one second, not ten, and a read the
deadline outlives reads as absent, which is the proxy's arm: the verdict
that cannot strand the user, and the verdict a wedged resolver genuinely
leaves.

The session start keeps the generous five-second deadline its advisory
is sized for; running the pair together halves its worst case from ten
to five. Two tests pin the list's halves with a query stand-in: a
wedged resolver costs the list one deadline, not a hang, and the
deadline is the pair's, paid once.

@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 — 1 finding, 1 inline.

Comment thread crates/minimal/src/resolver.rs Resolved
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 4 of 10 on the runtime's review findings, pushed as ad915bb1dc29.

line exit tail
cargo nextest run -p minimald proxy_keeps_serving_after_supersession 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-7ca8... Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/1782b/tree/crates/ot) Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/1782b/tree/crates/args) C
cargo nextest run -p minimald name_surface_reported_when_both_deployed 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-5a71... Compiling stdlib v0.0.21 (/home/runner/.local/state/minimal/sessions/5b39a/tree/crates/stdlib) Compiling version v0.7.0 (/home/runner/.local/state/minimal/sessions/5b39a/tree/crate
cargo nextest run -p minimal activate_and_ls_report_native_surface 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-d486... Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/d6f9c/tree/crates/args) Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/d6f9c/tree/crates/ot) C

Verify min task run agent-verify passed.

Outside the task's layers::

  • crates/minimal/src/resolver.rs
  • crates/minimald/src/server.rs

Converted to a draft: something above needs a person before review.

Review threads the coder judged:

  • 👍 valid — PRRT_kwDOPdfcxM6oWTF4: The finding held: every human-mode min ls ran the session-start-sized detection, two resolvectl queries each bounded at 5s — up to ~10s on a wedged systemd-resolved. Deliberate answer: the NAME SURFACE line stays by default (it is the list's status, and NET-018's proof names ls saying it), but the (not posted on the thread: not an open thread on the pull request)

On a host with native resolution and published addresses, activate and ls still say native DNS is the live name surface while the hostname proxy keeps serving beside it, and a request through the proxy still routes; and min ls's verdict now costs the list at most its own one-second resolver deadline — the two resolvectl queries run under that one deadline together — never the ten a wedged systemd-resolved could previously add to every human-mode list.

Notes from the agent: The fix's code lives in resolver.rs, which task.md's layers do not name: it is the one shared three-fact decision function this task's earlier rounds built (list.rs's layer note points at it), and it is the function cmd_ls calls — the only place the read's deadline could be sized for the verb that pays it. list.rs, a named layer, carries the decision's comment at the finding's own lines; session.rs, minimald, minimald-rpc and tests/cli.rs needed no change, so the user-visible words and every existing test literal are untouched. The finding's healthy-host half — two read-only subprocess spawns per human-mode list — was kept deliberately: it is the read the line is for, the same class as the git probes min ls already runs per session, and both spawns now fit under the single one-second deadline the list's own GIT_PROBE_TIMEOUT precedent set. just clippy-strict still reports two hits on lines an earlier round of this branch changed (crates/minimald/src/net/proxy.rs:786-787, clippy::let_underscore_must_use in the proxy-keeps-serving test's fake backend, from commit 1b55d84) — outside this round's directive, so reported here rather than fixed, per the repo's revise-round rule. No deferred tests this round.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft October 2, 2026 14:11
@norrietaylor
norrietaylor marked this pull request as ready for review October 2, 2026 14:21
…ow compile

The RESOLVECTL_BOUND and LIST_RESOLVECTL_BOUND consts and the macOS host_detection
signature name Duration on every target, but the import was gated to Linux and tests.

@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 — 1 finding, 1 inline.

Comment thread crates/minimal/src/resolver.rs Resolved
The test comments said "the reviewer's host" and "the round's answer"; they now name the
dead-hook and wedged-resolver states they exercise.

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

Comment thread crates/minimal/src/cmd/session.rs Resolved
Comment thread crates/minimal/src/cmd/session.rs Resolved
The detection ran on every activate, but both lines it feeds — the
naming advisory and the live-surface verdict — require the reply's
zone_answerer_port: with none reported (an answerer still coming up,
or a daemon that predates the field) neither can print, and the two
resolvectl queries under RESOLVECTL_BOUND were pure wasted work —
five seconds on a wedged systemd-resolved. The read now sits inside
the port's gate, so the no-port activate keeps the zero-cost path it
had before either line read this host.
The surface verdict reads the reserved range from this host's own
loopback, but the advisory's quiet arm read the daemon's interim
flag — which on a VM-backed host reflects the guest's loopback and
always says present. A host whose own loopback lacks the range got
a verdict naming the proxy beside a silent advisory, with nothing
saying the range was what was missing. The advisory now takes the
range fact the verdict's own read produced — one probe, one host —
so a hook that routes over a loopback without the range is told the
range is the missing fact, and the cannot-disagree test covers the
range-absent-with-routing-hook arm it had never exercised.

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

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 2, 2026
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 5 of 10 on the runtime's review findings, pushed as 0024663edd5c.

line exit tail
cargo nextest run -p minimald proxy_keeps_serving_after_supersession 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-d9c6... Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/5690e/tree/crates/ot) Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/5690e/tree/crates/args) C
cargo nextest run -p minimald name_surface_reported_when_both_deployed 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-10a5... Compiling stdlib v0.0.21 (/home/runner/.local/state/minimal/sessions/a5e8b/tree/crates/stdlib) Compiling version v0.7.0 (/home/runner/.local/state/minimal/sessions/a5e8b/tree/crate
cargo nextest run -p minimal activate_and_ls_report_native_surface 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-ecb6... Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/2d4a3/tree/crates/args) Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/2d4a3/tree/crates/ot) C

Verify min task run agent-verify passed.

Outside the task's layers::

  • crates/minimal/src/resolver.rs
  • crates/minimald/src/server.rs

Converted to a draft: something above needs a person before review.

Review threads the coder judged:

  • 👍 valid — PRRT_kwDOPdfcxM6oYWp3: Gated the detection, advisory, and verdict on created.zone_answerer_port, so a no-port create reads nothing and keeps its zero-cost path (commit d72e453). (not posted on the thread: not an open thread on the pull request)
  • 👍 valid — PRRT_kwDOPdfcxM6oYWp_: The advisory now takes the range fact from the verdict's own host probe — one read, one host — so a routing hook over a loopback without the range is told the range is what is missing, and the cannot-disagree test covers that range-absent arm (commit 0fab73c). (not posted on the thread: not an open thread on the pull request)

On a host with native resolution and published addresses, min session activate and min ls still name native DNS as the live name surface with the hostname proxy serving beside it, and a request through the proxy still routes; after this round the advisory beside that line reads the same reserved-range probe the verdict read, so a host whose own loopback lacks the range is told the range is what is missing instead of getting a silent advisory beside a proxy verdict, and a create that reports no answerer port pays no resolver read at all.

Notes from the agent: Both threads judged valid and fixed on the branch (commits d72e453 and 0fab73c, plus rustfmt 0024663). resolver.rs is not one of the task's layers: lines, but the advisory's quiet arm that thread 2 names lives there (advisory_at/session_advisory_at), and the branch's earlier rounds already built the advisory/verdict machinery in that file, so the fix belongs there; only the minimal crate changed this round. just clippy-strict exits 2 with two clippy::let_underscore_must_use hits at crates/minimald/src/net/proxy.rs:786-787 — let _ = sock.read(..)/let _ = sock.write_all(..) in the spawn_backend test helper an earlier round of this task added; per the repo's revise-round rule a hit on a line the directive did not name is a note, not a licence to edit it, so they are reported here and left alone. No deferred lanes this round.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft October 2, 2026 16:16
The interim advisory's comments said the macOS command does not carry the
range step yet. Point them at T76 (#1817), the task that owns it.
@norrietaylor
norrietaylor marked this pull request as ready for review October 2, 2026 16:27

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

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

Approved at 7deb739. It meets the T15 plan block, and both round-4 findings are fixed: detection is gated on the answerer port, and the advisory reads the host-side range. The architecture review confirmed it, on the condition that the range step's owner is linked; that is #1817, now linked in the code and the body. All lanes are green.

@norrietaylor
norrietaylor added this pull request to the merge queue Oct 2, 2026
Merged via the queue into main with commit 8fcbb22 Oct 2, 2026
34 checks passed
@norrietaylor
norrietaylor deleted the agent/1656-report-native-dns-as-the-live-surface-while-the branch October 2, 2026 17:53
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.

T15 — Report native DNS as the live surface while the proxy keeps serving

1 participant