Repository navigation
T15 — Report native DNS as the live surface while the proxy keeps serving - #1802
norrietaylor merged 21 commits into
Conversation
… 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.
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
Approved: no findings at 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: |
norrietaylor
left a comment
There was a problem hiding this comment.
- Layers, defaults and compat are clean: six files exactly as planned,
name_surfaceis#[serde(default)]toProxyon both replies with old-daemon decode tests, nodeny_unknown_fieldsin the way, all literals updated. - All three plan tests exist verbatim;
activate_and_ls_report_native_surfaceasserts both verbs, andname_surface_reported_when_both_deployedproves Proxy-then-Native on list and create plus the log line. - 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 onadvisory.is_none()in activate and onHook::routes+ the host probe in ls (resolver.rs already has both; cli-layer edits only). - 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. - LOW: per-
ls254-bind re-probe,name_surface_reported_when_both_deployednever routes through the daemon's proxy,as_strvs serde spelling,published-addressstypo x3.
|
/revise Round 1 fixes the NET-018 WHERE condition and three smaller defects; the plan's six files stay the layer list.
Tests to run: the three plan lines, |
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.
…ive-dns-as-the-live-surface-while-the
|
Round 1 of 10 on a /revise note, pushed as
Verify On a host whose resolver routes the zone to the daemon's answerer, 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: |
|
/revise Round 2 carries the architecture conditions on round 1's direction, which
Tests to run: the three plan lines, |
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.
|
Round 2 of 10 on a /revise note, pushed as 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.
Verify Outside the task's
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. |
Pull request was converted to draft
|
/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 (
Tests to run: the three plan lines, |
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.
|
Round 3 of 10 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
On a host with native resolution and published addresses, 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 |
…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.
…ive-dns-as-the-live-surface-while-the
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.
|
Round 4 of 10 on the runtime's review findings, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
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 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. |
…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.
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.
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.
|
Round 5 of 10 on the runtime's review findings, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
On a host with native resolution and published addresses, 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 — |
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
left a comment
There was a problem hiding this comment.
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.
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 lsandmin session activatenow 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.rsholds 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, andcrates/minimald/src/server.rsis the only point where the answerer's bind can be reported.Observability. The daemon logs
answerer_bound=truewhen its answerer binds, not at process boot, becausestart_host_proxiesspawns both drivers detached; it makes no claim about the surface, which only the host can decide. The host-side verdict and its facts are aninfo!line at session start, visible underRUST_LOG=info(minfilters atwarnotherwise).min ls --jsonand--rawskip detection, since they never print the verdict. In human modemin lsreads 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 activateandmin lsboth print the surface fromnative_surface_at, never from the daemon's verdict alone and never gated on the advisory being absent.Session start.
min session activatereads this host's resolver state only when the daemon reports an answerer port. A create without one prints neither line and skips theresolvectlqueries. 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'sinterim_loopbackflag 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 repliesfeat(minimal): have activate and ls say which name surface is liveTests
cargo nextest run -p minimald proxy_keeps_serving_after_supersessioncargo nextest run -p minimald name_surface_reported_when_both_deployedcargo nextest run -p minimal activate_and_ls_report_native_surfaceVerify
The three plan lines exit 0 at round 3 (
ee9640e1, see the round status comment), andmin task run agent-verifypassed there. Since fdb3c25,cargo nextest run -p minimal activate_and_ls_report_native_surfaceselects two tests: the in-process words, andactivate_and_ls_report_native_surface_verdict_on_host, which takes the real host range probe to aNativeverdict 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