|
|
|
@@ -29,26 +29,30 @@ part of the sign-in reaction calls it (ADR 0689 §3). The purpose and the whole
|
|
|
|
|
[§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).
|
|
|
|
|
issue 960 (§5 to §10, on the machines where the resolver runs) and issue 935 (§3, §29).
|
|
|
|
|
|
|
|
|
|
**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 §10,
|
|
|
|
|
`networkmanager` §11 to §24, `systemd-networkd` §25, `i3` §26 to §28, the copy of the retired words §29). **Ordering
|
|
|
|
|
`networkmanager` §11 to §27, `systemd-networkd` §28, `i3` §29 to §31, the copy of the retired words §32). **Ordering
|
|
|
|
|
edges**, which the delivery plan derives: the three seat definitions before any holder that serves or publishes what
|
|
|
|
|
they add, and before any module whose `invokes` names it (the manifest validator refuses a name no definition holds,
|
|
|
|
|
design 26); `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).
|
|
|
|
|
events, and nothing in mesh-delivery's grants part changes (R-M3). The grant covers its own node's subjects only: an
|
|
|
|
|
event subject with a part `<node>` is granted to that node's account alone (the seat definition's `Subject` rule,
|
|
|
|
|
ADR 0363 §2; R2-10).
|
|
|
|
|
|
|
|
|
|
**What exists today, and its fate.** `node-uplink`'s definition gives the read verbs `resolvers` and `links` and no
|
|
|
|
|
events; `networkmanager`'s `uplink-tools` answers those two and watches nothing: both stay. `node-resolver` has
|
|
|
|
|
`routes`, `route` and `unroute`, served by `systemd-resolved`, whose guard keeps the resolver file and runs ADR 0688's
|
|
|
|
|
fallback (design 50 resolver-fallback): all stay. `node-display-session` has `reload`, `workspaces` and `windows`,
|
|
|
|
|
served by `i3`, whose own tool `i3_exec` runs a command line in the session: all stay, and `open` is the narrow verb
|
|
|
|
|
beside `i3_exec` that issue 935 asks for. **Going back one version** (U-N7): `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.
|
|
|
|
|
beside `i3_exec` that issue 935 asks for. **Going back one version** (U-N7, R2-8), in reverse of the ordering edges,
|
|
|
|
|
the holders first and the seat definitions after them: `systemd-resolved` back leaves the names on the link until the
|
|
|
|
|
network manager changes that link's domains, and nothing else; `networkmanager` back removes the watcher's process and
|
|
|
|
|
its state folder (§12) with the resource, publishes no more and calls nothing; `i3` back drops `open`; nothing else
|
|
|
|
|
stays behind.
|
|
|
|
|
|
|
|
|
|
## The seats' definitions
|
|
|
|
|
|
|
|
|
@@ -68,20 +72,21 @@ watch and the reaction, and calls nothing; `i3` back drops `open`; nothing else
|
|
|
|
|
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 (§20).
|
|
|
|
|
`link` and `network` are empty only for a `no-longer-asked` said with no connection active (§21).
|
|
|
|
|
|
|
|
|
|
**Both are optional for a holder**: the definition marks neither as required and the manifest validator asks no
|
|
|
|
|
holder to publish them; a holder whose network manager cannot tell a sign-in page announces neither and says so in
|
|
|
|
|
its README (§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
|
|
|
|
|
its README (§28). **No part of the mesh consumes them** (ADR 0689 §2, §3); they are the mesh's record, read with the
|
|
|
|
|
bus module's tool `nats.nats_stream_messages` filtered to `mesh.seat.node-uplink.event.*.<node>` (R2-6), and a
|
|
|
|
|
reader takes their time from `at`, never from arrival. The conformance fixtures
|
|
|
|
|
hold one value per event, with documentation names only (§33). Checked by the indexer's generator test over the
|
|
|
|
|
definition and `networkmanager`'s whole-module test matching a published event, subject and body, against a
|
|
|
|
|
fixture (design 26).
|
|
|
|
|
2. **`node-resolver` is defined whole, with the verb `uplink-names`** (ADR 0687 §2, changing ADR 0247 §10; ADR 0613
|
|
|
|
|
§1, §3; ADR 0636 §5). In `mesh-connectivity-contracts` the definition holds `routes`, `route` and `unroute` with
|
|
|
|
|
every field today's definition holds, their `replaces` unchanged (U-M3), and `uplink-names`, required of every
|
|
|
|
|
holder as the seat's other verbs are (ADR 0247 §15). Its callers are the modules whose manifest `invokes` it
|
|
|
|
|
(`networkmanager`, §11) and the operator, through the mesh MCP server (U-N6).
|
|
|
|
|
(`networkmanager`, §13) and the operator, through the mesh MCP server (U-N6).
|
|
|
|
|
- input `{names}`: a list of 0 to 8 host names, each a name of 1 to 253 bytes in letters, digits, hyphens and
|
|
|
|
|
dots, taken lower-cased. The list replaces what was given before; an empty list takes every name away.
|
|
|
|
|
- answer `{names, link, set_at}`: the names now given, the link they are answered over now (empty when no link
|
|
|
|
@@ -101,14 +106,16 @@ watch and the reaction, and calls nothing; `i3` back drops `open`; nothing else
|
|
|
|
|
the modules whose manifest `invokes` it and the operator, through the mesh MCP server; the sign-in reaction is not one (ADR 0689 §3;
|
|
|
|
|
U-N6).
|
|
|
|
|
- input `{address}`: the address to open.
|
|
|
|
|
- answer `{address, program, command, started}`: the address as handed on (§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
|
|
|
|
|
- answer `{address, program, command, started}`: the address as handed on (the encoding below), the desktop entry
|
|
|
|
|
that opened it (as `browser.desktop`), the first word of that entry's command, and `started`: `opened` when the
|
|
|
|
|
opener ended well within its bound, `opening` when it still ran at its bound (§29). `program` and `command` are
|
|
|
|
|
given only once the opener started (H-M2).
|
|
|
|
|
- refused, naming the reason: a scheme other than `http` or `https` (named), no scheme (a file path), no host, an
|
|
|
|
|
address over 2048 bytes once encoded, no graphical session running, no default program for the scheme, the
|
|
|
|
|
opener ending with a failure (its status named). 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).
|
|
|
|
|
opener ending with a failure (its status named).
|
|
|
|
|
- **the encoding** (U-M2, R2-9): RFC 3986's unreserved characters (letters, digits, `-`, `.`, `_`, `~`) and `:`
|
|
|
|
|
`/` `?` `#` `[` `]` `@` `&` `=` `+` `%` are kept as they are; every other character is percent-encoded, as the
|
|
|
|
|
bytes of its UTF-8 form. Nothing is refused for a character, and no shell reads the address.
|
|
|
|
|
4. **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.
|
|
|
|
@@ -128,7 +135,7 @@ watch and the reaction, and calls nothing; `i3` back drops `open`; nothing else
|
|
|
|
|
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 starts (§11).
|
|
|
|
|
its starts (§13).
|
|
|
|
|
7. **The guard gives the names to the link that carries the default route, every round** (ADR 0687 §2, changing
|
|
|
|
|
ADR 0247 §16). In each round of its pass over links (ADR 0688's round as built: every 5 s, or after
|
|
|
|
|
`answer-within` when that is longer; design 50 resolver-fallback §2; S-N6), the guard reads the names file and
|
|
|
|
@@ -144,10 +151,12 @@ watch and the reaction, and calls nothing; `i3` back drops `open`; nothing else
|
|
|
|
|
`/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.
|
|
|
|
|
refuses the names, the guard writes the refusal into `refused` and to its journal once per change of the refusal,
|
|
|
|
|
never every round (H-N6, R2-13). It writes a journal line when the link changes and when the names change, never
|
|
|
|
|
every round. **Its state for `routes`** (S-N5, R2-2): at each of ADR 0688's two turns it writes
|
|
|
|
|
`/run/node-resolver/fallback.json`, root's, mode 0644, `{silent, since}`, which `routes` reads. The guard makes
|
|
|
|
|
`/run/node-resolver` (root, 0755) when it is missing; it goes at the next boot, and the guard's first round writes
|
|
|
|
|
the file again.
|
|
|
|
|
9. **Its tests** (ADR 0687, *How it is checked*, clause 2), unit, within the module's budget: the names given are
|
|
|
|
|
answered over the link that carries the default route, and over the new one after that route moves to another
|
|
|
|
|
link, the old one losing them; the link keeps its search domains; a guard restarted with an applied file takes
|
|
|
|
@@ -160,70 +169,101 @@ watch and the reaction, and calls nothing; `i3` back drops `open`; nothing else
|
|
|
|
|
|
|
|
|
|
## The uplink's holder reacts on its own machine (`networkmanager`)
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
11. **`networkmanager` runs in two parts: a watcher started at boot without the bus, and its bundle** (ADR 0689 §1,
|
|
|
|
|
§2; R2-1). The tool runner starts no bundle before it has reached the bus, so after a cold boot behind a sign-in
|
|
|
|
|
page a bundle never runs; the part that must work without the bus may not need the bus to start. So:
|
|
|
|
|
- **the watcher** is a process resource of `networkmanager`, as the zfs module's watch is: its `name`
|
|
|
|
|
`networkmanager-sign-in`, `artifact` `tools`, `run` `./uplink-tools watch`, `user` `${machine:account}`,
|
|
|
|
|
started by the machine's service manager at boot and kept running, needing no bus; its `health` of kind `tool`,
|
|
|
|
|
with `tool` `uplink_health`, `interval` 60s, `timeout` 20s, `looks` 2 and `grace` 60s, as zfs-watch's. It
|
|
|
|
|
watches the rating (§14), opens the page and tells the person (§15 to §19), and keeps the events (§20, §21).
|
|
|
|
|
- **the bundle** `uplink-tools`, in the tool runner once it reaches the bus, as today: it answers `resolvers` and
|
|
|
|
|
`links`, serves the tools and the health tool (§23), publishes the kept events (§20) and calls `uplink-names`
|
|
|
|
|
(§13). It reads the watcher's state only through the module's own local state (§12).
|
|
|
|
|
|
|
|
|
|
ADR 0689 names `uplink-tools` as the reacting part; the record-writer adds a progressive insight naming the
|
|
|
|
|
watcher process, and the decision is unchanged (R2-1).
|
|
|
|
|
12. **The two parts share the module's own local state, in one folder** (R2-1). `networkmanager` declares the
|
|
|
|
|
directory `${machine:account-home}/.local/state/mesh/networkmanager` (owner `${machine:account}`, mode 0700) as
|
|
|
|
|
its resource; the node-engine removes it, and all it holds, when the module leaves. In it:
|
|
|
|
|
- `watch.sock` (mode 0600), the watcher's socket, made at its start: one JSON line asked, one answered. `state`
|
|
|
|
|
answers the watcher's state (§23's read); `rating-again` makes the watcher subscribe again, read the rating now
|
|
|
|
|
and act on it as on a change.
|
|
|
|
|
- `check-address`, written whole by the watcher (beside and renamed over) at its start and whenever the network
|
|
|
|
|
manager's check address changes: the address on one line, empty when there is none.
|
|
|
|
|
- `pending/`, the kept events: one file each, `<sequence>.json` with a ten-digit sequence, holding `{subject,
|
|
|
|
|
message_id, body}`, written whole by the watcher and deleted by the bundle once the bus acknowledged it (§20).
|
|
|
|
|
- `names.json`, written whole by the bundle: its last `uplink-names` call, `{names, result, at}`, `result` one of
|
|
|
|
|
`ok`, `no holder` or the failure.
|
|
|
|
|
|
|
|
|
|
Nothing else reads or writes the folder.
|
|
|
|
|
13. **The bundle gives the resolver the check's host name** (ADR 0687 §2; R-N6, H-M3, S-M1, R2-5). At its start,
|
|
|
|
|
when `check-address` changes (a file event of the kernel), when its bus connection comes back (the connection's
|
|
|
|
|
reconnect, an event), and when it hears the node seat `node-engine`'s event `running` for a module that holds
|
|
|
|
|
`node-resolver` on its own node and is running, it calls `<node>/node-resolver.uplink-names` directly with the
|
|
|
|
|
check address's host name, or with an empty list when the address is empty, and writes `names.json`. Its manifest
|
|
|
|
|
`consumes` `node-engine.running`; it drops every event whose subject names another node; which module holds
|
|
|
|
|
`node-resolver` on its node it reads with `mesh-module-assigner.assignments` (its node, `seats`) when such an event
|
|
|
|
|
comes. An answer that no holder serves the verb is no failure: 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`
|
|
|
|
|
comes. An answer that no holder serves the verb is no failure: `result` is `no holder`, and the machine's resolver
|
|
|
|
|
file then lists the mesh's resolvers, through which the check already resolves. A failed call is written to its
|
|
|
|
|
journal with the reason, makes its health unhealthy (§23) and is asked again at the next such moment or by its
|
|
|
|
|
tool (§23), never on a timer (the lead's answer of 2026-11-24: events first). Its manifest `invokes`
|
|
|
|
|
`seat:mesh-module-assigner.assignments` 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
|
|
|
|
|
14. **The watcher watches the network manager's rating as it changes** (ADR 0687 §3; R2-1). It hears the network
|
|
|
|
|
manager's `PropertiesChanged` signal on the system bus for `Connectivity`, `PrimaryConnection`,
|
|
|
|
|
`ConnectivityCheckEnabled`, `ConnectivityCheckAvailable` and `ConnectivityCheckUri`, an event the network manager
|
|
|
|
|
sends; nothing runs on a timer, and the check itself stays the network manager's. 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
|
|
|
|
|
sends; nothing runs on a timer, and the check itself stays the network manager's. When its system bus connection
|
|
|
|
|
drops, it writes that to its journal and subscribes again when the system bus's socket comes back (a file event
|
|
|
|
|
of the kernel on the socket's folder), then reads the rating and acts on it as on a change; `rating-again` (§12)
|
|
|
|
|
does the same at once. It runs as `${machine:account}`, which on a machine with a graphical session is the
|
|
|
|
|
person's (ADR 0689 §1).
|
|
|
|
|
15. **It opens the page and tells the person, at three moments** (ADR 0689 §1, §4). With the check on: when the
|
|
|
|
|
rating becomes PORTAL on the active connection; at its own start when the rating already is PORTAL; and when the
|
|
|
|
|
person's graphical session starts (§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
|
|
|
|
|
person's graphical session starts (§17) while the present rating is PORTAL. Each time it opens the check address
|
|
|
|
|
(§18) and shows the notification (§19). **Once per ask**: it acts again only after the rating has left PORTAL, a
|
|
|
|
|
session's start and its own restart excepted; after its own restart while PORTAL it opens the page once more,
|
|
|
|
|
which is wanted, because what needs the person is shown (H-N7). It reads the present rating at a session's start,
|
|
|
|
|
never a kept event (ADR 0443 §3). With no graphical session found (§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
|
|
|
|
|
never a kept event (ADR 0443 §3). With no graphical session found (§16) it opens and shows nothing and still keeps
|
|
|
|
|
the events (ADR 0689 §4).
|
|
|
|
|
16. **How it finds the person's session** (ADR 0689, *Consequences*). Over the system bus it asks logind for the
|
|
|
|
|
sessions of its own account (`ListSessions`, then each session's `Type`, `Remote`, `State` and the user's
|
|
|
|
|
`RuntimePath`): the session is the one of type `x11` or `wayland`, not remote, whose state is `active` or
|
|
|
|
|
`online`. Its session bus is `unix:path=<RuntimePath>/bus`. Its display is in the user manager's environment,
|
|
|
|
|
read over that bus (the systemd user manager's `Environment`), into which the session's start block imports
|
|
|
|
|
`DISPLAY`, `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
|
|
|
|
|
17. **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
|
|
|
|
|
`RuntimePath` (a Wayland socket), for at most 60 s, a stated constant (R2-7); past that it writes to its journal
|
|
|
|
|
that the session's start was not acted on. Then §15's third moment applies.
|
|
|
|
|
18. **How it opens the page** (ADR 0689 §1; R2-3). It runs, with the session bus and `XDG_RUNTIME_DIR` of §16 in its
|
|
|
|
|
environment, `systemd-run --user --collect --quiet --wait -- xdg-open <address>`, the address as one argument and
|
|
|
|
|
never through a shell, so the browser runs under the person's user manager in their session and outlives the
|
|
|
|
|
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):
|
|
|
|
|
watcher. Before it, it asks `xdg-mime query default x-scheme-handler/<scheme>` the same way for the program. If
|
|
|
|
|
the run ends within 10 s, a stated constant (R2-7), its status decides: success is `opened`, failure is a failed
|
|
|
|
|
open naming the status; if it still runs at 10 s, the page is `opening` and the run is left to go on. The open runs
|
|
|
|
|
beside the watch: rating changes heard meanwhile are handled after it, in the order they came (R2-3).
|
|
|
|
|
19. **How it tells the person** (ADR 0689 §1). It calls `org.freedesktop.Notifications.Notify` on the session bus
|
|
|
|
|
of §16 (the desktop notification service), `app_name` `mesh`, only after §18's outcome (H-M2):
|
|
|
|
|
- opened: summary "This network asks you to sign in", body "<network>: its sign-in page is open in <program>.";
|
|
|
|
|
- opening: the same summary, body "<network>: its sign-in page is opening in <program>.";
|
|
|
|
|
- failed: the same summary with urgency critical, body "<network>: the page did not open (<reason>); open
|
|
|
|
|
<address> in a browser.": failure is loud;
|
|
|
|
|
- the rating leaving PORTAL for FULL, with a session: summary "The network is open", body "<network>: signed in.";
|
|
|
|
|
any other end shows nothing.
|
|
|
|
|
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:
|
|
|
|
|
20. **The events are kept by the watcher and published by the bundle, in order** (ADR 0689 §2; H-M5, R2-1, R2-11).
|
|
|
|
|
The watcher writes each event of §21 into `pending/` (§12) at its change, with `at` the time of the change and a
|
|
|
|
|
`message_id` of `<node>.<event>.<sequence>` made once. It keeps at most 256 files, a stated constant (R2-7); past
|
|
|
|
|
that it deletes the oldest with a journal line naming it. The bundle publishes them in sequence order on the
|
|
|
|
|
seat's subject (§1), each with its `message_id` as the bus's message id, so a second publish of one is dropped by
|
|
|
|
|
the bus as a duplicate, awaiting the stream's acknowledgement, and deletes each file once acknowledged; it does so
|
|
|
|
|
at its start, at each file event of the kernel on `pending/` and when its bus connection comes back. A publish
|
|
|
|
|
refused or unacknowledged stays in `pending/`, is written to its journal and counted (§23), and is published again
|
|
|
|
|
at the next such moment. The kept events survive a restart of either part and of the machine.
|
|
|
|
|
21. **Which events it keeps** (ADR 0687 §3, which ADR 0689 §1 keeps for how it rates). The watcher keeps in memory
|
|
|
|
|
whether a sign-in is asked, and for which connection:
|
|
|
|
|
- the rating becomes PORTAL while the check is on and a connection is active, and no sign-in is asked: one
|
|
|
|
|
`sign-in-asked` for that connection, `address` the check address; while it stays PORTAL nothing more;
|
|
|
|
|
- a sign-in is asked and the rating becomes FULL: `sign-in-ended` with `signed-in`;
|
|
|
|
@@ -233,70 +273,88 @@ watch and the reaction, and calls nothing; `i3` back drops `open`; nothing else
|
|
|
|
|
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.
|
|
|
|
|
- with the check off (not enabled, or not available) it keeps nothing, at its start and after.
|
|
|
|
|
|
|
|
|
|
`link` is the interface of the active connection's first device, `network` its connection's name, `at` the
|
|
|
|
|
machine's clock at the change. A check address that is not http or https publishes nothing, opens nothing and is
|
|
|
|
|
machine's clock at the change. A check address that is not http or https keeps nothing, opens nothing and is
|
|
|
|
|
written to its journal.
|
|
|
|
|
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,
|
|
|
|
|
22. **Their journals** (H-N8): the watcher writes a line for every rating change heard (the old rating, the new one,
|
|
|
|
|
the connection's name), every page opened, every open that failed, every notification shown, every session start
|
|
|
|
|
and what it did, every event kept and every one dropped past the bound; the bundle a line for every publish sent,
|
|
|
|
|
refused or left waiting, and every `uplink-names` call with its result.
|
|
|
|
|
23. **Its tools and its health** (H-M1, S-M3, R2-12; ADR 0240), served by the bundle:
|
|
|
|
|
- `uplink_sign_in` (reads): from the watcher's `state` (§12): whether it is subscribed, the last rating heard and
|
|
|
|
|
when, the ask open now (network, link, since), the asks opened and ended since its start, the last open with
|
|
|
|
|
its outcome and time, the last notification, the last session start with what it did; from the folder: the
|
|
|
|
|
events waiting in `pending/` and the publishes refused since the bundle's start; from `names.json`: the last
|
|
|
|
|
`uplink-names` call; and, where a holder of `node-resolver` runs on its node, the resolver's refusal of the
|
|
|
|
|
names as `<node>/node-resolver.routes` answers it (`uplink_names.refused`).
|
|
|
|
|
- `uplink_names_again` (acts): calls `uplink-names` now as §13 does.
|
|
|
|
|
- `uplink_rating_again` (acts): asks the watcher `rating-again` (§12).
|
|
|
|
|
- `uplink_health` (the health tool of §11): unhealthy while the watcher's socket does not answer, while the
|
|
|
|
|
watcher is not subscribed, or while the last `uplink-names` call stands failed, naming which; `no holder` is
|
|
|
|
|
healthy.
|
|
|
|
|
24. **Its README** says the two parts and their shared folder, that the watcher opens the page and tells the person on
|
|
|
|
|
its own machine without the bus, how it finds the session (§16, §17), that it keeps and the bundle publishes the
|
|
|
|
|
two events from the network manager's own rating, that with the check switched off it neither opens nor keeps,
|
|
|
|
|
and that the bundle calls `uplink-names` where a holder of `node-resolver` runs (ADR 0687 §2, §3; ADR 0689). Its
|
|
|
|
|
review reads it.
|
|
|
|
|
25. **Its tests** (ADR 0687 and ADR 0689, *How it is checked*), unit, with the network manager's D-Bus signals,
|
|
|
|
|
logind, the user manager, the opener and the notification service stood in, and no bus: PORTAL at a join opens
|
|
|
|
|
the page and shows one notification; PORTAL at 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
|
|
|
|
|
the page and shows one notification; PORTAL at the watcher's start does the same; PORTAL to FULL shows that the
|
|
|
|
|
network is open; PORTAL to any other rating shows nothing; a second PORTAL without a leave does nothing; a session
|
|
|
|
|
that starts while the rating is PORTAL opens the page once, one that starts while it is not opens nothing; with no
|
|
|
|
|
session it opens and shows nothing and still keeps the events; an opener that fails gives the critical
|
|
|
|
|
notification; a rating change heard during an open is handled after it; each line of §21; nothing with the check
|
|
|
|
|
off; no timer; the system bus dropping and coming back makes the watcher subscribe again, and so does
|
|
|
|
|
`rating-again`; past 256 kept events the oldest is dropped with a journal line; the bundle publishes the kept
|
|
|
|
|
events in order with their message ids and deletes each on acknowledgement, keeps a refused one and publishes it
|
|
|
|
|
at the next moment; `uplink-names` called at the bundle's start, on a changed `check-address`, when the bus
|
|
|
|
|
connection comes back and on a running holder of `node-resolver`, `no holder` recorded as healthy; the health
|
|
|
|
|
tool unhealthy for a watcher not subscribed and for a failed `uplink-names` call; each tool. **One integration
|
|
|
|
|
test** starts `networkmanager` whole, watcher and bundle, with no bus: it sees the page opened by the stood-in
|
|
|
|
|
opener; then it starts a real bus holding `node-uplink`'s definition and a stand-in holder of `node-resolver`,
|
|
|
|
|
and sees the kept events published in order with the times of their changes and `uplink-names` called (R-M4,
|
|
|
|
|
R2-1).
|
|
|
|
|
26. **Nothing names a network in it** (ADR 0687 §6): §33 holds for its code, configuration and tests.
|
|
|
|
|
27. **Its manifest** declares the process of §11, the directory of §12, the `consumes` and `invokes` of §13, and
|
|
|
|
|
keeps its claim of `node-uplink`, its package, its configuration file and its service as today.
|
|
|
|
|
28. **`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 display session's verb (`i3`)
|
|
|
|
|
|
|
|
|
|
26. **`i3` serves `open`** (ADR 0687 §4; H-M2, U-M2). Its claim of `node-display-session` serves `open` beside its
|
|
|
|
|
29. **`i3` serves `open`** (ADR 0687 §4; H-M2, U-M2). Its claim of `node-display-session` serves `open` beside its
|
|
|
|
|
three verbs, as the tool `node-display-session.open`. It checks the address by §3's refusals and percent-encodes
|
|
|
|
|
it by §3; it finds the session's bus and runtime directory with its `desktop` package, asks `xdg-mime query
|
|
|
|
|
it by §3's encoding; 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
|
|
|
|
|
through i3's IPC `exec`, which hands a shell a line. The run's outcome is decided as §18 decides it (10 s), and the
|
|
|
|
|
answer names the program only once it started. It reads the command from the entry's `Exec` line in the XDG data
|
|
|
|
|
directories. With no graphical session it refuses, as its other tools answer. Its manifest declares the package
|
|
|
|
|
`xdg-utils` present (ADR 0303 §2).
|
|
|
|
|
27. **`i3` hears nothing of the uplink** (ADR 0689 §3, replacing ADR 0687 §5). It consumes no `node-uplink` event
|
|
|
|
|
`xdg-utils` present (ADR 0303 §2). It writes one journal line per call, the address, opened or refused, and the
|
|
|
|
|
program or the reason (R2-14).
|
|
|
|
|
30. **`i3` hears nothing of the uplink** (ADR 0689 §3, replacing ADR 0687 §5). It consumes no `node-uplink` event
|
|
|
|
|
and reads no kept event at its session's start, so ADR 0443 §3 holds untouched. Checked by the milestone's code
|
|
|
|
|
review: no consumer of `node-uplink`'s events and no read of kept events in `i3`.
|
|
|
|
|
28. **Its README and tests** (ADR 0687, *How it is checked*, clause 4). The README says the verb, its refusals and
|
|
|
|
|
31. **Its README and tests** (ADR 0687, *How it is checked*, clause 4). The README says the verb, its refusals and
|
|
|
|
|
the encoding. Unit tests, with the session and the opener stood in: `open` refuses every scheme but http and
|
|
|
|
|
https, a file path and each other refusal of §3; an address holding `'`, `;`, a space and `$(` is handed on
|
|
|
|
|
percent-encoded as one argument and no shell reads it; an opener that fails is refused with its status and names
|
|
|
|
|
https, a file path and each other refusal of §3; an address holding `'`, `;`, a space, `$(`, `,` and `"` is handed on
|
|
|
|
|
percent-encoded as one argument and no shell reads it (R2-9); an opener that fails is refused with its status and names
|
|
|
|
|
no program; one that ends well answers `opened` with the program; one still running at its bound answers
|
|
|
|
|
`opening`. The live tests are the main file's acceptance test 3.
|
|
|
|
|
|
|
|
|
|
## Words and checks
|
|
|
|
|
|
|
|
|
|
29. **The catalog's copy of the retired words gains "captive portal"** (ADR 0687, *Consequences*: the glossary's
|
|
|
|
|
32. **The catalog's copy of the retired words gains "captive portal"** (ADR 0687, *Consequences*: the glossary's
|
|
|
|
|
word **sign-in page**). mesh-catalog's `retired-words` lists it, so hq's words test agrees with the copy, and no
|
|
|
|
|
tool or seat verb description in the change uses it.
|
|
|
|
|
30. **Nothing names a network** (ADR 0687 §6). Code, configuration and tests name no network, sign-in page or
|
|
|
|
|
33. **Nothing names a network** (ADR 0687 §6). Code, configuration and tests name no network, sign-in page or
|
|
|
|
|
employer: the tests use documentation names only (`example.net`, a network named `guest-example`). The milestone's
|
|
|
|
|
code review searches the change's code, configuration and tests for a wifi name or a host outside the
|
|
|
|
|
documentation domains, and finds none.
|
|
|
|
|
31. **The test budget** (R-N7). The prepare records each touched module's unit and integration test counts against
|
|
|
|
|
34. **The test budget** (R-N7). The prepare records each touched module's unit and integration test counts against
|
|
|
|
|
its budget in the milestone file, and the review reads them.
|
|
|
|
|
32. **The live cases** are the main file's acceptance tests 1 to 3. Issue 960 is resolved once the first holds;
|
|
|
|
|
35. **The live cases** are the main file's acceptance tests 1 to 3. Issue 960 is resolved once the first holds;
|
|
|
|
|
issue 935 once the third does; if the second shows the rating LIMITED instead of PORTAL, ADR 0687 is amended,
|
|
|
|
|
tracked by issue 960.
|
|
|
|
|