diff --git a/00-META/repos.md b/00-META/repos.md index 1a91c255..5cc66d3c 100644 --- a/00-META/repos.md +++ b/00-META/repos.md @@ -1,6 +1,6 @@ --- status: canonical -updated: 2026-09-24 +updated: 2026-11-24 --- # The Novox repositories @@ -37,6 +37,8 @@ one-for-one — `mesh-catalog`, `mesh-sdk` and `mesh-tools` exist where the tabl | `mesh-sdk` | — | the stable spine modules build against — the tool-serving SDK harness, the messaging/event framework, the contracts and core primitives. Holds nothing per-module and nothing volatile (ADR 0039). | | `mesh-lab` | — | **exists.** The lab — scenario lifecycle, networking, placement. Ships to nobody; runs on a workstation. | | `mesh-delivery` | — | the delivery domain: the parts that build, check and deliver a change by watching and writing keys on the bus, nine modules each whole in it, prefixed `mesh-delivery-` (ADR 0429). Made by the forge module from its config (ADR 0428). | +| `mesh-contracts` | — | **exists.** The contracts module `mesh-contracts`: the definitions of the Core domain's seats and of every domain with no contracts module of its own, `node-display-session` among them (ADR 0636 §5) | +| `mesh-networking` | — | **exists.** The Connectivity domain's modules: its contracts module `mesh-connectivity-contracts` (the definitions of `the-private-network`, `node-uplink` and `node-resolver`) and `mesh-wireguard` (ADR 0636 §6) | Tier 4's shape is open, and deliberately so: see ADR 0019 and research 005. diff --git a/03-DESIGN/01-to-be/08-connectivity.md b/03-DESIGN/01-to-be/08-connectivity.md index 9250aedb..e447ec9c 100644 --- a/03-DESIGN/01-to-be/08-connectivity.md +++ b/03-DESIGN/01-to-be/08-connectivity.md @@ -1165,6 +1165,9 @@ of their own at their next amendment (playbook 02, *The shape of a design*). ## Open +- **A second uplink stays rated limited** (ADR 0687 §2). The check's host name is given to the one link that carries + the default route; a second uplink beside it (a cable beside the wifi) is still rated limited by the network + manager and keeps its route penalty. Tracked as a note on issue 960. - ~~**What happens when the hub is down.**~~ **Resolved** by ADR 0006, together with `06`'s matching question — they were one question. Nothing takes over. WireGuard has no failover, the diff --git a/03-DESIGN/01-to-be/08-milestones/sign-in-page.md b/03-DESIGN/01-to-be/08-milestones/sign-in-page.md index 700d14ae..5d5ff17f 100644 --- a/03-DESIGN/01-to-be/08-milestones/sign-in-page.md +++ b/03-DESIGN/01-to-be/08-milestones/sign-in-page.md @@ -8,6 +8,7 @@ decisions: - "ADR 0687" - "ADR 0117" - "ADR 0247" + - "ADR 0688" - "ADR 0208" - "ADR 0636" - "ADR 0613" @@ -42,7 +43,10 @@ runs any command line in the session: all stay, and `open` is the narrow verb be ## 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). In `mesh-connectivity-contracts` + §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 @@ -102,32 +106,38 @@ runs any command line in the session: all stay, and `open` is the narrow verb be 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). 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, the round issue 1981's fallback runs in), the guard + 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 `~` 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, its addresses or its routes (ADR 0117 §13, §14; ADR 0247 §13): the link stays one with - servers of its own that the guard counts its own, so issue 1981's fallback holds for it as before. It writes a + 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 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 (issue 1981's AC1 still passes); each refusal of §2; + 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. ## The uplink says it (`networkmanager`) -10. **`uplink-tools` gives the resolver its check's host name** (ADR 0687 §2). At its start 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-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 not repeated on a timer; 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 +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-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 manager's `PropertiesChanged` signal on the system bus for `Connectivity`, `PrimaryConnection`, @@ -155,8 +165,9 @@ runs any command line in the session: all stay, and `open` is the narrow verb be `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 and on a changed address, and not called where - no holder of `node-resolver` runs. + 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. diff --git a/03-DESIGN/01-to-be/50-milestones/resolver-fallback.md b/03-DESIGN/01-to-be/50-milestones/resolver-fallback.md new file mode 100644 index 00000000..e1c6b9e2 --- /dev/null +++ b/03-DESIGN/01-to-be/50-milestones/resolver-fallback.md @@ -0,0 +1,53 @@ +--- +layer: to-be +design: 50 +milestone: resolver-fallback +updated: 2026-11-24 +code: [mesh-catalog modules/systemd-resolved] +decisions: + - "ADR 0688" + - "ADR 0247" + - "ADR 0687" +--- + +# Design 50, milestone resolver-fallback — while the mesh's resolvers are silent, a network's own servers answer + +**What it builds.** On a machine where a module holds the node seat `node-resolver`, the resolver's guard gives the +default route for names back to every link a network manager gave servers while none of the mesh's resolvers answers, +and takes it again once one does, so a network's sign-in page loads before the private network's tunnel is up (ADR +0688). The shape is the main file's [§3](../50-split-dns-on-a-machine-with-a-vpn-client.md#3-the-verbs-on-the-mesh-and-on-the-machine). +This part holds every line the milestone built, cited as "design 50 resolver-fallback §n". + +**Where.** One repository: mesh-catalog's `systemd-resolved`, version 0.2 (pull requests 704 and 752), under issue +1981. It was decided by the operator on 2026-11-19, built before ADR 0688 wrote it down, and delivered to the laptop +on 2026-11-24; this part records it as built. Design 08's milestone sign-in-page §7 adds the guard's third duty, +`uplink-names`, in the same round. + +## Lines + +1. **The guard asks the mesh's resolvers itself, every round** (ADR 0688 §1). In each round the guard asks each of + the mesh's resolvers, all at once, a name under the mesh's domain, straight over the network and not through the + machine's own resolver, each within the config value `answer-within` (seconds, default 1), which the module places + as `/etc/node-resolver/answer-within`, not trusted. A resolver that answers anything, a name not found included, + answers; only silence does not. +2. **A round** (ADR 0688 §2) comes every 5 s, or after `answer-within` when that is longer, since the guard waits for + its question before the next round. A value above 5 s, raised for a slow link, makes every round that long. +3. **While one answers, only the mesh's resolvers are a default route for names** (ADR 0688 §3, changing ADR 0247 + §16; ADR 0247 §9, §13). Each round the guard takes the default route for names from every link a network manager + gave one, keeping that link's own domains. +4. **While none answers, those links are a default route again** (ADR 0688 §1, §2, changing ADR 0247 §9 and §13). + The guard gives the default route for names back to every link a network manager gave servers, and a network + joined meanwhile keeps the one it was given; it never gives it to a link the verb `route` routed (a VPN's). Once one + of the mesh's resolvers answers, those links lose it within one round. Which links to give back and take is read + from resolved each round, never kept by the guard, so it holds after the guard restarts. The machine's own + resolver keeps no public fallback servers of its own: the servers that answer meanwhile are the network's. +5. **Both turns are said once each on the guard's journal** (ADR 0688, *Consequences*): "none of the mesh's resolvers + answers; a network's own servers answer every name until one does" and "one of the mesh's resolvers answers + again". The node's network check still says the mesh's names do not resolve while they are silent. +6. **Its tests** (ADR 0688, *How it is checked*), unit, in the module's tools: the network's servers answer while the + mesh's resolvers are silent, a routed link is left alone and a guard started afresh behind a sign-in page gives the + links back (issue 1981's AC1); a network joined while the mesh is silent keeps its default route (AC2); an answer, + a name not found included, answers and silence within `answer-within` does not (AC3); while the mesh answers, only + its resolvers are a default route. +7. **The live case** (issue 1981's AC4): on the laptop, on a network with a sign-in page, the guard's journal shows + both turns of §5. It held on 2026-11-24 (the turn at 15:14:49 and back at 15:16:58, local time). diff --git a/03-DESIGN/01-to-be/50-split-dns-on-a-machine-with-a-vpn-client.md b/03-DESIGN/01-to-be/50-split-dns-on-a-machine-with-a-vpn-client.md index a8c54d42..03ab8b02 100644 --- a/03-DESIGN/01-to-be/50-split-dns-on-a-machine-with-a-vpn-client.md +++ b/03-DESIGN/01-to-be/50-split-dns-on-a-machine-with-a-vpn-client.md @@ -9,6 +9,7 @@ code: - mesh-host internal/compose/resolution, internal/network (the names check of the file, milestone resolver-wait) updated: 2026-11-24 decisions: + - "ADR 0688" - "ADR 0687" - "ADR 0247" - "ADR 0223" @@ -95,8 +96,12 @@ serve the machine's modules, so what a VPN pushed never crosses the bus. On the answers the write standing now, and `route` can also `take` it. The routes are resolved's own per-link state, which resolved forgets when the link goes. The module keeps -no table beside it. A link with servers of its own is never a default route for names: the guard says so -to resolved every 5 s, whoever gave the link its servers. Its routing domains stay its own. +no table beside it. **While one of the mesh's resolvers answers, a link with servers of its own is no default +route for names**: the guard takes it from every link a network manager gave one, each round, keeping the link's +own domains. **While none answers, a network's own servers answer every name** (ADR 0688, changing ADR 0247 §9, §13 +and §16): the guard gives that route back to those links, never to a link `route` routed, so a network's sign-in +page loads before the private network's tunnel is up. Both are the guard's, written in the milestone part +[resolver-fallback](50-milestones/resolver-fallback.md); the guard's third duty, `uplink-names`, follows. **`uplink-names`** (ADR 0687 §2, changing ADR 0247 §10 and §16) gives the link that carries the default route a few host names to answer through its own servers, beside its own domains: the network manager's connectivity check's @@ -139,6 +144,8 @@ resolver's hold, and is therefore raised. A VPN that tells resolved its link's D - The client's search domains route full names. They do not complete short ones. - A name no mesh resolver answers takes the file's total wait to fail on that machine: 6 s, about 4 s longer than before (ADR 0678). +- While the mesh's resolvers are silent, the network's servers answer every name, a mesh name too, normally with + "not found" (ADR 0688). A link slower than `answer-within` is taken for silent; the value is raised for it. - resolved down is no names on that machine. Its `unit` health, and the node-engine's names check against the address the file lists, say so. - resolved should take no servers from the resolver file, because its own are configured. The live test @@ -152,6 +159,8 @@ resolver's hold, and is therefore raised. A VPN that tells resolved its link's D | the own resolver module's manifest test: its file names one server, the machine's private address, with §2's options | ADR 0247 §6, ADR 0678 §1 | | the node-engine's test that composes the catalog's own resolver on a machine reads the options from the catalog's template, not a literal, and its names check bounds each ask by the file's `timeout:` | ADR 0678 §1 | | the test over every uplink's resolver file: both mesh resolvers, `timeout:1 attempts:2` | ADR 0678 §2, design 08 §2 | +| the module's unit tests of the fallback: the network's servers answer while the mesh's resolvers are silent; a network joined meanwhile keeps its default route; an answer, a name not found included, answers and silence does not; while the mesh answers only its resolvers are a default route (resolver-fallback §6) | ADR 0688 | +| live, on the laptop: the guard's journal shows both turns on a network with a sign-in page (resolver-fallback §7) | ADR 0688 | | live, on a machine holding `node-resolver`: at the next silence of its first mesh resolver no Go build step there fails on `i/o timeout` (milestone resolver-wait §5); a timed lookup waits for a read of resolved's own server switches (§4) | ADR 0678 §1 | | each phase's *Done when* below | ADR 0247 | @@ -163,6 +172,7 @@ resolver's hold, and is therefore raised. A VPN that tells resolved its link's D | B — the resolver | mesh-catalog `systemd-resolved` | the module, its guard and verbs | its tests pass; assigned to every machine that runs the VPN client's module, each one's file names its own address, `routes` answers | | C — the adapter | mesh-catalog `forticlient` | `split-dns` required; the adapter | its tests pass; on the laptop, connected, a company name and a mesh name both resolve and no rewrite stays raised | | resolver-wait | mesh-catalog `systemd-resolved`, `mesh-host` | design 50 §2's options (ADR 0678), under issue 1748; its part is [`50-milestones/resolver-wait.md`](50-milestones/resolver-wait.md) | its tests pass; *How it is checked*'s live row holds | +| resolver-fallback | mesh-catalog `systemd-resolved` | the network's own servers answer while the mesh's resolvers are silent (ADR 0688), under issue 1981, built as the module's version 0.2; its part is [`50-milestones/resolver-fallback.md`](50-milestones/resolver-fallback.md) | delivered to the laptop 2026-11-24; *How it is checked*'s live row held that day | | sign-in-page (design 08's) | mesh-networking, mesh-catalog `systemd-resolved` | `uplink-names` and the guard's new duty (ADR 0687 §2), under issue 960; its part is [`08-milestones/sign-in-page.md`](08-milestones/sign-in-page.md) | its tests pass; design 08's acceptance test 1 holds | ## As built