Compare commits

...
14 Commits
Author SHA1 Message Date
jochen 09c9a3e3c0 Design 08 sign-in-page: the bundle fills the node into kept events (L-3)
A process resource is given no node, so the watcher keeps its events without one
and the bundle, which knows its node, completes subject, body and id at publish.
2026-11-25 14:30:13 +01:00
jochen f15bc2fdb5 Design 08 sign-in-page: the watcher fails loudly when its first subscribe fails (C2-1) 2026-11-25 01:11:49 +01:00
jochen 6752a5cf3f Design 08 sign-in-page: the watcher's health is its unit's state (C-2c)
An exec check runs only through the container runtime, so the watcher, a process,
is judged by its unit on the machine, and exits when it cannot subscribe again so
the unit shows it.
2026-11-24 21:52:13 +01:00
jochen 89910e4ede Design 08 sign-in-page: the watcher's health is an exec check on the machine (C-2b)
A unit check on NetworkManager's service would assert a state the mesh never sets,
and a tool check needs the bus the watcher must do without; an exec check that
asks the watcher's socket works behind a sign-in page.
2026-11-24 21:51:22 +01:00
jochen df22a1382c Design 08 sign-in-page: the first code review's answers in the design lines
The review found a grant the runtime would still refuse, a tool check standing
alone, names judged in place from a record rather than from resolved, and an
opener killed at its bound; the lines now say what the code must do for each.
2026-11-24 21:48:33 +01:00
jochen 34950da403 Design 08 sign-in-page: the private interface fact renders mesh0 (L-2)
The assignment's tunnel name contradicts what runs, so the fact takes the name the
machine and its other readers use; one shared value is the later, thorough fix.
2026-11-24 21:35:37 +01:00
jochen 3a3a18a9ab Design 08 sign-in-page: the watcher's folder treats unknown paths as the module's
Neither move-out nor program fits a folder only the module's own parts write, so
its watcher leaves an unknown path in place and says it once (L-1).
2026-11-24 21:30:57 +01:00
jochen cb7ea98f34 Design 08 sign-in-page: a session start is heard by file events
The user manager sends no change signal for its environment (the property is
annotated EmitsChangedSignal false), so DQ-9's trigger could never fire; the
kernel's file events on the display sockets are the event that does.
2026-11-24 21:13:43 +01:00
jochen 6df409e4e9 Design 08 sign-in-page: the prepare's answers in the design lines
The prepare found the grant a bundle needs for a machine's event missing, a link
with only uplink names read as routed, the running event silent for a restart and
the folders kept when a module leaves; the lead's answers settle each, and the
lines now say what the code will do so the developers decide nothing.
2026-11-24 21:02:26 +01:00
jochen b0e9263f08 Design 08 sign-in-page: the last review round's fixes
Message ids now come from a kept sequence so a restarted watcher never reuses one
the bus would drop; going back is one delivery group, correcting R2-8, because the
manifest check refuses a seat and its holders apart; routes is invoked where it is
read, and a tool asks the publish of the kept events now.
2026-11-24 20:41:01 +01:00
jochen ffb64bc77a Design 08 sign-in-page round 3: the watcher starts at boot without the bus
The tool runner starts no bundle before it reaches the bus, so behind a sign-in
page after a cold boot nothing would open the page; the watcher becomes a process
resource of networkmanager and shares the module's own folder with its bundle,
which publishes the kept events and calls uplink-names once the bus answers.
The round's other answers are written into the lines and kept beside the part,
and design 08's section 6 moves whole into a part so the main file keeps room.
2026-11-24 20:38:58 +01:00
jochen d2f8565565 Design 08 sign-in-page round 2: the uplink's holder reacts on its machine (ADR 0689)
Behind a sign-in page the bus is out of reach, so the page, the notification and
the session's start move to networkmanager on the machine and i3 keeps only the
verb open; the lead's answers to the first review are written into the lines and
kept beside the part for the builder to cite. The section cut from the main file
is restored, and the hub's adoption moves whole into a part of its own for room.
2026-11-24 20:33:28 +01:00
jochen 11688f3a3a Design 50 resolver-fallback and the lead's answers for sign-in-page (ADR 0688)
The guard's fallback while the mesh's resolvers are silent was built and delivered
before any record or design said it; ADR 0688 now decides it, so design 50 carries
it as a milestone part and its round is the one uplink-names is applied in.
The lead's answers settle when networkmanager calls uplink-names again (on its
node's running event, never a timer), why only three seats are defined whole, and
the second uplink left open under issue 960.
2026-11-24 18:04:27 +01:00
jochen 049a6d9a32 Design 08 sign-in-page: a network's sign-in page opens by itself (ADR 0687)
The uplink, the resolver and the display session each gain what ADR 0687 decides,
written as one milestone part a builder reads whole, so issues 960 and 935 close
without a choice left to the builder. Design 08's main file is brought under its
80 KB bound by folding the history of retired resolver and container-name shapes
into the records that hold it; the glossary gains 'sign-in page'.
2026-11-24 18:02:13 +01:00
10 changed files with 907 additions and 261 deletions
+10 -1
View File
@@ -1137,7 +1137,7 @@ becomes a message). **Decided by** ADR 0227, 0231, 0240, 0252, 0283, 0564, 0668.
**Purpose.** To make every node and module reachable by name where it should be, and unreachable where
it should not. **Recorded by** the controller. **Upstream of** Provisioning and Health and repair.
**Decided by** ADR 0007, 0117, 0138, 0223, 0226, 0247, 0634.
**Decided by** ADR 0007, 0117, 0138, 0223, 0226, 0247, 0634, 0687, 0688, 0689.
**Uses:** node, machine, assignment and endpoint.
- **private network** — the mesh's own encrypted network between its nodes, on which every node has an
@@ -1155,6 +1155,11 @@ it should not. **Recorded by** the controller. **Upstream of** Provisioning and
lists only the mesh's resolvers (ADR 0223), or, where it holds one, its own resolver, which asks them. **uplink** — a
node's connection to the outside network, the node seat `node-uplink` (ADR 0117). **hostname** — a node's own name,
the node seat `node-hostname`. All three seats are of this domain.
- **sign-in page** — the page a network shows before it lets traffic out, until a person signs in (ADR 0687). The
holder of the node seat `node-uplink` opens it in the person's browser on its own machine and records it with the
seat's events `sign-in-asked` and `sign-in-ended` (ADR 0689). In this sense "portal" and "login page" are not used
either (see [Homonyms](#homonyms)).
*Not:* ~~captive portal~~
- **split DNS** — resolving names by domain on one machine: a VPN's domains through the VPN's servers
over its link, every other name through the mesh's resolvers. The provision `split-dns`, provided by
the holder of the node seat `node-resolver`, the machine's **own resolver**, which exists only where
@@ -1525,6 +1530,10 @@ renaming one sense, the old sense moves to a *Not:* line and becomes mechanical.
| push | the controller giving nodes their declarations, until release 6 | **send** (verb `push`) | Core |
| | a git push | **git push** | The record |
| | a phone notification | **push notification** | Operator and conversation |
| portal | the page a network shows before it lets traffic out | **sign-in page** | Connectivity |
| | a web page that gathers one service for a person, such as the bookkeeping portal (design 62) | the page's own name | Module |
| login page | the page a network shows before it lets traffic out | **sign-in page** | Connectivity |
| | an application's own form for a person's credentials | **login page** of that application | Identity and access |
| release | a person letting a held delivery go on | **release** | Delivery |
| | one milestone built, checked and delivered as one (playbook 07; releases 1 to 6 of ADR 0429) | **release** of a milestone | The record |
| | taking a consumer off a licence | **unbind** (verb `release`, to rename) | Identity and access |
+3 -1
View File
@@ -1,6 +1,6 @@
---
status: canonical
updated: 2026-09-24
updated: 2026-11-24
---
# The Novox repositories
@@ -37,6 +37,8 @@ one-for-one — `mesh-catalog`, `mesh-sdk` and `mesh-tools` exist where the tabl
| `mesh-sdk` | — | the stable spine modules build against — the tool-serving SDK harness, the messaging/event framework, the contracts and core primitives. Holds nothing per-module and nothing volatile (ADR 0039). |
| `mesh-lab` | — | **exists.** The lab — scenario lifecycle, networking, placement. Ships to nobody; runs on a workstation. |
| `mesh-delivery` | — | the delivery domain: the parts that build, check and deliver a change by watching and writing keys on the bus, nine modules each whole in it, prefixed `mesh-delivery-` (ADR 0429). Made by the forge module from its config (ADR 0428). |
| `mesh-contracts` | — | **exists.** The contracts module `mesh-contracts`: the definitions of the Core domain's seats and of every domain with no contracts module of its own, `node-display-session` among them (ADR 0636 §5) |
| `mesh-networking` | — | **exists.** The Connectivity domain's modules: its contracts module `mesh-connectivity-contracts` (the definitions of `the-private-network`, `node-uplink` and `node-resolver`) and `mesh-wireguard` (ADR 0636 §6) |
Tier 4's shape is open, and deliberately so: see ADR 0019 and
research 005.
+89 -254
View File
@@ -22,8 +22,12 @@ code:
- mesh-host internal/apply (the service that reflects a rule set; a whole file handed to its new owner)
- mesh-controller cmd/mesh-controller/nodes.go (a token issued for a machine's tunnel key, ADR 0169)
- mesh-host cmd/mesh-host/join_tunnel.go (a machine joins through the tunnel, ADR 0169)
updated: 2026-10-14
- mesh-networking mesh-connectivity-contracts (the seats node-uplink and node-resolver, ADR 0687)
- mesh-catalog modules/networkmanager, modules/systemd-resolved, modules/i3 (a network's sign-in page, ADR 0687)
updated: 2026-11-24
decisions:
- "ADR 0689"
- "ADR 0687"
- "ADR 0241"
- "ADR 0117"
- "ADR 0340"
@@ -341,55 +345,16 @@ nothing needs a name before the link, and a fallback nothing needs is a path not
### Names, and what a container can see
*2026-08-31, from a container that could not resolve a name every machine could.*
Internal names are `<node>.internal` — the suffix is the one IANA reserved in 2024, so a name that
leaks into a public resolver fails rather than reaching a stranger's machine. They are computed
centrally, because a name set needs every node at once, and written to each machine's hosts file.
**A file rather than a resolver**, and the reasoning holds: it works on every Linux, needs no
package, and has no failure mode of its own. The stated trigger for a daemon was *names that are
not one-per-node* — service names, wildcards.
**But a container does not inherit the machine's names.** It gets its own hosts file holding only
its own hostname. So every name the mesh wrote was invisible to the majority of things that need
one — and *on the machine it always worked*, which is exactly what made it easy to miss. It was
found by a database client on one node failing to resolve another node, on a mesh where both names
were correct and present on both machines.
**So the mesh gives its names to the containers it declares**, written into each container's own
hosts file by the runtime. That extends the file decision rather than overturning it. Given by the
mesh and not chosen by a module: a module that listed the machines would go stale the day one
joins, and a module that did not would be one whose containers cannot reach anything by name.
**Superseded for containers by ADR 0148
(2026-09-30).** Everything above still describes the machine's own roster file, which is how it works
and how it will keep working. It no longer describes containers.
Copying the roster into each container made the roster part of each container's identity, so one name
moving replaced every container in the mesh — a module assigned on one machine restarted the store, the
registry, the edge and mail on another
([issue 151](../../04-ISSUES/151-a-new-name-recreates-every-container-in-the-mesh/00-report.md)). And it
did not stop the staleness it was meant to: a copy taken at creation is stale the moment the roster
moves, twice found as a container holding an address that had not existed for days
([issues 109](../../04-ISSUES/109-a-container-keeps-the-address-it-was-made-with/00-report.md)
and [135](../../04-ISSUES/135-a-containers-mesh-names-are-not-compared/00-report.md)).
**A container resolves the mesh's names through its machine's resolver, at the moment it asks, and
nothing is copied.** The resolver is a machine-level process rather than a container, so nothing
circular is being asked for. It was gated on a container being able to reach the resolver from any of
the runtime's networks
([issue 110](../../04-ISSUES/110-a-container-on-the-runtimes-own-network-cannot-reach-the-resolver/00-report.md)),
and landed the day that did, 2026-09-30: the controller writes no mesh name into a container and the node-engine's digest carries only what the module declared for itself.
The paragraph below states the old boundary, and 0148 deliberately gives it up: a container somebody
started by hand resolves the same names as everything else, because the resolver answers the machine,
not a list of containers.
**The boundary, which is deliberate and worth stating:** *declared* containers. A container
somebody starts by hand is not the mesh's to configure, and reaching into every container on a
machine — declared or not — is what a nameserver in `resolv.conf` would be for.
Internal names are `<node>.internal`: the suffix IANA reserved in 2024, so a name that leaks into a public resolver
fails rather than reaching a stranger's machine. They are computed centrally, because a name set needs every node at
once.
**A container resolves the mesh's names through its machine's resolver, at the moment it asks, and nothing is
copied** (ADR 0148). The controller writes no mesh name into a container and the node-engine's digest carries only
what the module declared for itself, so a container somebody started by hand resolves the same names as everything
else: the resolver answers the machine, not a list of containers. Copying the roster into each container, as the
mesh did until 2026-09-30, made one moved name replace every container in the mesh and still went stale (issues 151,
109 and 135); it ended the day a container could reach the resolver from any of the runtime's networks (issue 110).
### The mesh's resolvers
*2026-10-03, revised 2026-10-05.* **The mesh's names live in one module, held on two machines: the
@@ -472,83 +437,13 @@ the `node-hostname` seat's holder and changed through its tools; the controller
*Checked by the holder's configuration carrying one forwarding rule per declared zone, and by a push
leaving the `hosts` file's operator region byte for byte.*
*What follows describes the per-node resolver this replaces — how it was built and why the roles were
split. The split stands; the serving role's scope is what moved.*
### The resolver, built
*2026-08-31.* **A service is reached at `<service>.<node>.internal`** — the first label is the
service, the rest is the node — so what resolves is *anything under a node's name*, going to that
node. What routes it once it arrives is a proxy's, and stays separate.
*2026-09-30.* **So the node in a route's internal name is the one whose proxy answers it**
(ADR 0151).
Composed from the node the module ran on, the name sent a client to a machine with nothing listening
whenever the proxy ran elsewhere
([issue 139](../../04-ISSUES/139-an-internal-route-name-resolves-to-the-consumers-node/00-report.md));
composed from the serving node, the rule above holds without exception. The public name stays the
module's node's, which is where the operator put it.
**The mesh writes the data and runs no daemon.** One wildcard per machine, from the same set that
writes the `hosts` file. A resolver is third-party software and runs *on* the mesh rather than being
*of* it: the mesh has no business shipping one, choosing which one, or knowing its configuration
language. Swapping dnsmasq for unbound changes that module and nothing in the controller.
**Two roles, two claims, because they are different things.** systemd-resolved cannot answer a
wildcard at all — it routes the mesh's suffix to something that can. Treating serving and asking
as one role produces a module that cannot work.
| | claims | |
|---|---|---|
| serving | `the-dns-port` | answers the wildcards |
| asking | `the-resolver-configuration` | decides what the machine asks |
So *which* resolver is not a mesh-wide decision. One machine can use what systemd already owns and
another can run dnsmasq, and two of either on one machine is refused rather than fought over.
**Two things a resolver must not do**, both found by a machine rather than by reasoning:
- **Take an address something else holds.** systemd-resolved holds `127.0.0.53` *and* `127.0.0.54`.
- **Read `resolv.conf` for its upstreams.** Whatever points a machine at the mesh writes the
resolver's own address there, so it becomes its own upstream and every query it cannot answer
loops until its receive queue fills. It needs no upstream: only the mesh's suffix is routed to
it.
*Checked on two machines, through the path an application takes — nsswitch, files, then DNS —
because the module deciding what the machine asks is half of what is being tested and only that
path goes through it.*
**That is now the second reason to want a resolver**, and it is a different one from the trigger
above:
| | |
|---|---|
| names that are not one-per-node | a service named under a machine — `postgres.novox.internal` |
| containers the mesh did not declare | anything a person or another tool starts on a node |
### Which resolver is not a question the mesh answers
*Written 2026-08-31, after treating it as open when it had been decided two days earlier.*
**A resolver takes over `/etc/resolv.conf`, which is a singular resource, so it is a claim** —
ADR 0009 lists it in the table beside the seat
and pid 1. Choosing between resolved, dnsmasq and unbound is **assigning a module**, per machine,
and two of them cannot both be assigned there:
> `resolved-config and dnsmasq both claim "/etc/resolv.conf", and only one thing may hold it per node`
So there is nothing global to settle and nothing for the mesh to guess. One machine can use what
systemd already owns and another can run dnsmasq, and neither has to know about the other.
**What the mesh contributes is the part only it can know**: which machines exist and where. That
is `mesh-resolver`, which writes one file and holds no claim, because writing a file takes nothing
over. A daemon module requires that data and claims the resolver — so swapping the daemon changes
that module and nothing else.
**This was recorded on 2026-08-29 and reopened as an unanswered question on the 31st.** Which is
the argument for the table in ADR 0009 being a table: the pattern is only obvious once seen, and
the cost of not seeing it is inventing a mechanism that already exists.
**Two things a resolver must not do**, both found by a machine rather than by reasoning: take an address something
else holds (systemd-resolved holds `127.0.0.53` and `127.0.0.54`), and read `/etc/resolv.conf` for its upstreams,
since whatever points a machine at the mesh writes the resolver's own address there and every question it cannot
answer then loops until its receive queue fills. *Which* resolver program a machine runs is not a mesh-wide
question: a resolver takes over a singular resource, so it is a claim, and choosing one is assigning its module
(ADR 0009). The per-node resolver and its two seats, `the-dns-port` and `the-resolver-configuration`, that this
section once described are retired (ADR 0194, ADR 0220, ADR 0223).
### The mesh resolves only its own names; a public name resolves publicly
**The mesh's resolver holds each node's internal domain and nothing else** — `<node>.internal` and
@@ -563,36 +458,13 @@ mesh, a routed service is reached, and certified by the internal authority, unde
and on a machine by asking its resolver for a public name the mesh serves: the answer is the public
address.*
*What follows is how the mesh got here, kept because the reasoning it rejects is the expensive half to
rediscover.*
*2026-09-09, found by an internal certificate authority that could not issue.* The mesh writes every
`<node>.internal` name into every declared container and treats the public names a proxy serves as a
separate matter — *what routes it once it arrives is a proxy's, and stays separate*, above. That
holds for a client dialling by internal name. It does not hold for anything **inside** the mesh that
must reach a public name, and the first such thing to appear was the internal issuer of §5.
**An issuer validates by connecting to the name it is certifying.** Asked for a certificate for a
routed public name, the internal authority accepted the order, offered a challenge, and then could
not connect: nothing in the mesh resolved that name, so the challenge had no target. A name the mesh
can reach from the outside but cannot resolve from the inside is a name it cannot certify with an
authority of its own.
**So a granted route is published into internal resolution as well** — the routed name to the node
that serves it, mesh-wide, by the same mechanism that writes the node names — and as itself: a routed
name has no mesh form, and the suffixed alias the roster once added beside it resolved to a refusal
([issue 157](../../04-ISSUES/157-a-routed-names-internal-alias-is-served-by-nothing/00-report.md)). It is *given by the
mesh, not chosen by a module*, for the same reason the node names are: a module listing the routes
would go stale the day one changes. The mesh propagates the names it was told to serve and still
knows nothing about what they mean
(ADR 0066).
*2026-10-03, withdrawn.* Publishing public names with private answers turned every resolver that also
serves a LAN into an outage for that LAN's non-members — a phone was handed the control-node's tunnel
address for the mail server — while every check, run from a member, passed. Its reason had gone: routes
have internal names since ADR 0151, and the proxy certifies public names from a public authority and
internal names from the internal one. Superseded by the rule at the head of this section
(ADR 0191).
*How it got here, kept because the reasoning it rejects is the expensive half to rediscover.* On 2026-09-09 an
internal issuer could not certify a routed public name, because nothing inside the mesh resolved it and an issuer
validates by connecting to the name; so every granted route was published into internal resolution with a private
answer. On 2026-10-03 that was withdrawn (ADR 0191): every resolver that also serves a LAN became an outage for the
LAN's other machines (a phone was handed the control-node's tunnel address for the mail server) while every check,
run from a member, passed; and its reason had gone, since routes have internal names (ADR 0151) and the proxy
certifies public names from a public authority and internal names from the internal one.
## 3 — Exposure
@@ -1044,82 +916,57 @@ resolved inside the mesh (ADR 0066).
## 6 — One statement behind exposure, filtering and certificates
*2026-09-28, preparing the control-node's convergence —
[issue 140](../../04-ISSUES/140-an-endpoints-reach-is-not-declared/00-report.md), settled by
ADR 0138.*
*2026-09-28, ADR 0138; extended by ADR 0340 and ADR 0167.* An endpoint a module declares, bound by its assignment to a
machine port with one reach (`internal`, `public`, `both` or `local-network`), is what the filter, the proxy and the
certificates all read. Its lines, moved whole, are in the part
[08-milestones/one-statement-of-reach.md](08-milestones/one-statement-of-reach.md).
The three sections above each decide, independently, how far a service reaches. §3 composes a name
from a label and the node's domain. §4 opens a port to the source a listen named. §5 certifies the
names that exist, from whichever authority the proxy holds. Each is coherent on its own, and together
they mean **reachability is never stated anywhere** — it is the sum of three derivations, and a sum is
not something anyone can review or refuse.
## 7 — A network's sign-in page
What that costs, measured: an identity provider holding a public certificate valid 90 days and an
internal one valid 24 hours, neither asked for by any assignment, because both names existed and a
proxy certifies what it serves. And an endpoint that is not routed — git over ssh — which can be
spoken about only in the filter's vocabulary, so *this must be reachable from outside* is a setting
exactly one mechanism reads.
*2026-11-24, ADR 0687 and ADR 0689.* A network that lets traffic out only after a person signs in answers every
plain http request with its **sign-in page**. The network manager finds such a network itself; on the desktop the mesh
composes nothing showed the page, so the network looked broken. Now it opens by itself, the same for every network
(none is named anywhere, ADR 0687 §6); signing in stays the person's. Behind the page the private network's tunnel,
and with it the bus, is out of reach, so the machine reacts on its own (ADR 0689).
**An endpoint is the thing that was missing.** A module declares named endpoints: one port it serves,
what it is for, and what it would serve that to absent any instruction. A route contribution names an
endpoint rather than repeating a port number. An assignment — which is where a module's configuration
lives (ADR 0046)
— then binds each endpoint to a machine port and says how far it reaches.
```mermaid
flowchart LR
nm[the network manager's rating] -->|changes| up[node-uplink's holder]
up -->|xdg-open, on the machine| browser[the person's browser]
up -->|the desktop notification service, on the machine| note[a notification]
up -->|sign-in-asked, sign-in-ended, kept until the bus answers| fam[(node-uplink.events, 7 days)]
up -->|uplink-names: its check's host| res[node-resolver]
res -->|the guard, every round| link[the link carrying the default route]
```
One value, three readers:
- **The uplink's holder reacts on its machine** (ADR 0689 §1, §4): when the network manager rates the network as one
with a sign-in page, at its own start while it is so rated, and when the person's graphical session starts while
it is, the holder of the node seat `node-uplink` opens the page in the person's browser and shows a notification
saying why, through the standards the session offers; it says again when the network is open. A machine with no
graphical session opens nothing.
- **The uplink says it** (ADR 0687 §1, ADR 0689 §2): `node-uplink` gains the events `sign-in-asked` and
`sign-in-ended`, in the family `node-uplink.events`, the mesh's record of it, published with acknowledgement and
kept in order until the bus answers again; nothing in the mesh consumes them. Both are optional for a holder.
- **The check resolves through the network it tests** (ADR 0687 §2): the node seat `node-resolver` gains the verb
`uplink-names`; its guard answers those names over whichever link carries the default route, so on a machine with
its own resolver a working network is rated fully connected again and a network with a sign-in page is rated as one
(issue 960). ADR 0688's fallback lets the page's name resolve meanwhile (design 50).
- **The display session opens an address on request** (ADR 0687 §4, ADR 0689 §3): the node seat
`node-display-session` gains the verb `open`, an http or https address in the person's default browser, for any
caller over the bus (issue 935, design 42); the sign-in reaction does not call it.
| reach | the filter opens | the proxy serves | the certificate comes from |
|---|---|---|---|
| `internal` | the machine port, to the private network | the internal name | the mesh's own authority |
| `public` | the machine port, to anywhere | the public name | the public authority |
| `both` | the machine port, to anywhere | both names | each name's own authority |
| `local-network` | the machine port, to the private network and the machine's local networks | the internal name | the mesh's own authority |
**Acceptance tests** (ADR 0687 and ADR 0689, *How it is checked*):
*2026-10-13.* **A port may be reached from the machine's own local network, and only its private
part** (ADR 0340). A home server serves devices on its own network that will never be nodes, and until
now the only value that reached them was `anywhere`, which says the internet. A new source,
`local-network`, and the reach of the same name mean the networks the machine is attached to through
its uplink, as the node-engine reports them among its facts. Only networks wholly in a private range
count (RFC 1918, and unique local addresses for IPv6); a public subnet the machine sits on is never
counted, so the source cannot open a port to the internet. The filter renders it on that port's rule
alone, as the subnets it resolved to. A machine that reports no private network has a `local-network`
port admitted from no local network, and the rule set and the plan say so. The plan shows what each
such port resolved to, and `node` shows which attached networks counted and why the others did not.
A laptop that travels admits whichever local network it is on, which the plan makes visible.
*2026-10-02.* **The proxy serves an internal name to the private network only**
(ADR 0138,
its insight of this date). It answers public and internal names on the same listeners, so the name a
request carries is the request's own claim, not where the request came from. An internal name is
served to the machines of the mesh and to the machine itself; to anyone else it is answered as a name
never routed, in the handshake as well as the request. Without this, an endpoint with reach `internal`
would be public under a name that is easy to guess
([issue 191](../../04-ISSUES/191-a-route-with-only-an-internal-name-is-dropped/00-report.md)).
The proxy is told who the mesh is, and its routes, in its membership on the bus — the same machine
addresses the filter's "from the mesh" is rendered from
(ADR 0167).
**An endpoint that is not routed is reached and never named.** No route contribution means no name is
composed and no certificate requested, while the filter still acts on it. That is the case the model
could not express at all, and it is the ordinary case for anything that is not HTTP.
**Nothing moves until an assignment says so.** An endpoint whose assignment is silent keeps the
default its manifest states, so every machine already converged renders exactly as it does today —
the same property §4 needed when a machine gained a way to say which networks it routes.
This is what the certificate questions were waiting for. Which authority signs a name, whether a name
may appear in a public issuance log, and what must be trusted where are all answerable once an
endpoint says whether it is internal — and unanswerable while the proxy decides by composing every
name it can. It is also the fact
[issue 139](../../04-ISSUES/139-an-internal-route-name-resolves-to-the-consumers-node/00-report.md)
needs: an internal name should be composed from the machine serving the endpoint, which is the
assignment that bound it.
**How it is checked** is stated with the decision: one module with two endpoints of differing reach
asserted per chain body; the names and the certificate requests following the reach and failing
against today's behaviour, where both are always composed; an unrouted endpoint filtered and never
named; an assignment naming an endpoint the module does not declare refused where it is said; and a
silent assignment rendering byte-identically to today.
1. *Live, on the laptop, on a working network:* the network manager rates it fully connected and the wifi link's
default route carries no 20000 penalty (`<node>/node-resolver.routes` shows the check's host on that link).
2. *Live, on the laptop, with the tunnel down, at the next join of a network with a sign-in page:* the uplink
holder's journal shows the rating PORTAL, the page opens within seconds with a notification saying why while no
mesh runtime answers, and after signing in a second notification says the network is open; once the bus answers,
both events are in `node-uplink.events` with the times of the changes. If the journal shows LIMITED instead, ADR
0687's assumption does not hold: the record is amended, tracked by issue 960.
3. *Live, on the laptop:* `<node>/node-display-session.open` with an http address opens it and answers its program;
with a `file:` path it is refused.
4. *Unit and integration:* the milestone part's tests pass within each module's budget.
## The five through the network layers
@@ -1243,17 +1090,22 @@ The list is worth having in one place, because it is most of the argument:
- **The RFC1918 inference**, and the lab substitution that existed to satisfy it.
- **`scope:`**, and the class of manifest key that means nothing.
## Milestones
| milestone | what it builds | part | state |
|---|---|---|---|
| one-statement-of-reach | one endpoint's reach read by the filter, the proxy and the certificates (ADR 0138, ADR 0340, ADR 0167) | [08-milestones/one-statement-of-reach.md](08-milestones/one-statement-of-reach.md) | written before milestone parts, moved whole on 2026-11-24 |
| hub-adopts-the-predecessors-tunnel | the hub takes over the tunnel it finds on an adopted node (ADR 0105, ADR 0119) | [08-milestones/hub-adopts-the-predecessors-tunnel.md](08-milestones/hub-adopts-the-predecessors-tunnel.md) | written before milestone parts, moved whole on 2026-11-24 |
| sign-in-page | a network's sign-in page opens by itself (ADR 0687, ADR 0689), closing issues 960 and 935 | [08-milestones/sign-in-page.md](08-milestones/sign-in-page.md) | designed |
The sections above were built before designs were cut into milestone parts; their remaining lines move into a part
of their own at their next amendment (playbook 02, *The shape of a design*).
## Open
- **One resolver (ADR 0194).** *Correction of fact,
2026-10-05:* no node holds `node-dns-resolver` any more, and
ADR 0220 deletes the seat. What stood here before: *"Not built: every node still runs
`node-dns-resolver`. The migration's four steps are in the record, in order."* Nor did it
stay true that *"the workstation moves to the one resolver only once"* zones and the `hosts` file's
holder (ADR 0199)
exist: every node, the workstation included, asks the one resolver, and every node holds
`node-hosts-file`.
- **A second uplink stays rated limited** (ADR 0687 §2). The check's host name is given to the one link that carries
the default route; a second uplink beside it (a cable beside the wifi) is still rated limited by the network
manager and keeps its route penalty. Tracked as a note on issue 960.
- ~~**What happens when the hub is down.**~~ **Resolved** by
ADR 0006, together with `06`'s
matching question — they were one question. Nothing takes over. WireGuard has no failover, the
@@ -1278,25 +1130,8 @@ The list is worth having in one place, because it is most of the argument:
## The hub adopts the predecessor's tunnel
*2026-09-23, ADR 0105.*
On an adopted node that is the hub, the private network is not raised beside the tunnel it finds;
it **takes it over**: the found interface's private key, its port, its address and range, and every
peer it had, carried as peers not yet enrolled. The found interface is stopped, its configuration
kept on disk. A predecessor machine sees the same server key at the same endpoint and cannot tell
the tunnel changed hands; when it enrols, it keeps the address the tunnel already held for its key.
The mesh's own addresses are the adopted range's — every binding, hosts entry and endpoint the
controller composes follows it, as readers of a setting. ADR 0100's non-overlap rule applies only
where a found tunnel is left running beside the mesh's; where it is adopted there is one tunnel.
The guard admits the mesh's ports from that one interface, and the predecessor's peers arrive on
it.
*2026-09-27, ADR 0119.* The
found configuration is kept only until the take is proven — the found unit down, the mesh's
interface up and handshaking with a peer. Then it is removed from where the found unit reads it
(its original stays kept), the hold ends, and the predecessor's tunnel cannot be raised again by
anything but a person restoring it by hand. Undeclaring the private network does not bring it back.
*2026-09-23, ADR 0105 and ADR 0119.* Its lines, moved whole, are in the part
[08-milestones/hub-adopts-the-predecessors-tunnel.md](08-milestones/hub-adopts-the-predecessors-tunnel.md).
## The bus is NATS
@@ -0,0 +1,36 @@
---
layer: to-be
design: 08
milestone: hub-adopts-the-predecessors-tunnel
updated: 2026-11-24
code: [mesh-controller, mesh-host]
decisions:
- "ADR 0105"
- "ADR 0119"
- "ADR 0100"
---
# Design 08, milestone hub-adopts-the-predecessors-tunnel — the hub takes over the tunnel it finds
**What this part is.** The section of design 08 that ADR 0105 (2026-09-23) and ADR 0119 (2026-09-27) gave, written
before designs were cut into milestone parts and moved here whole on 2026-11-24, so the main file keeps room within
its bound (playbook 02, *The shape of a design*). Its words are unchanged; each paragraph is one numbered line, its
bold lead taken from its own first words. Cited as "design 08 hub-adopts-the-predecessors-tunnel §n".
## Lines
1. **The hub takes over the tunnel it finds** (ADR 0105). On an adopted node that is the hub, the private network is not raised beside the tunnel it finds;
it **takes it over**: the found interface's private key, its port, its address and range, and every
peer it had, carried as peers not yet enrolled. The found interface is stopped, its configuration
kept on disk. A predecessor machine sees the same server key at the same endpoint and cannot tell
the tunnel changed hands; when it enrols, it keeps the address the tunnel already held for its key.
2. **The mesh's own addresses are the adopted range's** (ADR 0105, ADR 0100). The mesh's own addresses are the adopted range's — every binding, hosts entry and endpoint the
controller composes follows it, as readers of a setting. ADR 0100's non-overlap rule applies only
where a found tunnel is left running beside the mesh's; where it is adopted there is one tunnel.
The guard admits the mesh's ports from that one interface, and the predecessor's peers arrive on
it.
3. **The found configuration is kept only until the take is proven** (ADR 0119). *2026-09-27, ADR 0119.* The
found configuration is kept only until the take is proven — the found unit down, the mesh's
interface up and handshaking with a peer. Then it is removed from where the found unit reads it
(its original stays kept), the hold ends, and the predecessor's tunnel cannot be raised again by
anything but a person restoring it by hand. Undeclaring the private network does not bring it back.
@@ -0,0 +1,87 @@
---
layer: to-be
design: 08
milestone: one-statement-of-reach
updated: 2026-11-24
code: [mesh-controller, mesh-host, mesh-catalog modules/route-proxy]
decisions:
- "ADR 0138"
- "ADR 0340"
- "ADR 0167"
- "ADR 0046"
---
# Design 08, milestone one-statement-of-reach — one statement behind exposure, filtering and certificates
**What this part is.** Design 08's §6, which ADR 0138 settled (issue 140) and ADR 0340 and ADR 0167 extended, written
before designs were cut into milestone parts and moved here whole on 2026-11-24, so the main file keeps room within
its bound (playbook 02, *The shape of a design*). Its words are unchanged; each paragraph is one numbered line, a bold
lead added where it had none. Cited as "design 08 one-statement-of-reach §n". *2026-09-28, preparing the control-node's convergence —
[issue 140](../../../04-ISSUES/140-an-endpoints-reach-is-not-declared/00-report.md), settled by
ADR 0138.*
## Lines
1. **Reachability was stated nowhere.** The three sections above each decide, independently, how far a service reaches. §3 composes a name
from a label and the node's domain. §4 opens a port to the source a listen named. §5 certifies the
names that exist, from whichever authority the proxy holds. Each is coherent on its own, and together
they mean **reachability is never stated anywhere** — it is the sum of three derivations, and a sum is
not something anyone can review or refuse.
2. **What that cost.** What that costs, measured: an identity provider holding a public certificate valid 90 days and an
internal one valid 24 hours, neither asked for by any assignment, because both names existed and a
proxy certifies what it serves. And an endpoint that is not routed — git over ssh — which can be
spoken about only in the filter's vocabulary, so *this must be reachable from outside* is a setting
exactly one mechanism reads.
3. **An endpoint is the thing that was missing.** A module declares named endpoints: one port it serves,
what it is for, and what it would serve that to absent any instruction. A route contribution names an
endpoint rather than repeating a port number. An assignment — which is where a module's configuration
lives (ADR 0046)
— then binds each endpoint to a machine port and says how far it reaches.
4. **One value, three readers.** One value, three readers:
| reach | the filter opens | the proxy serves | the certificate comes from |
|---|---|---|---|
| `internal` | the machine port, to the private network | the internal name | the mesh's own authority |
| `public` | the machine port, to anywhere | the public name | the public authority |
| `both` | the machine port, to anywhere | both names | each name's own authority |
| `local-network` | the machine port, to the private network and the machine's local networks | the internal name | the mesh's own authority |
5. *2026-10-13.* **A port may be reached from the machine's own local network, and only its private
part** (ADR 0340). A home server serves devices on its own network that will never be nodes, and until
now the only value that reached them was `anywhere`, which says the internet. A new source,
`local-network`, and the reach of the same name mean the networks the machine is attached to through
its uplink, as the node-engine reports them among its facts. Only networks wholly in a private range
count (RFC 1918, and unique local addresses for IPv6); a public subnet the machine sits on is never
counted, so the source cannot open a port to the internet. The filter renders it on that port's rule
alone, as the subnets it resolved to. A machine that reports no private network has a `local-network`
port admitted from no local network, and the rule set and the plan say so. The plan shows what each
such port resolved to, and `node` shows which attached networks counted and why the others did not.
A laptop that travels admits whichever local network it is on, which the plan makes visible.
6. *2026-10-02.* **The proxy serves an internal name to the private network only**
(ADR 0138,
its insight of this date). It answers public and internal names on the same listeners, so the name a
request carries is the request's own claim, not where the request came from. An internal name is
served to the machines of the mesh and to the machine itself; to anyone else it is answered as a name
never routed, in the handshake as well as the request. Without this, an endpoint with reach `internal`
would be public under a name that is easy to guess
([issue 191](../../../04-ISSUES/191-a-route-with-only-an-internal-name-is-dropped/00-report.md)).
The proxy is told who the mesh is, and its routes, in its membership on the bus — the same machine
addresses the filter's "from the mesh" is rendered from
(ADR 0167).
7. **An endpoint that is not routed is reached and never named.** No route contribution means no name is
composed and no certificate requested, while the filter still acts on it. That is the case the model
could not express at all, and it is the ordinary case for anything that is not HTTP.
8. **Nothing moves until an assignment says so.** An endpoint whose assignment is silent keeps the
default its manifest states, so every machine already converged renders exactly as it does today —
the same property §4 needed when a machine gained a way to say which networks it routes.
9. **What the certificate questions waited for.** This is what the certificate questions were waiting for. Which authority signs a name, whether a name
may appear in a public issuance log, and what must be trusted where are all answerable once an
endpoint says whether it is internal — and unanswerable while the proxy decides by composing every
name it can. It is also the fact
[issue 139](../../../04-ISSUES/139-an-internal-route-name-resolves-to-the-consumers-node/00-report.md)
needs: an internal name should be composed from the machine serving the endpoint, which is the
assignment that bound it.
10. **How it is checked** is stated with the decision: one module with two endpoints of differing reach
asserted per chain body; the names and the certificate requests following the reach and failing
against today's behaviour, where both are always composed; an unrouted endpoint filtered and never
named; an assignment naming an endpoint the module does not declare refused where it is said; and a
silent assignment rendering byte-identically to today.
@@ -0,0 +1,137 @@
---
layer: to-be
status: in-progress
design: 08
milestone: sign-in-page
updated: 2026-11-24
decisions:
- "ADR 0687"
- "ADR 0689"
---
# 08, milestone sign-in-page — the lead's answers to the first review by architectural domain
The lead's answers to the findings of the four reviews by architectural domain, for the milestone part
[sign-in-page](sign-in-page.md): each names the principle or record that settles it, and is cited by its key
(R-M2, H-N6 and the like) as "design 08 sign-in-page lead answer R-M2". Each is written into the part's lines.
Lead answers to the four reviews by architectural domain of design/0687-sign-in-page at 11688f3a (fix-1981@g14, 2026-11-24). Each names the principle or record that settles it. The bus finding (all four reviewers) is answered by the operator: a new record amends ADR 0687 so the uplink's holder reacts on its own machine without the bus: ADR 0689, accepted 2026-11-24. Findings that only concerned i3's reaction or its start read (running-and-testing N5, health-and-events M4 and N7 for i3, seams M2 and M4, security M4 for i3) end with it.
RUNNING AND TESTING
R-M2 The guard keeps the list it applied and the link it applied it to in its own file beside the names (/var/lib/node-resolver/uplink-names.applied), read at its start; a unit test for a guard restart and for a changed list. Principle: a part reads its own state, nothing is inferred.
R-M3 Name the grant for networkmanager publishing node-uplink's events: if the grants part already derives a seat event publish from the holder's claim (as for node-packet-filter's allowances-changed), say so and cite it; if not, name mesh-delivery modules/mesh-grants, the grant, its test and the ordering edge in Where. Principle: the design leaves the builder no choice.
R-M4 Add one integration test that starts networkmanager's uplink-tools whole (watcher, publication with acknowledgement, kept queue, the call of uplink-names); add live tests of open: an http address answers its program, a file: path is refused. Rule: a change to how a module runs carries a whole-module test.
R-N6 networkmanager calls <node>/node-resolver.uplink-names directly; "no holder" is an answer, not a failure. The prepare reads whether node-engine's running event fires for a restarted module and writes it down.
R-N7 The prepare records each module's test counts against the budget.
R-N8 Move one section that predates the milestone out of 08-connectivity.md into a part, so the main file keeps room.
HEALTH AND EVENTS
H-M1 uplink-tools gains a health check and a read tool: the watcher subscribed or not, the last rating heard and when, the asks opened and ended, the last uplink-names call with its result and time, the publishes waiting; unhealthy while the watcher is not subscribed or the call stands failed. A test for each. Principle: a module says how it is healthy (ADR 0240); tools read everything a module holds.
H-M2 open reads xdg-open's exit status and refuses on failure; the answer names the program only when it started. The sign-in notification says the page "is opening in" the browser only after that status; a test where the opener fails. Principle: evidence over assertion.
H-M3 networkmanager reacts to node-engine's running event only for the module holding node-resolver on its own node, and only when that module's state is running.
H-M5 Answered by the new record's clause 2: publish with the stream's acknowledgement, keep a failed publish in order and publish it when the bus answers, journal every refusal, show the waiting publishes in H-M1's read tool, and test it.
H-N6 routes answers uplink_names from what the resolver holds for the link, not from the file; when the resolver refuses the names, the guard writes the refusal to the journal and to routes.
H-N7 for uplink-tools: after its own restart while the rating is PORTAL it opens the page once more; that is wanted (what needs the person is visible), and is said in the design.
H-N8 uplink-tools writes a journal line when it opens a page, when the open fails, when it shows a notification and when a publish waits or is sent.
SEAMS AND TOOLS
S-M1 consumes stays the event's name: networkmanager hears node-engine.running for every node and drops any whose subject's node is not its own. No new manifest word. Principle: use the forms the mesh has.
S-M3 uplink-tools' tools: the read tool of H-M1; a tool that calls uplink-names again now; a tool that reads NetworkManager's rating again now and acts on it. Unit tests for both. Principle: every act a module does by itself can be started by a tool.
S-N5 routes also answers whether the mesh's resolvers are silent and since when.
S-N6 Name ${machine:account} where the account is meant. The guard's 5 s round stays as built (ADR 0688). The names in the file stay until the resolver's module leaves, and are said so.
S-N7 Fix 08-connectivity.md: the paragraph that ends mid-sentence ("cannot be raised again by") and the dropped section "The bus is NATS" are restored or moved whole, never cut.
SECURITY AND UPGRADE
U-M2 open never builds a command line from the address: it percent-encodes every character outside RFC 3986's unreserved set and the separators a URL needs, and passes the address as one argument; a test with ', ;, , and $( in the address. Principle: a caller's text is never a command.
U-M3 Each seat defined whole carries every field today's definition holds unchanged (paths with steps-back-for, optional on resolvers and links, replaces on node-resolver's verbs, receives on node-display-session); say so per seat.
U-M5 Name the programs the guard runs to write the names file (as root, with sudo -n): the exact commands, added to the module's sudo rules.
U-N6 §2 and §3 say who calls the new verbs: modules whose manifest invokes the verb, and the operator, through the mesh MCP server (the lead wrote "console", a retired word).
U-N7 A rollback line per step: what stays when systemd-resolved, networkmanager or i3 goes back one version (the names on the link until it changes; nothing else).
## Round 2
Lead answers to round 2 of the reviews by architectural domain of design/0687-sign-in-page at d2f85655 (fix-1981@g14, 2026-11-24). Each names what settles it.
R2-1 (running-and-testing must; health-and-events must). FACT read in mesh-tools 393449e, the tool runner's `node-tools serve`: the tool runner starts no bundle before it has connected to the bus (connectPatiently retries forever; runtime.Run follows the connection), so after a cold boot behind a sign-in page uplink-tools never runs. ANSWER: networkmanager's watcher and its reaction (watching NetworkManager's rating, opening the page, the notifications, keeping the events) run as a process resource of networkmanager, a service the machine starts at boot without the bus, as the zfs module's zfs-watch process does; that process declares health of kind tool, with the tool, interval, failing looks and grace named as zfs-watch's are. The bundle uplink-tools keeps the verbs and tools: it reads the watcher's state and publishes the kept events once the runner is connected, through the module's own local state between its two parts (a file under /run or a socket of the module's own, named in the design). The watcher subscribes again when its system bus connection returns, and uplink_rating_again makes it subscribe again. Tests: the two unhealthy cases (watcher not subscribed, uplink-names call failed), the resubscribe, and a whole-module integration test that starts the watcher with no bus, sees the page open, and sees the kept events published once the bus is back. Principles: a part that must work without the bus may not need the bus to start; a module's own parts share its own state; a module says how it is healthy (ADR 0240). ADR 0689 says "uplink-tools" for the reacting part: the record-writer adds a progressive insight naming the watcher process; the decision is unchanged.
R2-2 /run/node-resolver: the guard makes it (root, 0755) and it goes at the next boot; said in §8.
R2-3 The open runs beside the watcher; rating changes heard meanwhile are handled in their order.
R2-4 08-connectivity.md: move one more section that predates the milestone out into a part now, so the main file keeps room (it grew to 79.7 KB).
R2-5 networkmanager also calls uplink-names again when its bus connection comes back (an event), with one row in the tests.
R2-6 Name the reader of the events: nats.nats_stream_messages filtered to mesh.seat.node-uplink.event.*.<node>.
R2-7 The bounds of §15 (60 s), §16 (10 s) and §19 (256 kept) stay stated constants.
~~R2-8 Going back: a seat's definition goes back before its holders (definitions first, then holders), in reverse of the ordering edges.~~ *Corrected by R3-2 (2026-11-24): going back is one delivery group of the three seat definitions and their holders together, since the manifest check refuses either without the other.*
R2-9 open keeps unencoded only RFC 3986's unreserved characters and : / ? # [ ] @ & = + % ; every other character is percent-encoded; §28's test adds , and ".
R2-10 Say what the publish grant covers, as read in mesh-sdk's EmitSeat and the grants part: the holder's own node's subject only, or every node's; if every node's, say so (the events are a record only).
R2-11 A kept event keeps its message id when published again, so the bus drops a duplicate.
R2-12 The watcher's read (uplink_sign_in) also counts refused publishes, shows the last session start and its outcome, and shows the resolver's refusal of the names as routes answers it.
R2-13 The guard writes resolved's refusal to the journal once per change, not every round.
R2-14 i3's open writes one journal line per call, opened or refused, with the program.
## Round 3
Lead answers to round 3 (the last) of the reviews by architectural domain of design/0687-sign-in-page at ffb64bc7 (fix-1981@g14, 2026-11-24).
R3-1 (running-and-testing, health-and-events, seams-and-tools: the sequence). The watcher keeps the next sequence of its message ids in a file `sequence` in the folder of §12, written whole (to a file beside, renamed over), never reset while the folder lives, removed with it; a test in §25: a watcher restarted after its events were published and pending/ emptied makes ids it has not used before, and the bus keeps them. Principle: failure must be loud; work that reports success and did nothing is the worst fault.
R3-2 (security-and-upgrade: going back). R2-8 was wrong: the manifest check refuses a holder without its seat's new verbs and a seat definition without its holders' serves, either order. The milestone goes back as it was delivered: one delivery group of the three seat definitions and their holders together. Correct R2-8 and the part's going-back lines to say this. (The lead's earlier answer, corrected on the reviewer's reading of mesh-sdk `catalogue/seats.go`.)
R3-3 (seams-and-tools: invokes). Add seat:node-resolver.routes to networkmanager's invokes (§13), since uplink_sign_in reads it.
R3-4 (health-and-events notes). The README says the watcher's health is judged only once the tool runner has reached the bus; uplink_sign_in counts the events dropped past the 256 bound.
R3-5 (seams-and-tools note). Add the tool uplink_publish_again, which asks the publish of the kept events now, with a unit test. Principle: every act a module does by itself can be started by a tool.
R3-6 (security-and-upgrade note). The prepare confirms, on each machine that runs networkmanager, that the tool runner runs as the same account as the watcher (the folder is 0700).
## The prepare
Lead answers to the prepare of design 08's milestone sign-in-page (fix-1981@g14, 2026-11-24). Each names what settles it; the prepare's recommendations are taken unless said.
DQ-1 The guard learns the private network's interface name as a rendered fact beside `suffix`. Principle: the mesh owns the truth; nothing is guessed.
DQ-2 The link carrying the default route is the lowest-metric default route's link that is neither routed (a VPN's) nor the private network's; none when there is none. Principle: the design leaves the builder no choice (ADR 0687 §2 means the network's own link).
DQ-3 routes answers, per link, the applied list's names that resolved holds on that link now. Principle: evidence over assertion.
DQ-4 mesh-sdk joins the group only to refresh its test copies of the three seats and the two tests that assert today's verbs; the seat-name constants stay. Principle: one release, one check; nothing seat-specific is added to mesh-sdk (ADR 0613 §5).
DQ-5 The guard's machine socket answers routes the same as the bus. Principle: one answer per verb.
DQ-6 Yes: i3's force input and its answer fields (i3, watcher) are optional fields in node-display-session's definition. Principle: a seat's contract names every field a holder answers.
DQ-7 open is class act and each call is written to the log of acts done by hand, with its caller and why, as issue 935 asks. Principle: an act on the person's screen by an agent is read back later (tools-are-how-a-module-is-spoken-to).
DQ-8 "No holder" is read from the assignments, never from the bus's no-responders text. Principle: read the owner's state.
~~DQ-9 The watcher hears the user manager's environment change (org.freedesktop.systemd1.Manager PropertiesChanged on Environment on the person's systemd); the developer proves it with a unit test against a recorded signal and checks it once on the laptop; if the user manager sends no such signal, §15's file event on the X socket folder is the trigger and the design line says so. Principle: events first; evidence over assertion.~~ *Corrected (2026-11-24): `org.freedesktop.systemd1.Manager`'s property `Environment` carries the annotation `org.freedesktop.DBus.Property.EmitsChangedSignal` `false` in systemd's interface description (`org.freedesktop.systemd1.Manager.xml`, read by the lead on the laptop), so the user manager sends no `PropertiesChanged` for it. The trigger is the kernel's file events on `/tmp/.X11-unix` and on the session's `RuntimePath`, the environment reread at each for at most 60 s.*
DQ-10 Yes: §16's WAYLAND_DISPLAY import applies to a Wayland session's start block only.
DQ-11 Yes: correct design 42's citation to §29–§31.
DQ-12 Yes: the contracts modules carry the generated packages; holders import them at the zero version (ADR 0573 §2, §4).
DMC-1 Yes: the tool runner may not publish a node seat event naming its machine today; mesh-delivery's grants part grants it for the holder's own node only (this also covers nftables), and mesh-delivery joins the group with its ordering edge before the holders. Principle: a gap in the delivery system is built there (design-it-as-it-should-be).
DMC-2 Yes: the guard leaves the uplink names out of its judgement of a routed link, so the fallback still applies to a link holding only uplink names (ADR 0688 stands).
DMC-3 Yes: each holder takes its own subcommands and tools from its manager.go; main.go stays the byte-equal copy.
DMC-4 Yes: the bundle hears a reconnect as the first heartbeat answered after a missed one. Principle: use what the runtime gives.
DMC-5 Yes: the five tools and the health tool are listed in the manifest's tools (§27).
DMC-6 The module's folders are removed when the module leaves only as the node-engine does for a directory resource; where it keeps a directory that still holds files, the design says the folders are kept and why (state of the module, harmless). Principle: the design says what the mesh does, never an intention it does not carry out.
DMC-7 Yes: write a README for networkmanager and for systemd-networkd.
DMC-8 Yes: i3's opener runs in cmd/i3-tools, not the shared desktop package, so its 10 s bound is its own.
DMC-9 Yes: accept the runtime's module prefix on message ids; the sequence file of §12 keeps them unique.
PREPARE CHECK. The node-engine says no running for a module restarted in place at the same build (read in code and on the bus: the guard's restart 2026-11-23 23:41, no running followed). So §11's trigger for a restarted resolver does not fire: networkmanager also calls uplink-names on its bus reconnect (R2-5) and when routes shows its names missing at its health look; no new node-engine event in this milestone. Principle: events first, and the design names only events that fire.
## The build
L-1. The resource `sign-in-state` (§12's folder) carries `unknown` `module` (ADR 0422 §3: the module's own process reacts, as its README says and its tests show). The watcher leaves a path it does not know (anything but `watch.sock`, `check-address`, `pending/` and its files, `names.json`, `sequence`) as it is and writes it to the journal once per path; the README (§24) says so and one unit test (§25) shows it. Not `move-out` (ADR 0422 §4 would move the module's own files at every look), not `program` (§2: no other program writes there).
L-2. The fact `private-interface` renders the literal `mesh0`. Quick, not thorough: the private network's interface on the laptop is `mesh0`, and netcheck and networkmanager's configuration already name it literally; one value every module reads is the thorough fix, outside this milestone (a finding the lead carries; the laptop's assignment names the tunnel `wg0`, which contradicts what runs).
L-3. Read on the laptop on 2026-11-25: the node-engine sets no `MESH_NODE` for a process resource (the unit holds only `MESH_FINGERPRINT`; zfs-watch's on another machine has none), so the watcher, a process, cannot know its node. The watcher needs no node: it opens and notifies without one; a kept change in `pending/` holds the event's name, its sequence and its body without the node; the bundle (which the tool runner gives `MESH_NODE`) fills its node into the subject, the message id `<node>.<event>.<sequence>` and the body when it publishes. Quick, not thorough: the thorough fix (the node-engine gives every process resource `MESH_NODE`) is a finding the lead carries.
## Code review round 1
Lead answers to code review round 1 of the milestone sign-in-page (fix-1981@g14, 2026-11-24). Each names what settles it.
C-1 (grants: membership). The tool runner's membership lists the held seat's own-node machine event too (onMachine), so its runtime's mayPublish lets it publish; tests on node-uplink's sign-in-asked.<node> subject itself, and the whole test publishes through the runtime's check, not straight to the stream. Principle: evidence over assertion; §4a.
~~C-2 (validator: a tool check alone). networkmanager's service resource (NetworkManager's unit) carries health of kind unit, so the watcher's tool check stands beside a check of another kind (ADR 0227 rule 8, ADR 0240 rule 2), as zfs's process watch stands beside its units' unit checks (read in mesh-catalog main, modules/zfs). §27 changes from "the service resource as it is today" to that.~~ *Corrected by C-2c (2026-11-24): NetworkManager.service keeps no state and no health (ADR 0117 §4, §5).*
C-3 (mesh-sdk test copies). Copy the three definitions byte for byte from mesh-networking and mesh-contracts at their heads, and fix the two tests' decision text to match. Principle: a copy is a copy.
C-4 (guard: names in place). The guard judges "in place" from the domains resolved holds on the link now (rawDomainsOf), not from its applied record alone, and sets them again when they are missing; a test where the network manager rewrites the link's domains and one where resolved restarts. §7.
C-5 (i3: the opener's bound). cmd/i3-tools runs the opener with its own run that stops waiting at 10 s without killing the opener (DMC-8); a test with an opener that outlives the bound and keeps running.
C-6 (generated packages). systemd-resolved and i3 import noderesolver and nodedisplaysession at the zero version and answer with their types; uplink-names' names is an array as the definition says. DQ-12.
C-7 (/var/lib/node-resolver unknown). It stays: mesh-catalog's checks/owned refuses a directory without unknown (ADR 0422 §8). Its value is "module", as L-1: the guard leaves a path it does not know as it is and writes it to the journal once; README line and a unit test. Not "program" (no other program writes there, ADR 0422 §2).
C-8 (bounds). The watcher socket's 5 s and the names file write's 15 s are stated constants in the design lines, as R2-7 holds for 60 s, 10 s and 256. Principle: a bound is stated; a setting only where machines differ.
NOTES taken: (a) node-resolver's real definition adds outside_writes to routes' answer, which systemd-resolved answers today (U-M3: every existing field carries over); (b) a refused open writes a hand-act too (DQ-7: each call); (c) fallback.json's since is the time of the guard's first round, never zero; (d) the watcher redials the system bus only on the socket's file event and on rating-again, never in a loop. mesh-catalog-connectivity's stale generated files on trunk stay a finding outside the milestone.
~~C-2b (corrects C-2). NetworkManager.service keeps no state and no health (ADR 0117 §4, §5: the mesh never starts, stops, enables or disables it; a unit check on a service not stated running is refused, ADR 0240 rule 1). The sign-in process's health is of kind exec, command `./uplink-tools health`, which asks the watcher's socket and exits non-zero when the watcher is not subscribed or the last uplink-names call stands failed (60s, 20s, 2 looks, 60s grace); with no tool check left, ADR 0227 rule 8 does not apply, and the check runs on the machine, so it works behind a sign-in page (ADR 0689). `uplink_health` stays a tool of the bundle, not a health check.~~ *Corrected by C-2c (2026-11-24): an exec check exists only for a container; the manifest validator refuses it on a process, and the node-engine runs exec checks only through the container runtime (the node-engine's `internal/apply/apply.go` `runtimeCheckArgs`, `internal/liveness/readiness.go`).*
C-2c (corrects C-2 and C-2b). NetworkManager.service keeps no state and no health (ADR 0117 §4, §5); the sign-in process's health is of kind unit (its unit `networkmanager-sign-in` active), judged on the machine without the bus; `uplink_health` stays a tool of the bundle, not a node-engine check, answering not subscribed and a failed uplink-names call, both also in `uplink_sign_in` and the journal; the watcher exits non-zero when it cannot subscribe again after the system bus returns, so its unit shows failing.
## Code review round 2
C2-1. When the watcher's first subscribe at its start fails while the system bus's socket already exists, it writes the reason to its journal and exits non-zero, as when it cannot subscribe again after the bus returns (C-2c; failure must be loud), so its unit shows failing and the service manager restarts it.
@@ -0,0 +1,459 @@
---
layer: to-be
design: 08
milestone: sign-in-page
updated: 2026-11-24
code: [mesh-networking mesh-connectivity-contracts, mesh-contracts, mesh-catalog modules/networkmanager, mesh-catalog modules/systemd-networkd, mesh-catalog modules/systemd-resolved, mesh-catalog modules/i3, mesh-catalog retired-words]
decisions:
- "ADR 0687"
- "ADR 0689"
- "ADR 0688"
- "ADR 0117"
- "ADR 0247"
- "ADR 0208"
- "ADR 0443"
- "ADR 0636"
- "ADR 0613"
- "ADR 0303"
- "ADR 0573"
- "ADR 0363"
---
# Design 08, milestone sign-in-page — a network's sign-in page opens by itself on the person's desktop
**What it builds.** When the network a machine's default route leaves through asks for a sign-in, the holder of the
node seat `node-uplink` opens the network's sign-in page in the person's default browser and tells them why, on its
own machine and without the bus, which is out of reach behind the page (ADR 0689 §1); it also says the ask and its
end as `node-uplink`'s events, the mesh's record of it (ADR 0687 §1, ADR 0689 §2). On a machine with its own
resolver, the network manager's own check resolves through the network it tests, so its rating means what it says
(ADR 0687 §2). The seat `node-display-session` gains the verb `open` for any caller over the bus (ADR 0687 §4); no
part of the sign-in reaction calls it (ADR 0689 §3). The purpose and the whole shape are the main file's,
[§7](../08-connectivity.md#7--a-networks-sign-in-page). This part holds every line the milestone builds, cited as
"design 08 sign-in-page §n"; the lead's answers it follows are in
[sign-in-page-lead-answers.md](sign-in-page-lead-answers.md), cited by their keys (R-M2 and the like). It closes
issue 960 (§5 to §10, on the machines where the resolver runs) and issue 935 (§3, §29).
**Where.** Five repositories, one delivery group with one check: mesh-networking (the contracts module
`mesh-connectivity-contracts`: §1, §2), mesh-contracts (§3), mesh-sdk (its test copies, §4), mesh-delivery (the grants
part, §4a) and mesh-catalog (`systemd-resolved` §5 to §10, `networkmanager` §11 to §27, `systemd-networkd` §28, `i3`
§29 to §31, the copy of the retired words §32). **Ordering edges**, which the delivery plan derives: the three seat
definitions before any holder that serves or publishes what they add, and before any module whose `invokes` names it
(the manifest validator refuses a name no definition holds, design 26); mesh-delivery's grants part (§4a) before the
holders whose bundles publish a machine's event through the tool runner (`networkmanager`); `systemd-resolved`
serving `uplink-names` before `networkmanager` calls it (a served verb). **The grant** (DMC-1, correcting R-M3): the
grants part grants a held seat's events to the module's own account, and grants the tool runner, which carries a
bundle, a carried module's held-seat events only where the event names no machine; `sign-in-asked.<node>` names the
machine, so §4a builds that grant. It covers the holder's own node's subjects only: an event subject with a part
`<node>` is granted to that node's account alone (the seat definition's `Subject` rule, ADR 0363 §2; R2-10).
**What exists today, and its fate.** `node-uplink`'s definition gives the read verbs `resolvers` and `links` and no
events; `networkmanager`'s `uplink-tools` answers those two and watches nothing: both stay. `node-resolver` has
`routes`, `route` and `unroute`, served by `systemd-resolved`, whose guard keeps the resolver file and runs ADR 0688's
fallback (design 50 resolver-fallback): all stay. `node-display-session` has `reload`, `workspaces` and `windows`,
served by `i3`, whose own tool `i3_exec` runs a command line in the session: all stay, and `open` is the narrow verb
beside `i3_exec` that issue 935 asks for. **Going back one version** (U-N7; R3-2, which corrects R2-8): as the milestone was
delivered, one delivery group of the three seat definitions and their holders together, since the manifest check
refuses a holder without its seat's new verbs and a seat definition without its holders' `serves`, in either order.
Then: `systemd-resolved` back leaves the names on the link until the
network manager changes that link's domains, and its folder `/var/lib/node-resolver` with its files kept (§6);
`networkmanager` back removes the watcher's process, keeps its state folder with its files (§12), publishes no more
and calls nothing; `i3` back drops `open`. The kept folders are listed by the node-engine's `cleanup list` and read
by nothing (DMC-6).
## The seats' definitions
1. **`node-uplink` is defined whole, with two events in the family `node-uplink.events`** (ADR 0687 §1, as ADR 0689
§2 changes it; ADR 0613 §1, §3; ADR 0636 §5). Only the three seats this milestone changes are defined whole (§1 to
§3); the domain's other seats keep their grain (ADR 0613's deciders: the operator, 2026-11-03, "full definitions
only for the seats the milestone changes"; the lead's answer of 2026-11-24). In `mesh-connectivity-contracts` the
definition carries every field today's definition holds, unchanged: its path `/etc/resolv.conf` with its
`steps-back-for` naming `node-resolver`, and the verbs `resolvers` and `links`, each marked `optional` as today,
with their inputs and answers as `networkmanager` answers them (U-M3). It adds the events `sign-in-asked` and
`sign-in-ended` and the family `{name: node-uplink.events, max-age-days: 7}`: the shared events stream filtered to
the seat's subjects, which keeps them 7 days. Each event's subject is `<event>.<node>` after
`mesh.seat.node-uplink.event.`, the `<node>` the publishing node. The bodies, each a JSON Schema with every field
required:
- `sign-in-asked`: `node` (the node's name), `link` (the interface name of the link the default route leaves
through), `network` (the network's name as the network manager knows it, its connection's name), `address` (an
http or https address, the one opened), `at` (the time of the change it says, never of its publish, RFC 3339 in
UTC to the second: ADR 0689 §2).
- `sign-in-ended`: `node`, `link`, `network`, `at`, and `why`, one of `signed-in`, `left`, `no-longer-asked`;
`link` and `network` are empty only for a `no-longer-asked` said with no connection active (§21).
**Both are optional for a holder**: the definition marks neither as required and the manifest validator asks no
holder to publish them; a holder whose network manager cannot tell a sign-in page announces neither and says so in
its README (§28). **No part of the mesh consumes them** (ADR 0689 §2, §3); they are the mesh's record, read with the
bus module's tool `nats.nats_stream_messages` filtered to `mesh.seat.node-uplink.event.*.<node>` (R2-6), and a
reader takes their time from `at`, never from arrival. The conformance fixtures
hold one value per event, with documentation names only (§33). Checked by the indexer's generator test over the
definition and `networkmanager`'s whole-module test matching a published event, subject and body, against a
fixture (design 26).
2. **`node-resolver` is defined whole, with the verb `uplink-names`** (ADR 0687 §2, changing ADR 0247 §10; ADR 0613
§1, §3; ADR 0636 §5). In `mesh-connectivity-contracts` the definition holds `routes`, `route` and `unroute` with
every field today's definition holds, their `replaces` unchanged (U-M3), and `uplink-names`, required of every
holder as the seat's other verbs are (ADR 0247 §15). Its callers are the modules whose manifest `invokes` it
(`networkmanager`, §13) and the operator, through the mesh MCP server (U-N6).
- input `{names}`: a list of 0 to 8 host names, each a name of 1 to 253 bytes in letters, digits, hyphens and
dots, taken lower-cased. The list replaces what was given before; an empty list takes every name away.
- answer `{names, link, set_at}`: the names now given, the link they are answered over now (empty when no link
carries a default route), and when the list was set.
- refused, naming the name and the reason: a name that is not a host name (a wildcard, a trailing dot, a label over
63 bytes), the root, the mesh's own domain or a name under it (ADR 0247 §12's rule for `route`, for the same
reason), more than 8 names.
`routes`'s answer gains `uplink_names` `{names, link, refused}`: `names` are the names of the applied list (§8)
that resolved holds on that link now (DQ-3), never the file's, with `refused` the reason resolved last refused them, or empty (H-N6); and `mesh_resolvers`
`{silent, since}`: whether the mesh's resolvers are silent now, by ADR 0688's guard, and since when (S-N5). Why 8
names: the network manager has one check address; 8 leaves room and keeps the guard's round small. `routes` keeps
every field it answers today, `outside_writes` included, which systemd-resolved answers now (U-M3; note a).
3. **`node-display-session` is defined whole, with the verb `open`** (ADR 0687 §4, changing ADR 0208 §3; ADR 0613 §1,
§3; ADR 0636 §5). In `mesh-contracts` the definition holds `reload`, `workspaces` and `windows` as `i3` answers
them today and every field today's definition holds, its `receives` unchanged (U-M3); `reload` gains `force` as an
optional input and `i3` and `watcher` as optional answer fields, the descriptions staying the definition's (DQ-6);
and `open`, of class act (DQ-7), required of every
holder so that any holder of the display session serves it the same way (ADR 0687 §4: i3 or sway). Its callers are
the modules whose manifest `invokes` it and the operator, through the mesh MCP server; the sign-in reaction is not one (ADR 0689 §3;
U-N6).
- input `{address}`: the address to open.
- answer `{address, program, command, started}`: the address as handed on (the encoding below), the desktop entry
that opened it (as `browser.desktop`), the first word of that entry's command, and `started`: `opened` when the
opener ended well within its bound, `opening` when it still ran at its bound (§29). `program` and `command` are
given only once the opener started (H-M2).
- refused, naming the reason: a scheme other than `http` or `https` (named), no scheme (a file path), no host, an
address over 2048 bytes once encoded, no graphical session running, no default program for the scheme, the
opener ending with a failure (its status named).
- **the encoding** (U-M2, R2-9): RFC 3986's unreserved characters (letters, digits, `-`, `.`, `_`, `~`) and `:`
`/` `?` `#` `[` `]` `@` `&` `=` `+` `%` are kept as they are; every other character is percent-encoded, as the
bytes of its UTF-8 form. Nothing is refused for a character, and no shell reads the address.
4. **mesh-sdk keeps no layout of the three seats, and refreshes its test copies** (ADR 0613 §3, §5; DQ-4, DQ-12).
The prepare found no type layout of these seats in mesh-sdk. mesh-sdk joins the group only to replace its test
copies of the three definitions (`go/seatlist/seatlisttest/seats/`: `node-uplink.json`, `node-resolver.json`,
`node-display-session.json`) with the whole definitions, and the two tests that assert today's verbs
(`go/catalogue/node_resolver_test.go`, `graphical_session_test.go`, and `uplink_verbs_test.go`); its seat-name
constants stay, being names and not layouts, and nothing seat-specific is added to it. The contracts modules carry
the generated packages as the generator places them (`go/seats/nodeuplink`, `noderesolver`,
`nodedisplaysession` and their TypeScript packages, with their artifacts), and `systemd-resolved`,
`networkmanager` and `i3` import them at the zero version for the subjects, the verbs and the bodies (ADR 0573
§2, §4).
**4a. The grants part grants the tool runner its node's machine events of the seats its carried modules hold**
(DMC-1). mesh-delivery's grants part composes the tool runner's account, which is per node, with the publish of
the event subjects carrying its own node of every seat a module it carries holds, so a bundle's
`sign-in-asked.<node>` is let through (and nftables' `allowances-changed` with it); no other node's subject. The
tool runner's membership lists that own-node event too, so its runtime's check of what it may publish lets the
bundle publish it (C-1). Its tests: a tool runner carrying a holder of `node-uplink` is granted and lists
`mesh.seat.node-uplink.event.sign-in-asked.<its node>` and no other node's; the whole-module test of §25 publishes
through the runtime's check, never straight to the stream.
## The resolver answers the check's names (`systemd-resolved`)
5. **`systemd-resolved` serves `uplink-names` on the mesh** (ADR 0687 §2). Its claim of `node-resolver` serves
`uplink-names` beside its three verbs, through the node's tool runner as `${machine:account}`. It is not served on
the machine's socket: its caller is on the bus, and a host name of the network manager's check is no VPN's data
(ADR 0247 §31 to §34 hold for those). The socket's `routes` answers the same as the bus's, `uplink_names` and
`mesh_resolvers` included (DQ-5).
6. **The names are kept in one file the guard reads** (ADR 0687 §2). The verb writes
`/var/lib/node-resolver/uplink-names`, root's, mode 0644, one name per line, empty for an empty list, whole: it runs
`sudo -n install -m 0644 -o root -g root /dev/stdin /var/lib/node-resolver/uplink-names.new` with the lines on its
input, then `sudo -n mv -f /var/lib/node-resolver/uplink-names.new /var/lib/node-resolver/uplink-names` (U-M5). The
`sudo` module's one rule for `${machine:account}` covers both; no module carries sudo rules of its own. The write
is bounded at 15 s, a stated constant (C-8); past it the verb is refused naming the bound and the file is left as
it was. The module declares the directory `/var/lib/node-resolver` (root, 0755) as its resource, with `unknown`
`module` (ADR 0422 §3, §8; C-7): the guard leaves a path there it does not know (anything but `uplink-names`,
`uplink-names.new` and `uplink-names.applied` and its file written beside) as it is and writes it to its journal
once per path; not `program`, since no other program writes there (ADR 0422 §2). When the module leaves, the
node-engine keeps the directory while it holds files, as data, listed by `cleanup list`, and nothing reads it then
(DMC-6); the names stay until a call with an empty list or a person's cleanup (S-N6). Why a
file on the machine: the guard, as root, reads only the machine and resolved, as it does today; the file holds
across a restart of resolved, of the guard and of the machine, and the caller states the names again at each of
its starts (§13).
7. **The guard gives the names to the link that carries the default route, every round** (ADR 0687 §2, changing
ADR 0247 §16). In each round of its pass over links (ADR 0688's round as built: every 5 s, or after
`answer-within` when that is longer; design 50 resolver-fallback §2; S-N6), the guard reads the names file and
finds the link carrying the default route: among the kernel's IPv4 default routes, or the IPv6 ones when there is
no IPv4 default, the one with the lowest metric whose link is neither one `route` routed (a VPN's) nor the private
network's interface; none when there is no such link (DQ-2). The private network's interface name it reads from a
fact the module renders beside `suffix`, `/etc/node-resolver/private-interface` (DQ-1), which renders the literal
`mesh0` (L-2): that is the private network's interface where the resolver runs, and netcheck and `networkmanager`'s
configuration already name it so. One value every module reads is the thorough fix, outside this milestone. It sets that
link's domains, through resolved, to the domains the link has plus one routing-only domain `~<name>` per name,
keeping every search domain and routing domain it has, and takes the names off the link it gave them to before,
when that differs. **In place** is judged from the domains resolved holds on the link now, never from its applied
record alone: when the network manager rewrote the link's domains, or resolved restarted, the names are set again
in that round (C-4). A round in which they are in place changes nothing. It never sets a link's servers, its default
route for names (that stays ADR 0688's fallback alone), its addresses or its routes (ADR 0117 §13, §14; ADR 0247
§13): the link stays one a network manager gave servers and not one `route` routed, so ADR 0688's fallback gives
it its default route back while the mesh's resolvers are silent, as before. The guard leaves the applied uplink
names out when it judges whether a link is routed (all its domains routing-only), so a link holding only those
names is not taken for a routed one (DMC-2).
8. **The guard keeps what it applied in a file of its own** (R-M2). After each change it writes
`/var/lib/node-resolver/uplink-names.applied`, root's, mode 0644, whole (written beside and renamed over): `{names,
link, at, refused}`, the list it applied, the link, when, and resolved's refusal or empty. At its start it reads
it, so after a restart it takes the names off the link it gave them to, never inferring which. When resolved
refuses the names, the guard writes the refusal into `refused` and to its journal once per change of the refusal,
never every round (H-N6, R2-13). It writes a journal line when the link changes and when the names change, never
every round. **Its state for `routes`** (S-N5, R2-2): at each of ADR 0688's two turns it writes
`/run/node-resolver/fallback.json`, root's, mode 0644, `{silent, since}`, which `routes` reads; at its first round
it writes the state it finds, `since` that round's time, never zero (note c). The guard makes
`/run/node-resolver` (root, 0755) when it is missing; it goes at the next boot, and the guard's first round writes
the file again.
9. **Its tests** (ADR 0687, *How it is checked*, clause 2), unit, within the module's budget: the names given are
answered over the link that carries the default route, and over the new one after that route moves to another
link, the old one losing them; the link keeps its search domains; a guard restarted with an applied file takes
the names off the link it names; a changed list replaces the old one on the link; a link that has only those names
is still given its default route back while the mesh's resolvers are silent (ADR 0688's test of that, issue 1981's
AC1, still passes), a link with no search domain of its own and only the uplink names included (DMC-2); the link
chosen is the lowest-metric one that is neither routed nor the private network's, none when there is none, the
private interface read from its fact (DQ-1, DQ-2); the names set again after the network manager rewrites the
link's domains and after resolved restarts (C-4); an unknown path in its folder left and journalled once (C-7); a
names file write past its 15 s bound refused with the file left as it was (C-8); each refusal of §2; the socket's `routes` equal to the bus's; `routes` answers `uplink_names` from resolved, with `refused`, and
`mesh_resolvers`.
10. **Its README** says the verb, the two files, the guard's new duty, the commands of §6, that the guard leaves an
unknown path in `/var/lib/node-resolver` as it is and journals it once (C-7), and that `uplink-names` sets only
how resolved answers names over a link, never the link.
## The uplink's holder reacts on its own machine (`networkmanager`)
11. **`networkmanager` runs in two parts: a watcher started at boot without the bus, and its bundle** (ADR 0689 §1,
§2; R2-1). The tool runner starts no bundle before it has reached the bus, so after a cold boot behind a sign-in
page a bundle never runs; the part that must work without the bus may not need the bus to start. So:
- **the watcher** is a process resource of `networkmanager`, as the zfs module's watch is: its `name`
`networkmanager-sign-in`, `artifact` `tools`, `run` `./uplink-tools watch`, `user` `${machine:account}`,
started by the machine's service manager at boot and kept running, needing no bus and no node: the node-engine
gives a process resource no `MESH_NODE`, and the watcher opens, notifies and keeps events without one
(L-3); its `health` of kind `unit`:
its unit `networkmanager-sign-in` active, judged on the machine without the bus, so it holds behind a sign-in
page (ADR 0689; C-2c). The watcher exits non-zero when it cannot subscribe again after the system bus returns
(§14), so its unit shows failing. It
watches the rating (§14), opens the page and tells the person (§15 to §19), and keeps the events (§20, §21).
- **the bundle** `uplink-tools`, in the tool runner once it reaches the bus, as today: it answers `resolvers` and
`links`, serves the tools (§23), publishes the kept events (§20) and calls `uplink-names`
(§13). It reads the watcher's state only through the module's own local state (§12).
- **the shared code** (DMC-3): `main.go`, `uplink.go`, `uplink_test.go` and `copies_test.go` stay byte-equal
between `networkmanager` and `systemd-networkd`; `main.go` takes each holder's own subcommands and tools from its
own `manager.go`, where `networkmanager`'s adds `watch` and the tools of §23 and `systemd-networkd`'s adds none.
ADR 0689 names `uplink-tools` as the reacting part; the record-writer adds a progressive insight naming the
watcher process, and the decision is unchanged (R2-1).
12. **The two parts share the module's own local state, in one folder** (R2-1). `networkmanager` declares the
directory `${machine:account-home}/.local/state/mesh/networkmanager` (owner `${machine:account}`, mode 0700) as
its resource `sign-in-state`, with `unknown` `module` (ADR 0422 §3; L-1): the module's own process reacts to a path
it does not know. The watcher leaves any path but `watch.sock`, `check-address`, `pending/` and its files,
`names.json` and `sequence` as it is, and writes it to its journal once per path. Not `move-out`, which would move
the module's own files at every look (ADR 0422 §4); not `program`, since no other program writes there (§2). When the module leaves, the node-engine keeps it while it holds files, as data, listed by `cleanup
list`, and nothing reads it then (DMC-6). In it:
- `watch.sock` (mode 0600), the watcher's socket, made at its start: one JSON line asked, one answered, within
5 s, a stated constant (C-8); a bundle's ask past it counts as no answer. `state`
answers the watcher's state (§23's read); `rating-again` makes the watcher subscribe again, read the rating now
and act on it as on a change.
- `check-address`, written whole by the watcher (beside and renamed over) at its start and whenever the network
manager's check address changes: the address on one line, empty when there is none.
- `pending/`, the kept events: one file each, `<sequence>.json` with a ten-digit sequence, holding `{event,
sequence, body}`, the body without `node` (L-3), written whole by the watcher and deleted by the bundle once the bus acknowledged it (§20).
- `names.json`, written whole by the bundle: its last `uplink-names` call, `{names, result, at}`, `result` one of
`ok`, `no holder` or the failure.
- `sequence`, written whole by the watcher (beside and renamed over): the next sequence of its message ids and
kept files, never reset while the folder lives (R3-1), so an id is never used twice.
Nothing else reads or writes the folder.
13. **The bundle gives the resolver the check's host name** (ADR 0687 §2; R-N6, H-M3, S-M1, R2-5). At its start,
when `check-address` changes (a file event of the kernel), when its bus connection comes back (the connection's
reconnect, an event), and when it hears the node seat `node-engine`'s event `running` for a module that holds
`node-resolver` on its own node and is running, it calls `<node>/node-resolver.uplink-names` directly with the
check address's host name, or with an empty list when the address is empty, and writes `names.json`. Its manifest
`consumes` `node-engine.running`; it drops every event whose subject names another node; which module holds
`node-resolver` on its node it reads with `mesh-module-assigner.assignments` (its node, `seats`) when such an event
comes. An answer that no holder serves the verb is no failure: `result` is `no holder`, and the machine's resolver
file then lists the mesh's resolvers, through which the check already resolves. A failed call is written to its
journal with the reason, makes its health unhealthy (§11) and is asked again at the next such moment or by its
tool (§23), never on a timer (the lead's answer of 2026-11-24: events first). Its manifest `invokes`
`seat:mesh-module-assigner.assignments`, `seat:node-resolver.uplink-names` and `seat:node-resolver.routes`, which
`uplink_sign_in` reads (§23; R3-3). **The moments, corrected by the prepare** (the
prepare's check): the node-engine says no `running` for a module restarted in place at the same build, so a
restarted resolver gets no new call: it needs none, since the names file holds across its restart (§6) and the
guard sets them again from what resolved holds (§7, C-4). One more moment is added, with no new node-engine event
in this milestone: the bus connection coming back. (The health look the prepare's answer added here is gone with
C-2c: the node-engine's check of the watcher is its unit's state, and calls nothing on the bus.) **The bus
connection coming back** is the first heartbeat of its consumer answered after a missed one (mesh-sdk's
`OnHeartbeat` and `Missed`; DMC-4). **`no holder`** is read from `mesh-module-assigner.assignments` (its node,
`seats`) naming no holder of `node-resolver` on its node, never from the bus's no-responders text (DQ-8).
14. **The watcher watches the network manager's rating as it changes** (ADR 0687 §3; R2-1). It hears the network
manager's `PropertiesChanged` signal on the system bus for `Connectivity`, `PrimaryConnection`,
`ConnectivityCheckEnabled`, `ConnectivityCheckAvailable` and `ConnectivityCheckUri`, an event the network manager
sends; nothing runs on a timer, and the check itself stays the network manager's. When its system bus connection
drops, it writes that to its journal and subscribes again when the system bus's socket comes back (a file event
of the kernel on the socket's folder), then reads the rating and acts on it as on a change; `rating-again` (§12)
does the same at once. It redials the system bus only at those two, never in a loop (note d). When it cannot
subscribe again after the system bus returns, it writes the reason to its journal and exits non-zero, so its unit
shows failing and the machine's service manager restarts it (C-2c). The same holds when its first subscribe at
its start fails while the system bus's socket already exists: it writes the reason to its journal and exits
non-zero (C2-1; failure must be loud). It runs as `${machine:account}`, which on a machine with a graphical session is the
person's (ADR 0689 §1).
15. **It opens the page and tells the person, at three moments** (ADR 0689 §1, §4). With the check on: when the
rating becomes PORTAL on the active connection; at its own start when the rating already is PORTAL; and when the
person's graphical session starts (§17) while the present rating is PORTAL. Each time it opens the check address
(§18) and shows the notification (§19). **Once per ask**: it acts again only after the rating has left PORTAL, a
session's start and its own restart excepted; after its own restart while PORTAL it opens the page once more,
which is wanted, because what needs the person is shown (H-N7). It reads the present rating at a session's start,
never a kept event (ADR 0443 §3). With no graphical session found (§16) it opens and shows nothing and still keeps
the events (ADR 0689 §4).
16. **How it finds the person's session** (ADR 0689, *Consequences*). Over the system bus it asks logind for the
sessions of its own account (`ListSessions`, then each session's `Type`, `Remote`, `State` and the user's
`RuntimePath`): the session is the one of type `x11` or `wayland`, not remote, whose state is `active` or
`online`. Its session bus is `unix:path=<RuntimePath>/bus`. Its display is in the user manager's environment,
read over that bus (the systemd user manager's `Environment`), into which the session's start block imports
`DISPLAY` and `XAUTHORITY` (ADR 0208 §17): that is the X11 start block's import today; a Wayland holder's start
block imports `WAYLAND_DISPLAY` (DQ-10). No such session, or no display named there, is no
session. It reads no other module's files or code (ADR 0689 Considered Options).
17. **How it hears a session start** (DQ-9, as corrected). It hears logind's `SessionNew` signal on the system bus.
For a session of its own account of type `x11` or `wayland`, it waits for the user manager's environment to name a
display, rereading it at each file event of the kernel on `/tmp/.X11-unix` (an X server's socket) and on the
session's `RuntimePath` (a Wayland socket), for at most 60 s, a stated constant (R2-7); past that it writes to its
journal that the session's start was not acted on. Then §15's third moment applies. Why file events and not the
user manager's signal: `org.freedesktop.systemd1.Manager`'s property `Environment` is annotated
`org.freedesktop.DBus.Property.EmitsChangedSignal` `false` in systemd's interface description, so the user manager
sends no `PropertiesChanged` for it (read by the lead on the laptop, 2026-11-24).
18. **How it opens the page** (ADR 0689 §1; R2-3). It runs, with the session bus and `XDG_RUNTIME_DIR` of §16 in its
environment, `systemd-run --user --collect --quiet --wait -- xdg-open <address>`, the address as one argument and
never through a shell, so the browser runs under the person's user manager in their session and outlives the
watcher. Before it, it asks `xdg-mime query default x-scheme-handler/<scheme>` the same way for the program. If
the run ends within 10 s, a stated constant (R2-7), its status decides: success is `opened`, failure is a failed
open naming the status; if it still runs at 10 s, the page is `opening` and the run is left to go on. The open runs
beside the watch: rating changes heard meanwhile are handled after it, in the order they came (R2-3).
19. **How it tells the person** (ADR 0689 §1). It calls `org.freedesktop.Notifications.Notify` on the session bus
of §16 (the desktop notification service), `app_name` `mesh`, only after §18's outcome (H-M2):
- opened: summary "This network asks you to sign in", body "<network>: its sign-in page is open in <program>.";
- opening: the same summary, body "<network>: its sign-in page is opening in <program>.";
- failed: the same summary with urgency critical, body "<network>: the page did not open (<reason>); open
<address> in a browser.": failure is loud;
- the rating leaving PORTAL for FULL, with a session: summary "The network is open", body "<network>: signed in.";
any other end shows nothing.
20. **The events are kept by the watcher and published by the bundle, in order** (ADR 0689 §2; H-M5, R2-1, R2-11).
The watcher writes each event of §21 into `pending/` (§12) at its change, with `at` the time of the change, its
name and its sequence, taken from `sequence` (§12), and no node (L-3). The bundle, which the tool runner gives
`MESH_NODE`, fills its node in when it publishes: into the subject `<event>.<node>`, into the body's `node`, and
into the `message_id` `<node>.<event>.<sequence>`, the same for every publish of one file. It keeps at most 256 files, a stated constant (R2-7); past
that it deletes the oldest with a journal line naming it. The bundle publishes them in sequence order on the
seat's subject (§1), each with its `message_id` as the bus's message id (the runtime prefixes it with the module,
`networkmanager.<node>.<event>.<sequence>`, which is the bus's id; DMC-9), so a second publish of one is dropped by
the bus as a duplicate, awaiting the stream's acknowledgement, and deletes each file once acknowledged; it does so
at its start, at each file event of the kernel on `pending/` and when its bus connection comes back. A publish
refused or unacknowledged stays in `pending/`, is written to its journal and counted (§23), and is published again
at the next such moment. The kept events survive a restart of either part and of the machine.
21. **Which events it keeps** (ADR 0687 §3, which ADR 0689 §1 keeps for how it rates). The watcher keeps in memory
whether a sign-in is asked, and for which connection:
- the rating becomes PORTAL while the check is on and a connection is active, and no sign-in is asked: one
`sign-in-asked` for that connection, `address` the check address; while it stays PORTAL nothing more;
- a sign-in is asked and the rating becomes FULL: `sign-in-ended` with `signed-in`;
- a sign-in is asked and the active connection goes or is replaced: `sign-in-ended` with `left`, for the old
connection; then, when the rating is PORTAL for the new one, `sign-in-asked` for it;
- a sign-in is asked and the rating becomes anything else (NONE, LIMITED, UNKNOWN, the check being switched off
included): `sign-in-ended` with `no-longer-asked`, so the record never holds an ask that ended unsaid;
- at its own start, with the check on: `sign-in-asked` when the rating is PORTAL, otherwise `sign-in-ended` with
`no-longer-asked`, for the active connection or with an empty `link` and `network` when none is active;
- with the check off (not enabled, or not available) it keeps nothing, at its start and after.
`link` is the interface of the active connection's first device, `network` its connection's name, `at` the
machine's clock at the change. A check address that is not http or https keeps nothing, opens nothing and is
written to its journal.
22. **Their journals** (H-N8): the watcher writes a line for every rating change heard (the old rating, the new one,
the connection's name), every page opened, every open that failed, every notification shown, every session start
and what it did, every event kept and every one dropped past the bound; the bundle a line for every publish sent,
refused or left waiting, and every `uplink-names` call with its result.
23. **Its tools and its health** (H-M1, S-M3, R2-12; ADR 0240), served by the bundle:
- `uplink_sign_in` (reads): from the watcher's `state` (§12): whether it is subscribed, the last rating heard and
when, the ask open now (network, link, since), the asks opened and ended since its start, the last open with
its outcome and time, the last notification, the last session start with what it did, the events dropped past
the bound of 256 (R3-4); from the folder: the events waiting in `pending/` and the publishes refused since the
bundle's start; from `names.json`: the last
`uplink-names` call; and, where a holder of `node-resolver` runs on its node, the resolver's refusal of the
names as `<node>/node-resolver.routes` answers it (`uplink_names.refused`).
- `uplink_names_again` (acts): calls `uplink-names` now as §13 does.
- `uplink_rating_again` (acts): asks the watcher `rating-again` (§12).
- `uplink_publish_again` (acts): publishes the kept events in `pending/` now, as §20 does (R3-5).
- `uplink_health` (reads; a tool of the bundle, not a node-engine check, C-2c): unhealthy while the watcher's
socket does not answer, while the watcher is not subscribed, or while the last `uplink-names` call stands
failed, naming which; `no holder` is healthy. The watcher not subscribed and a failed `uplink-names` call are
also shown by `uplink_sign_in` and written to the journal.
24. **Its README**, written whole in this milestone (DMC-7), says the two parts and their shared folder, that the watcher opens the page and tells the person on
its own machine without the bus, how it finds the session (§16, §17), that it keeps and the bundle publishes the
two events from the network manager's own rating, that with the check switched off it neither opens nor keeps,
and that the bundle calls `uplink-names` where a holder of `node-resolver` runs (ADR 0687 §2, §3; ADR 0689); and
that the watcher's health is its unit's state, judged on the machine without the bus, and that `uplink_health`
is a tool, not a health check (C-2c, replacing R3-4's line); and that the watcher leaves a path in its folder it does not know as it is and writes it to its
journal once per path (§12; L-1). Its review reads it.
25. **Its tests** (ADR 0687 and ADR 0689, *How it is checked*), unit, with the network manager's D-Bus signals,
logind, the user manager, the opener and the notification service stood in, and no bus: PORTAL at a join opens
the page and shows one notification; PORTAL at the watcher's start does the same; PORTAL to FULL shows that the
network is open; PORTAL to any other rating shows nothing; a second PORTAL without a leave does nothing; a session
that starts while the rating is PORTAL opens the page once, one that starts while it is not opens nothing; with no
session it opens and shows nothing and still keeps the events; an opener that fails gives the critical
notification; a rating change heard during an open is handled after it; each line of §21; nothing with the check
off; no timer; the system bus dropping and coming back makes the watcher subscribe again, and so does
`rating-again`; past 256 kept events the oldest is dropped with a journal line; the bundle publishes the kept
events in order with their message ids and deletes each on acknowledgement, keeps a refused one and publishes it
at the next moment; `uplink-names` called at the bundle's start, on a changed `check-address`, when the bus
connection comes back and on a running holder of `node-resolver`, `no holder` recorded as healthy; `uplink_health`
unhealthy for a socket that does not answer, a watcher not subscribed and a failed `uplink-names` call, healthy
for `no holder`; the watcher exits non-zero when it cannot subscribe again after the system bus returns (C-2c), and when its first
subscribe at its start fails while the system bus's socket exists (C2-1); a watcher restarted after its
events were published and `pending/` emptied makes message ids it has not used before, and the bus keeps them
(R3-1); `uplink_publish_again` publishes what waits (R3-5); a path in the folder of §12 it does not know is left as
it is and written to the journal once (L-1); each tool. **One integration
test** starts `networkmanager` whole, watcher and bundle, with no bus: it sees the page opened by the stood-in
opener; then it starts a real bus holding `node-uplink`'s definition and a stand-in holder of `node-resolver`,
and sees the kept events published in order with the times of their changes and `uplink-names` called (R-M4,
R2-1).
26. **Nothing names a network in it** (ADR 0687 §6): §33 holds for its code, configuration and tests.
27. **Its manifest** declares the process of §11, the directory of §12, the `consumes` and `invokes` of §13, the
five tools of §23 under `tools` (DMC-5), and keeps its claim of `node-uplink`, its package, its configuration file
and its service resource as today: `NetworkManager.service` keeps no state and no health, since the mesh never
starts, stops, enables or disables it (ADR 0117 §4, §5) and a unit check on a service not stated running is
refused (ADR 0240 rule 1; C-2c, correcting C-2 and C-2b). The prepare
confirms, on each machine that runs `networkmanager`, that the tool runner runs as the same account as the
watcher, `${machine:account}`, since the folder of §12 is that account's alone (mode 0700), and writes it in the
milestone file (R3-6).
28. **`systemd-networkd`'s README, written whole in this milestone (DMC-7), says it announces neither event and opens nothing** (ADR 0687 §1): systemd-networkd
cannot tell a sign-in page. Its review reads it.
## The display session's verb (`i3`)
29. **`i3` serves `open`** (ADR 0687 §4; H-M2, U-M2). Its claim of `node-display-session` serves `open` beside its
three verbs, as the tool `node-display-session.open`. It checks the address by §3's refusals and percent-encodes
it by §3's encoding; it finds the session's bus and runtime directory with its `desktop` package, used only to
find the session; its opener runs in `cmd/i3-tools`, not in the shared `desktop` package, whose `Exec` kills a
command at its deadline: its own run stops waiting at 10 s without stopping the opener, which goes on (DMC-8,
C-5). It asks `xdg-mime query
default x-scheme-handler/<scheme>` for the program, refusing when there is none, and runs `systemd-run --user
--collect --quiet --wait -- xdg-open <address>` with the address as one argument, never a command line: not
through i3's IPC `exec`, which hands a shell a line. The run's outcome is decided as §18 decides it (10 s), and the
answer names the program only once it started. It reads the command from the entry's `Exec` line in the XDG data
directories. With no graphical session it refuses, as its other tools answer. Its manifest declares the package
`xdg-utils` present (ADR 0303 §2). It writes one journal line per call, the address, opened or refused, and the
program or the reason (R2-14). **`open` is an act**: each call is written to the log of acts done by hand through
`seat:mesh-hand-acts.hand-act`, with its caller and why, as issue 935 asks and as nftables writes its acts, a
refused call too, with its reason (note b); its manifest `invokes` it (DQ-7).
30. **`i3` hears nothing of the uplink** (ADR 0689 §3, replacing ADR 0687 §5). It consumes no `node-uplink` event
and reads no kept event at its session's start, so ADR 0443 §3 holds untouched. Checked by the milestone's code
review: no consumer of `node-uplink`'s events and no read of kept events in `i3`.
31. **Its README and tests** (ADR 0687, *How it is checked*, clause 4). The README says the verb, its refusals and
the encoding. Unit tests, with the session and the opener stood in: `open` refuses every scheme but http and
https, a file path and each other refusal of §3; an address holding `'`, `;`, a space, `$(`, `,` and `"` is handed on
percent-encoded as one argument and no shell reads it (R2-9); an opener that fails is refused with its status and names
no program; one that ends well answers `opened` with the program; one still running at its bound answers
`opening` and keeps running after it (C-5); each call, a refused one too, writes one act to the log of acts done
by hand (DQ-7, note b). The live tests are the main file's acceptance test 3.
## Words and checks
32. **The catalog's copy of the retired words gains "captive portal"** (ADR 0687, *Consequences*: the glossary's
word **sign-in page**). mesh-catalog's `retired-words` lists it, so hq's words test agrees with the copy, and no
tool or seat verb description in the change uses it.
33. **Nothing names a network** (ADR 0687 §6). Code, configuration and tests name no network, sign-in page or
employer: the tests use documentation names only (`example.net`, a network named `guest-example`). The milestone's
code review searches the change's code, configuration and tests for a wifi name or a host outside the
documentation domains, and finds none.
34. **The test budget** (R-N7). The prepare records each touched module's unit and integration test counts against
its budget in the milestone file, and the review reads them.
35. **The live cases** are the main file's acceptance tests 1 to 3. Issue 960 is resolved once the first holds;
issue 935 once the third does; if the second shows the rating LIMITED instead of PORTAL, ADR 0687 is amended,
tracked by issue 960.
@@ -2,8 +2,10 @@
layer: to-be
status: in-progress
code: [mesh-catalog, mesh-controller, mesh-host]
updated: 2026-11-12
updated: 2026-11-24
decisions:
- "ADR 0689"
- "ADR 0687"
- "ADR 0369"
- "ADR 0303"
- "ADR 0215"
@@ -241,6 +243,7 @@ flowchart LR
| milestone | what it builds | part | state |
|---|---|---|---|
| zfs-owns-zfs | the zfs module's ownership of ZFS (ADR 0679), with its three node-engine prerequisites and their readers, under issue 1979 | [42-milestones/zfs-owns-zfs.md](42-milestones/zfs-owns-zfs.md) | designed |
| sign-in-page (design 08's) | `i3`'s verb `open` (ADR 0687 §4; ADR 0689 §3) | [08-milestones/sign-in-page.md](08-milestones/sign-in-page.md) §3, §29 to §31 | designed |
The modules of the tables above were built before designs were cut into milestone parts; their remaining lines move
into a part of their own at their next amendment (playbook 02, *The shape of a design*).
@@ -311,6 +314,13 @@ The node-engine is delivered first, so the machines report the two capabilities.
next, because it parses `data`, `if-capability` and `renders`. The catalog comes last. Left open: the
draw at the wall (a metered plug or a UPS), a GPU-load block from a generic module, and the headsets.
**Added 2026-11-24** (ADR 0687 §4, changing ADR 0208 §3; ADR 0689 §3). `node-display-session` gains the verb `open`:
one http or https address in the person's default browser, in their session, as the person, answering which program
opened it and refusing every other scheme and a file path; `i3` serves it, beside its own `i3_exec`, for any caller
over the bus (issue 935). `i3` does not react to a network's sign-in page: the uplink's holder opens that page on its
own machine (ADR 0689 §1, design 08 §7). Every line it builds is in design 08's milestone part
[sign-in-page](08-milestones/sign-in-page.md), §3 and §29 to §31.
## Phase 3 — one machine model
The laptop's hardware module (vendor daemon, GPU mode, charge limit, logind, brightness and vendor keys)
@@ -0,0 +1,53 @@
---
layer: to-be
design: 50
milestone: resolver-fallback
updated: 2026-11-24
code: [mesh-catalog modules/systemd-resolved]
decisions:
- "ADR 0688"
- "ADR 0247"
- "ADR 0687"
---
# Design 50, milestone resolver-fallback — while the mesh's resolvers are silent, a network's own servers answer
**What it builds.** On a machine where a module holds the node seat `node-resolver`, the resolver's guard gives the
default route for names back to every link a network manager gave servers while none of the mesh's resolvers answers,
and takes it again once one does, so a network's sign-in page loads before the private network's tunnel is up (ADR
0688). The shape is the main file's [§3](../50-split-dns-on-a-machine-with-a-vpn-client.md#3-the-verbs-on-the-mesh-and-on-the-machine).
This part holds every line the milestone built, cited as "design 50 resolver-fallback §n".
**Where.** One repository: mesh-catalog's `systemd-resolved`, version 0.2 (pull requests 704 and 752), under issue
1981. It was decided by the operator on 2026-11-19, built before ADR 0688 wrote it down, and delivered to the laptop
on 2026-11-24; this part records it as built. Design 08's milestone sign-in-page §7 adds the guard's third duty,
`uplink-names`, in the same round.
## Lines
1. **The guard asks the mesh's resolvers itself, every round** (ADR 0688 §1). In each round the guard asks each of
the mesh's resolvers, all at once, a name under the mesh's domain, straight over the network and not through the
machine's own resolver, each within the config value `answer-within` (seconds, default 1), which the module places
as `/etc/node-resolver/answer-within`, not trusted. A resolver that answers anything, a name not found included,
answers; only silence does not.
2. **A round** (ADR 0688 §2) comes every 5 s, or after `answer-within` when that is longer, since the guard waits for
its question before the next round. A value above 5 s, raised for a slow link, makes every round that long.
3. **While one answers, only the mesh's resolvers are a default route for names** (ADR 0688 §3, changing ADR 0247
§16; ADR 0247 §9, §13). Each round the guard takes the default route for names from every link a network manager
gave one, keeping that link's own domains.
4. **While none answers, those links are a default route again** (ADR 0688 §1, §2, changing ADR 0247 §9 and §13).
The guard gives the default route for names back to every link a network manager gave servers, and a network
joined meanwhile keeps the one it was given; it never gives it to a link the verb `route` routed (a VPN's). Once one
of the mesh's resolvers answers, those links lose it within one round. Which links to give back and take is read
from resolved each round, never kept by the guard, so it holds after the guard restarts. The machine's own
resolver keeps no public fallback servers of its own: the servers that answer meanwhile are the network's.
5. **Both turns are said once each on the guard's journal** (ADR 0688, *Consequences*): "none of the mesh's resolvers
answers; a network's own servers answer every name until one does" and "one of the mesh's resolvers answers
again". The node's network check still says the mesh's names do not resolve while they are silent.
6. **Its tests** (ADR 0688, *How it is checked*), unit, in the module's tools: the network's servers answer while the
mesh's resolvers are silent, a routed link is left alone and a guard started afresh behind a sign-in page gives the
links back (issue 1981's AC1); a network joined while the mesh is silent keeps its default route (AC2); an answer,
a name not found included, answers and silence within `answer-within` does not (AC3); while the mesh answers, only
its resolvers are a default route.
7. **The live case** (issue 1981's AC4): on the laptop, on a network with a sign-in page, the guard's journal shows
both turns of §5. It held on 2026-11-24 (the turn at 15:14:49 and back at 15:16:58, local time).
@@ -7,8 +7,10 @@ code:
- mesh-catalog modules/systemd-resolved (the resolver, its guard and its verbs)
- mesh-catalog modules/forticlient (the VPN client's adapter)
- mesh-host internal/compose/resolution, internal/network (the names check of the file, milestone resolver-wait)
updated: 2026-11-12
updated: 2026-11-24
decisions:
- "ADR 0688"
- "ADR 0687"
- "ADR 0247"
- "ADR 0223"
- "ADR 0241"
@@ -48,7 +50,7 @@ another. A *routing domain* is a domain whose names a resolver sends to one link
| part | where | does |
|---|---|---|
| the seat `node-resolver` | the controller's set | a node seat, its verbs `routes`, `route`, `unroute`, required of every holder |
| the seat `node-resolver` | the controller's set | a node seat, its verbs `routes`, `route`, `unroute` and, from ADR 0687 §2, `uplink-names`, required of every holder |
| the stepping back | the controller's composition | where a module holds `node-resolver` and renders `/etc/resolv.conf`, the uplink holder's rendering of it is left out |
| `systemd-resolved` | the catalog | holds the seat, provides `split-dns` at the machine's reach, writes the file and resolved's drop-in, runs the guard |
| the guard | `systemd-resolved`'s process, as root | keeps the file the module's, keeps an outside write, serves the verbs on the machine's socket |
@@ -94,8 +96,18 @@ serve the machine's modules, so what a VPN pushed never crosses the bus. On the
answers the write standing now, and `route` can also `take` it.
The routes are resolved's own per-link state, which resolved forgets when the link goes. The module keeps
no table beside it. A link with servers of its own is never a default route for names: the guard says so
to resolved every 5 s, whoever gave the link its servers. Its routing domains stay its own.
no table beside it. **While one of the mesh's resolvers answers, a link with servers of its own is no default
route for names**: the guard takes it from every link a network manager gave one, each round, keeping the link's
own domains. **While none answers, a network's own servers answer every name** (ADR 0688, changing ADR 0247 §9, §13
and §16): the guard gives that route back to those links, never to a link `route` routed, so a network's sign-in
page loads before the private network's tunnel is up. Both are the guard's, written in the milestone part
[resolver-fallback](50-milestones/resolver-fallback.md); the guard's third duty, `uplink-names`, follows.
**`uplink-names`** (ADR 0687 §2, changing ADR 0247 §10 and §16) gives the link that carries the default route a few
host names to answer through its own servers, beside its own domains: the network manager's connectivity check's
host, so the check resolves through the network it tests. It names no link and no servers, is served on the mesh
only, and the guard applies the names every round to whichever link carries the default route then. Its lines are
design 08's milestone part [sign-in-page](08-milestones/sign-in-page.md), §2 and §5 to §10.
## 4. An outside write
@@ -132,6 +144,8 @@ resolver's hold, and is therefore raised. A VPN that tells resolved its link's D
- The client's search domains route full names. They do not complete short ones.
- A name no mesh resolver answers takes the file's total wait to fail on that machine: 6 s, about 4 s longer
than before (ADR 0678).
- While the mesh's resolvers are silent, the network's servers answer every name, a mesh name too, normally with
"not found" (ADR 0688). A link slower than `answer-within` is taken for silent; the value is raised for it.
- resolved down is no names on that machine. Its `unit` health, and the node-engine's names check against
the address the file lists, say so.
- resolved should take no servers from the resolver file, because its own are configured. The live test
@@ -145,6 +159,8 @@ resolver's hold, and is therefore raised. A VPN that tells resolved its link's D
| the own resolver module's manifest test: its file names one server, the machine's private address, with §2's options | ADR 0247 §6, ADR 0678 §1 |
| the node-engine's test that composes the catalog's own resolver on a machine reads the options from the catalog's template, not a literal, and its names check bounds each ask by the file's `timeout:` | ADR 0678 §1 |
| the test over every uplink's resolver file: both mesh resolvers, `timeout:1 attempts:2` | ADR 0678 §2, design 08 §2 |
| the module's unit tests of the fallback: the network's servers answer while the mesh's resolvers are silent; a network joined meanwhile keeps its default route; an answer, a name not found included, answers and silence does not; while the mesh answers only its resolvers are a default route (resolver-fallback §6) | ADR 0688 |
| live, on the laptop: the guard's journal shows both turns on a network with a sign-in page (resolver-fallback §7) | ADR 0688 |
| live, on a machine holding `node-resolver`: at the next silence of its first mesh resolver no Go build step there fails on `i/o timeout` (milestone resolver-wait §5); a timed lookup waits for a read of resolved's own server switches (§4) | ADR 0678 §1 |
| each phase's *Done when* below | ADR 0247 |
@@ -156,6 +172,8 @@ resolver's hold, and is therefore raised. A VPN that tells resolved its link's D
| B — the resolver | mesh-catalog `systemd-resolved` | the module, its guard and verbs | its tests pass; assigned to every machine that runs the VPN client's module, each one's file names its own address, `routes` answers |
| C — the adapter | mesh-catalog `forticlient` | `split-dns` required; the adapter | its tests pass; on the laptop, connected, a company name and a mesh name both resolve and no rewrite stays raised |
| resolver-wait | mesh-catalog `systemd-resolved`, `mesh-host` | design 50 §2's options (ADR 0678), under issue 1748; its part is [`50-milestones/resolver-wait.md`](50-milestones/resolver-wait.md) | its tests pass; *How it is checked*'s live row holds |
| resolver-fallback | mesh-catalog `systemd-resolved` | the network's own servers answer while the mesh's resolvers are silent (ADR 0688), under issue 1981, built as the module's version 0.2; its part is [`50-milestones/resolver-fallback.md`](50-milestones/resolver-fallback.md) | delivered to the laptop 2026-11-24; *How it is checked*'s live row held that day |
| sign-in-page (design 08's) | mesh-networking, mesh-catalog `systemd-resolved` | `uplink-names` and the guard's new duty (ADR 0687 §2), under issue 960; its part is [`08-milestones/sign-in-page.md`](08-milestones/sign-in-page.md) | its tests pass; design 08's acceptance test 1 holds |
## As built