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