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.
This commit is contained in:
jochen
2026-11-24 20:33:28 +01:00
parent 11688f3a3a
commit d2f8565565
7 changed files with 360 additions and 201 deletions
+3 -3
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, 0687.
**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
@@ -1156,8 +1156,8 @@ it should not. **Recorded by** the controller. **Upstream of** Provisioning and
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
node seat `node-uplink` says it with its events `sign-in-asked` and `sign-in-ended`, and the holder of
`node-display-session` opens it in the person's browser. In this sense "portal" and "login page" are not used
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
+42 -39
View File
@@ -26,6 +26,7 @@ code:
- 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"
@@ -994,43 +995,50 @@ silent assignment rendering byte-identically to today.
## 7 — A network's sign-in page
*2026-11-24, ADR 0687.* 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.
*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).
```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]
up -->|sign-in-asked, sign-in-ended| fam[(node-uplink.events, 7 days)]
fam --> ds[node-display-session's holder]
ds -->|open| browser[the person's browser]
ds -->|send| note[node-notifier]
```
- **The uplink says it** (ADR 0687 §1, §3): the node seat `node-uplink` gains the events `sign-in-asked` and
`sign-in-ended`, in the family `node-uplink.events`, published by its holder from the network manager's own rating
as it changes, never on a timer. Both are optional for a holder.
- **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).
- **The session opens it** (ADR 0687 §4, §5): the node seat `node-display-session` gains the verb `open`, an http
or https address in the person's default browser; its holder hears `sign-in-asked` for its own machine, opens the
page and tells the person why through `node-notifier`, and tells them again when the network is open. A session
that starts while the machine is still behind the page opens it then (issue 935, design 42).
(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.
**Acceptance tests** (ADR 0687, *How it is checked*):
**Acceptance tests** (ADR 0687 and ADR 0689, *How it is checked*):
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, 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, and after signing in a second one
says the network is open. If the journal shows LIMITED instead, ADR 0687's assumption does not hold: the record
is amended, tracked by issue 960.
3. *Unit and integration:* the milestone part's tests pass within each module's budget.
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
@@ -1158,7 +1166,8 @@ The list is worth having in one place, because it is most of the argument:
| milestone | what it builds | part | state |
|---|---|---|---|
| sign-in-page | a network's sign-in page opens by itself (ADR 0687), closing issues 960 and 935 | [08-milestones/sign-in-page.md](08-milestones/sign-in-page.md) | designed |
| 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*).
@@ -1192,22 +1201,16 @@ of their own at their next amendment (playbook 02, *The shape of a design*).
## The hub adopts the predecessor's tunnel
*2026-09-23, ADR 0105.*
*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).
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 bus is NATS
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
*2026-09-23, ADR 0106. Architecture to be written
before code; this section names the shape only.*
Every link the mesh has rides NATS subjects; durability is JetStream's; a module's account is a
NATS account with permissions derived from `emits`/`consumes`, declared as configuration the node-engine
writes and the server reloads. The sdk's contract is unchanged. The adopted AMQP broker stays as
the predecessor's compatibility broker until its last client is gone. Built in the lab beside the
migration; cut over in one switch-over after the core; the person's client is designed on it.
@@ -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,48 @@
---
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).
+222 -150
View File
@@ -6,10 +6,12 @@ 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 0688"
- "ADR 0208"
- "ADR 0443"
- "ADR 0636"
- "ADR 0613"
- "ADR 0303"
@@ -18,56 +20,68 @@ decisions:
# 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` says so as an event; the holder of the node seat `node-display-session` on that machine
opens the network's sign-in page in the person's default browser and tells them why through `node-notifier`; and 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). The purpose and the whole shape are the main file's,
[§7](../08-connectivity.md#7--a-networks-sign-in-page); the session's side is placed in design 42's phase 2. This part
holds every line the milestone builds, cited as "design 08 sign-in-page §n". It closes issue 960 (§5 to §10, on the
machines where the resolver runs) and issue 935 (§3, §16).
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, §26).
**Where.** Three repositories, one delivery group with one check: mesh-networking (the contracts module
`mesh-connectivity-contracts`: §1, §2), mesh-contracts (§3) and mesh-catalog (`systemd-resolved` §5 to §9,
`networkmanager` §10 to §14, `systemd-networkd` §15, `i3` §16 to §21, the copy of the retired words §22). **Ordering
`mesh-connectivity-contracts`: §1, §2), mesh-contracts (§3) and mesh-catalog (`systemd-resolved` §5 to §10,
`networkmanager` §11 to §24, `systemd-networkd` §25, `i3` §26 to §28, the copy of the retired words §29). **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` or `consumes` names it (the manifest validator refuses a name no
definition holds, design 26); `systemd-resolved` serving `uplink-names` before `networkmanager` calling it (a served
verb); `networkmanager` publishing before `i3` hears (an event; `i3` loses nothing if it comes first, §19).
they add, and before any module whose `invokes` names it (the manifest validator refuses a name no definition holds,
design 26); `systemd-resolved` serving `uplink-names` before `networkmanager` calls it (a served verb). **No new
grant**: the grants part already grants every holder the publish of its held seats' event subjects (mesh-sdk's
`EmitSeat`, design 47 G A-10, §276, §498), so `networkmanager`'s claim of `node-uplink` is its grant to publish §1's
events, and nothing in mesh-delivery's grants part changes (R-M3).
**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 and are written into the
definition as they answer today. `node-resolver` has `routes`, `route` and `unroute`, served by `systemd-resolved`:
they stay. `node-display-session` has `reload`, `workspaces` and `windows`, served by `i3`, whose own tool `i3_exec`
runs any command line in the session: all stay, and `open` is the narrow verb beside `i3_exec` that issue 935 asks for.
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): `systemd-resolved` back leaves the names
on the link until the network manager changes that link's domains, and nothing else; `networkmanager` back stops the
watch and the reaction, and calls nothing; `i3` back drops `open`; nothing else stays behind.
## The seats' definitions
1. **`node-uplink` is defined whole, with two events in the family `node-uplink.events`** (ADR 0687 §1; ADR 0613
§1, §3: a seat whose contract changes is defined whole in that change; 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 holds the verbs `resolvers` and `links` with their inputs and answers as `networkmanager` answers them
today, 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, granted to that node's
account alone. Why the node is in the subject: a hearer filters its own machine's events by subject, and the start
read of §19 takes the last message of each subject. The bodies, each a JSON Schema with every field required:
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 to open), `at` (when, RFC 3339 in UTC to the second).
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 (§12).
`link` and `network` are empty only for a `no-longer-asked` said with no connection active (§20).
**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 (§15). The conformance fixtures hold one value per event, with documentation names only (§23). Checked
by the indexer's generator test over the definition and the holder's whole-module test matching a published event,
subject and body, against a fixture (design 26).
its README (§25). **No part of the mesh consumes them** (ADR 0689 §2, §3); they are the mesh's record, read through
the stream by whoever asks, and a reader takes their time from `at`, never from arrival. The conformance fixtures
hold one value per event, with documentation names only (§30). 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` as
`systemd-resolved` answers them today, and `uplink-names`, required of every holder as the seat's other verbs are
(ADR 0247 §15):
§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`, §11) 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
@@ -76,18 +90,25 @@ runs any command line in the session: all stay, and `open` is the narrow verb be
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}`, so the names and the link they are on are read through the
seat. Why 8: the network manager has one check address; 8 leaves room and keeps the guard's round small.
`routes`'s answer gains `uplink_names` `{names, link, refused}`, read from what resolved holds for that link, not
from the file, 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.
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 `open`, required of every holder so that any holder of the display session serves it the same way (ADR
0687 §4: i3 or sway):
§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), and `open`, 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}`: the address opened, the desktop entry that opened it (as
`browser.desktop`), and the first word of that entry's command.
- answer `{address, program, command, started}`: the address as handed on (§26's encoding), 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 (§26). `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, a character outside the address characters of RFC 3986 (unreserved, reserved and `%`),
no graphical session running, no default program for the scheme.
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). Every character outside RFC 3986's unreserved set and the
separators an address needs is percent-encoded, never refused and never read by a shell (U-M2).
4. **No layout of the three seats stays in mesh-sdk** (ADR 0613 §3, §5). A type mesh-sdk still holds for one of
these seats moves into the seat's contract in this milestone, with every importer, and mesh-sdk keeps no copy; the
prepare step names each one it finds, or that it found none.
@@ -95,136 +116,187 @@ runs any command line in the session: all stay, and `open` is the narrow verb be
## 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 the operator account, a write escalating
with `sudo -n` as `route` does. 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).
`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).
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, whole (written beside and renamed
over), empty for an empty list. The module declares the directory `/var/lib/node-resolver` (root, 0755) as its
resource, so the node-engine removes it, the file with it, when the module leaves; nothing else deletes it. Why a
`/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 module
declares the directory `/var/lib/node-resolver` (root, 0755) as its resource, so the node-engine removes it, both
files with it, when the module leaves; the names stay until then, or until a call with an empty list (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
own starts (§10).
across a restart of resolved, of the guard and of the machine, and the caller states the names again at each of
its starts (§11).
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 (every 5 s, or after `answer-within` when that is longer: the
round of ADR 0688 §2, design 50 resolver-fallback §2), the guard
reads the file and finds the link carrying the default route: the kernel's IPv4 default route with the lowest
metric, or the IPv6 one when there is no IPv4 default, never the private network's interface and never a link
`route` routed. 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 it takes the names off any
other link it gave them to. 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. It writes a
journal line when the link it gives the names to changes and when the names change, never every round.
8. **Its tests** (ADR 0687, *How it is checked*, clause 2), unit, within the module's budget: the names given are
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: the kernel's IPv4 default route with the lowest metric, or the IPv6 one
when there is no IPv4 default, never the private network's interface and never a link `route` routed. 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. 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.
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 to its journal and into `refused` (H-N6). It writes a journal line
when the link changes and when the names change, never every round. **Its state for `routes`** (S-N5): at each of
ADR 0688's two turns it writes `/run/node-resolver/fallback.json`, root's, mode 0644, `{silent, since}`, which
`routes` reads; gone at the next boot, written again at the guard's first round.
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 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); each refusal of §2;
`routes` answers `uplink_names`.
9. **Its README** says the verb, the file, the guard's new duty and that `uplink-names` sets only how resolved answers
names over a link, never the link.
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); each refusal of §2; `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 and that `uplink-names`
sets only how resolved answers names over a link, never the link.
## The uplink says it (`networkmanager`)
## The uplink's holder reacts on its own machine (`networkmanager`)
10. **`uplink-tools` gives the resolver its check's host name** (ADR 0687 §2). At its start, and whenever it hears
the node seat `node-engine`'s event `running` for its own node (so after a holder of `node-resolver` is assigned
or restarted there), it reads the network manager's check address (`ConnectivityCheckUri`, over D-Bus) and asks
`mesh-module-assigner.assignments` with its own node and `seats`; where `node-resolver` is held on its node, it
calls `<node>/node-resolver.uplink-names` with the address's host name, or with an empty list when the address is
empty. It calls again when the address changes (§11's signal). A failed call is written to its journal with the
reason and asked again at the next such event, never on a timer (the lead's answer of 2026-11-24: events first,
nothing waits on a timer); meanwhile the names of the last call stand in the resolver's file (§6). Where no holder
of `node-resolver` runs it calls nothing: the machine's resolver file lists the mesh's resolvers, through which the
check already resolves. Its manifest `consumes` `node-engine.running`, filtered to its own node's subjects, and
`invokes` `seat:mesh-module-assigner.assignments` and `seat:node-resolver.uplink-names`.
11. **`uplink-tools` watches the network manager's rating as it changes** (ADR 0687 §3). It hears the network
11. **`uplink-tools` gives the resolver its check's host name** (ADR 0687 §2; R-N6, H-M3, S-M1). At its start, when
the check address changes (§12's signal), 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. 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: it is recorded as "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 (§22) and is asked again at the next such event or by
its tool (§22), never on a timer (the lead's answer of 2026-11-24: events first). Its manifest `invokes`
`seat:mesh-module-assigner.assignments` and `seat:node-resolver.uplink-names`. The prepare reads whether the
node-engine says `running` for a module it restarted, and writes it in the milestone file.
12. **`uplink-tools` watches the network manager's rating as it changes** (ADR 0687 §3). 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. It writes every rating change it
hears to its journal: the old rating, the new one, the connection's name. It runs for as long as the tool runner
runs its bundle, as `i3`'s watcher does.
12. **When it publishes** (ADR 0687 §3). It keeps in memory whether a sign-in is asked, and for which connection:
sends; nothing runs on a timer, and the check itself stays the network manager's. It runs for as long as the tool
runner runs its bundle, as `${machine:account}`, which on a machine with a graphical session is the person's
(ADR 0689 §1).
13. **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 (§15) while the present rating is PORTAL. Each time it opens the check address
(§16) and shows the notification (§17). **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 (§14) it opens and shows nothing and still
publishes (ADR 0689 §4).
14. **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`, `WAYLAND_DISPLAY` and `XAUTHORITY` (ADR 0208 §17). No such session, or no display named there, is no
session. It reads no other module's files or code (ADR 0689 Considered Options).
15. **How it hears a session start.** 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; past that it writes to its journal that the session's start
was not acted on. Then §13's third moment applies.
16. **How it opens the page** (ADR 0689 §1). It runs, with the session bus and `XDG_RUNTIME_DIR` of §14 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
tool runner (a child of the tool runner would be stopped with its service). 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, 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.
17. **How it tells the person** (ADR 0689 §1). It calls `org.freedesktop.Notifications.Notify` on the session bus
of §14 (the desktop notification service), `app_name` `mesh`, only after §16'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.
18. **Its journal** (H-N8): 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 publish that waits and every
one sent.
19. **It publishes the events, acknowledged and in order** (ADR 0689 §2; H-M5). Each event is published on the
stream with its acknowledgement awaited. A publish refused or unacknowledged because the bus is out of reach is
kept in memory, in order, up to 256 events, and the kept ones are published in order, each with the `at` of its
change, when the bus connection says it is back (the connection's reconnect, an event); past 256 the oldest is
dropped with a journal line naming it. Every refusal is written to the journal. Kept events are lost with the
process; its next start says the present rating again (§20).
20. **When it publishes** (ADR 0687 §3, which ADR 0689 §1 keeps for how it rates). It 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`. Why the switch-off ends it: a kept `sign-in-asked` must never
stand for a page that is no longer asked (§19 reads the latest one);
- **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;
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 publishes 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. A check address that is not http or https publishes nothing and is written to its journal.
13. **Its README** says that it announces the two events from the network manager's own rating, that with the network
manager's check switched off it announces neither, and that it calls `uplink-names` where a holder of
`node-resolver` runs on its machine and nowhere else (ADR 0687 §2, §3). Its review reads it.
14. **Its tests** (ADR 0687, *How it is checked*, clauses 2 and 3), unit, with a stand-in of the network manager's
D-Bus signals: each line of §12, one `sign-in-asked` per entry into PORTAL carrying the check address; nothing
with the check off; no timer; `uplink-names` called at its start, on a changed address and on its node's
`running` event, a failed call asked again at the next such event, and not called where no holder of
`node-resolver` runs.
15. **`systemd-networkd`'s README says it announces neither event** (ADR 0687 §1): systemd-networkd cannot tell a
sign-in page. Its review reads it.
machine's clock at the change. A check address that is not http or https publishes nothing, opens nothing and is
written to its journal.
21. **Its README** says that it opens the page and tells the person on its own machine without the bus, how it finds
the session (§14, §15), that it announces the two events from the network manager's own rating, that with the
check switched off it neither opens nor announces, and that it calls `uplink-names` where a holder of
`node-resolver` runs (ADR 0687 §2, §3; ADR 0689). Its review reads it.
22. **Its tools and its health** (H-M1, S-M3; ADR 0240). `uplink_sign_in` (reads): whether the watcher 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 `uplink-names` call
with its result (`ok`, `no holder`, or the failure) and time, and the publishes waiting. `uplink_names_again`
(acts): calls `uplink-names` now as §11 does. `uplink_rating_again` (acts): reads the rating now and acts on it as
on a change (§13, §20). Its health is unhealthy while the watcher is not subscribed or the last `uplink-names`
call stands failed, naming which; `no holder` is healthy.
23. **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 its 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 publishes; an opener that fails gives the critical notification;
each line of §20; nothing with the check off; no timer; a publish refused while the bus is out of reach is kept
and published in order once the bus is back, each with its change's time, and one past the bound writes a
journal line; `uplink-names` called at its start, on a changed address and on a running holder of
`node-resolver`, `no holder` recorded as healthy; each tool. **One integration test** starts `uplink-tools` whole
against a real bus holding `node-uplink`'s definition and a stand-in holder of `node-resolver`: the watcher, the
publication with its acknowledgement, the kept queue across a bus restart and the call of `uplink-names` (R-M4).
24. **Nothing names a network in it** (ADR 0687 §6): §30 holds for its code, configuration and tests.
25. **`systemd-networkd`'s README says it announces neither event and opens nothing** (ADR 0687 §1): systemd-networkd
cannot tell a sign-in page. Its review reads it.
## The session opens it (`i3`)
## The display session's verb (`i3`)
16. **`i3` serves `open`** (ADR 0687 §4). 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 first; then it asks
`xdg-mime query default x-scheme-handler/<scheme>` in the session's environment (the words its `desktop` package
reads) for the person's default program, refusing when there is none; then it starts `xdg-open` with the address,
single-quoted, as i3's child through i3's IPC `exec`, so the browser runs as the person in their session, as
`i3_exec` starts a program. It answers §3's `{address, program, command}`, the command read 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). Why §3 refuses so much: any caller can hand
`open` an address, and the only address characters it passes to i3's command line are ones a shell does not read.
17. **`i3` opens the sign-in page when it hears `sign-in-asked` for its own machine** (ADR 0687 §5). Its manifest
`consumes` `node-uplink.sign-in-asked` and `node-uplink.sign-in-ended`, filtered to its own node's subjects, and
`invokes` `seat:node-notifier.send`, which it calls on its own node. On `sign-in-asked` with `at` after the
machine's last boot (the kernel's boot time) and a graphical session running, it opens the address through its
own `open` and sends `{summary: "This network asks you to sign in", body: "<network>: its sign-in page is open in
<program>.", app_name: "mesh", category: "network"}`. When `open` refuses, it sends the same summary with urgency
`critical` and the body "<network>: the page did not open (<reason>); open <address> in a browser.": failure is
loud. One published before the boot, or heard with no session running, it acknowledges and acts on in no other
way; §19 opens the page when a session starts. It remembers the stream sequence of the last `sign-in-asked` it
acted on and never acts on one twice.
18. **`i3` says when the network is open** (ADR 0687 §5). On `sign-in-ended` with `signed-in`, published after the
machine's last boot, with a session running, it sends `{summary: "The network is open", body: "<network>: signed
in.", app_name: "mesh", category: "network"}`; with `left` or `no-longer-asked` it says nothing.
19. **`i3` reads the latest kept sign-in event when the person's session starts** (ADR 0687 §5). It hears logind's
`SessionNew` signal on the system bus; for a session of the operator account of type `x11`, it waits for that
session's i3 IPC socket to answer, woken by the kernel's file events on the folder i3 makes it in, for at most 60
s, and past that writes to its journal that the start read was skipped. Then it reads the family: an ordered
consumer on the shared events stream, filtered to `sign-in-asked.<node>` and `sign-in-ended.<node>` of its own
node, delivering the last message of each subject; the later of the two by stream sequence is the latest. When
that is a `sign-in-asked` with `at` after the machine's last boot, it opens the page and tells the person as §17
does; otherwise nothing. It asks no verb. Its account is granted that read with its `consumes` (the grants part);
where the grants part does not derive it yet, that is built in this milestone.
20. **Its README** says the verb `open` and its refusals, the sign-in reaction of §17 and §18, the start read and the
package.
21. **Its tests** (ADR 0687, *How it is checked*, clauses 4 and 5), unit, with i3's IPC, logind and the opener
stood in: `open` refuses every scheme but http and https, a file path and each other refusal of §3, and answers
the program; a `sign-in-asked` for its own machine opens the address once and sends one notification, one for
another machine does nothing; `sign-in-ended` with `signed-in` sends one, with `left` or `no-longer-asked`
nothing; a session that starts while the latest kept event for its machine is a `sign-in-asked` published since
the boot opens the page, and one whose latest is from before the boot, or is a `sign-in-ended`, opens nothing.
One integration test starts `i3-tools` whole against a real bus holding `node-uplink`'s definition, with the
session stood in, and proves §17 and §19 on published events (how-work-is-done: a change to how a module runs
carries one).
26. **`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; it finds the session's bus and runtime directory with its `desktop` package, 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 §16 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).
27. **`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`.
28. **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; 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`. The live tests are the main file's acceptance test 3.
## Words and checks
22. **The catalog's copy of the retired words gains "captive portal"** (ADR 0687, *Consequences*: the glossary's
29. **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.
23. **Nothing names a network** (ADR 0687 §6). Code, configuration and tests name no network, sign-in page or
30. **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.
24. **The live cases** are the main file's acceptance tests 1 and 2. Issue 960 is resolved once the first holds;
issue 935 once the second does; if the second shows the rating LIMITED instead of PORTAL, ADR 0687 is amended,
31. **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.
32. **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.
@@ -4,6 +4,7 @@ status: in-progress
code: [mesh-catalog, mesh-controller, mesh-host]
updated: 2026-11-24
decisions:
- "ADR 0689"
- "ADR 0687"
- "ADR 0369"
- "ADR 0303"
@@ -242,7 +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 side of a network's sign-in page: the verb `open` and the page opened when the uplink asks (ADR 0687) | [08-milestones/sign-in-page.md](08-milestones/sign-in-page.md) §16 to §21 | 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, §26 to §28 | 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*).
@@ -313,13 +314,12 @@ 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, §5, changing ADR 0208 §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`. `i3` also hears
the uplink's `sign-in-asked` for its own machine, opens the network's sign-in page and tells the person why through
`node-notifier`, says again when the network is open, and at the start of the person's session opens a page still
asked since the machine's boot. Every line it builds is in design 08's milestone part
[sign-in-page](08-milestones/sign-in-page.md), §16 to §21; the shape is design 08's §7.
**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 §26 to §28.
## Phase 3 — one machine model
@@ -107,7 +107,7 @@ page loads before the private network's tunnel is up. Both are the guard's, writ
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 §9.
design 08's milestone part [sign-in-page](08-milestones/sign-in-page.md), §2 and §5 to §10.
## 4. An outside write