Commit Graph
3420 Commits
Author SHA1 Message Date
jschoubben e83a7adb2d nats: gofmt the import order of removal.go
Builds: design 47 H2 H-A-615
2026-11-25 18:55:32 +01:00
jschoubben ce2455d189 gate: AC-G4a and AC-G4b are steps of TestAGateWholeTakesAMergeCallAndWatchesTheHeadsOverARealBus
Builds: design 47 H2 H-A-597, H-A-609, H-A-617
2026-11-25 18:55:23 +01:00
jschoubben 6f7311820c nats: AC-G15b is a case of TestTheBusModuleRunsWhole, a recreate entering through the warrant
Builds: design 47 H2 H-A-686
2026-11-25 18:52:59 +01:00
jschoubben b15c220822 nats: a recreate's ask takes its words from the per-object lines, recreated's before names the held cap
Builds: design 47 H2 H-A-686 (3), H-A-740
2026-11-25 18:52:08 +01:00
jschoubben cda35e6c42 nats: narrow compares a consumer's filter with the entry's consumes in one form
Builds: design 47 H2 H-A-615, H-A-621
2026-11-25 18:51:23 +01:00
jschoubben 89e5eef3c5 nats: mark twin-current-hours runtime, the tool reads it as its configuration at each call
Builds: design 47 H2 H-A-472 third addendum, ADR 0348 §5
2026-11-25 17:48:44 +01:00
jschoubben feb0120330 G15b recreated-before-after: the event recreated says what each object held before and after, its why a sentence
Builds: design 47 H2 H-A-740, H-A-686 (3)
2026-11-25 17:37:29 +01:00
jschoubben 82abaa03ac G18 unanswered-said-at-start: the gate says again every act owed with no outcome at its start and when it hears the forge bridge's module running
Builds: design 47 G §165, H-A-712 (3) (hq 7c5c3860), H-A-717 (DMC-15, DQ-51) (hq eed55e62)
2026-11-25 17:34:25 +01:00
jschoubben 8aef19934e G15 recreate-in-place: a recreate reads the account's room first, changes each object in place where the bus takes it, makes empty only a retention that changes, stops at a refused change; the ask names each object
Builds: design 47 H2 H-A-686 (1) (2) (3), H-A-634 (3), H-A-706 (DQ-42) (hq 95cf2052, 999e6525, 543e6963)
2026-11-25 17:33:19 +01:00
jschoubben 5de68de0a0 G13 indexes-kept: the gate keeps its ledger indexes by a watcher, builds an index behind again at its start before the pass of the ends, and raises index-behind and record-end-unwritten
Builds: design 47 H2 H-A-690 (2) (3) (4), H-A-634 (2) (hq 95cf2052, 999e6525); H-A-706 (DMC-13) (hq 543e6963)
2026-11-25 17:29:28 +01:00
jschoubben aa1a59c6bc G12 records-tools: gate_records_expiring and gate_records_follow_ends, gate_records says the ledger's ended-days, keeping days and soonest expires
Builds: design 47 H2 H-A-634 (7), H-A-689 (2) (hq 999e6525, 95cf2052)
2026-11-25 17:27:17 +01:00
jschoubben e580f54a4b G16 fill-names-object: full and full-cleared carry the fill of the object judged and its part, and show answers each object
The fill pass keeps the object of an entry with the highest share and says full and full-cleared (the body's
v 2) with a fill naming that object, its part (history, state, index <name> or snapshot of a ledger), its
messages, bytes and cap; their why and the condition's text name it. mesh-broker.show's fill keeps the sum
and gains objects, one item of the definition ObjectFill each.

Builds: design 47 H2 H-A-634 (9), H-A-636, H-A-687 (3), H-A-706 (DQ-41), H-A-717 (DQ-50)
2026-11-25 17:22:15 +01:00
jschoubben cdae0e0339 G19 started-decoded-by-contract: the gate reads pipeline-started with the contract's decoder
A pipeline-started of the earlier form, whose movers carry fields the new StartedMover leaves out, is
taken as the new form is: a field this reader does not know is left unread, never refused.

Builds: design 47 H2 H-A-709 (3)
2026-11-25 17:20:47 +01:00
jschoubben c055c82bd8 G11 records-listed-by-watch: the gate lists its records from a watch of its ledger, writes no month list, sweeps nothing, and removes the month lists standing at its start
The gate keeps the key and opening of every record from a watch of its ledger's record/> (stdio.WatchLedger):
the current states at its start, then each change; a key gone is dropped from every list, and an event for
it is said in the journal and changes nothing. An open writes no month list and sweeps and refuses nothing;
List, months, heldIn, Sweep, Retention and DefaultRecordRetention go; a month list a watch of held/> hands
with a state at the start is removed with mesh/ledger.remove, and no forget is applied (H-A-721).

Builds: design 47 H2 H-A-634 (2), (5), (6), H-A-706 (DMC-13), H-A-712 (1), H-A-721
2026-11-25 17:20:29 +01:00
jschoubben b1b7940f4f G10 records-end-with-their-record: an end writes each mover's and act's end after the head's, the ledger gives its own ended-days, record-retention goes
The ledger records asks max-mib 3072 and its own configuration max-age-days 90 and ended-days 30; record,
mover and act name ends-with ended, mover and act gain the field ended and the operation end. A record's
end writes the head's end first, then each mover's and act's with the head's ended; a reopening empties
theirs first, then the head's; a late running moves every one's end alike. The setting record-retention
leaves the manifest, its settings file and its code; the words of room name ended-days.

Builds: design 47 H2 H-A-634 (2), H-A-688, H-A-691, H-A-721
2026-11-25 17:17:34 +01:00
jschoubben c6f478aee9 G4 late-running: a late running moves a record's end only from a machine present at it, a record says its end count, a mover-added is counted and a higher pipeline end reopens the record
On fa345c83's RanAfterEnd: a running from a machine away at the end, or a repeated one, moves nothing;
a first running from a present machine moves ended and delivery-time and says record-ended again with ends
one higher (an id of its own). The record head gains ends and pipeline-ends (the end operation's fields);
a pipeline-ended of a count above 1 and higher than pipeline-ends reopens the record; the gate consumes
mover-added and counts the mover in the record its pipeline key names.

Builds: design 47 H2 H-A-585, H-A-597, H-A-609 (2), H-A-617, H-A-645, H-A-648, H-A-728
2026-11-25 17:15:18 +01:00
jschoubben 2bf3426efb mesh-delivery-gate: apply a running heard after its record ended to that record, so its delivery time is kept
The gate hears the assigner's pipeline-wanted and the node-engine seat's running on consumers no ordering
joins, so a record can end before the last running of its movers is applied, and that delivery's time was
lost: an ended record took no running (H-A-585, issue 721 note 11).

- StepConsumer.apply applies a running that names a mover of an ended record to it (the mover marked running
  on that machine), and Records.RanAfterEnd writes ended and, for a record that ended with every mover
  running, delivery-time again from it when it is later than the end, keeping the class the movers' entries
  kept when they opened. record-ended is not said again; one journal line names the record, the module, the
  machine and both times. A running offered again after that write was refused writes it then.
- TestWhatIsHeardWhileAnEventIsWrittenWaitsUntilItIsApplied gains the row "pipeline-wanted before the
  running", its end's write refused once; TestAGateWhole's record of 126 movers, ended with none running,
  takes a running after its end with its delivery time and the journal line. Both fail without the change.

Fixes: issue 721 note 11
Builds: design 47 H2 H-A-585, §810, H-A-394 (3); G §144
2026-11-25 17:10:35 +01:00
jschoubben 436e65f0c4 G5 consumer-narrow: the tool nats_consumer_narrow removes some filters of a live consumer, keeping its position
It judges the durable's module by name as nats_consumer_remove does, reads the module's trunk fingerprint from
the seat mesh-catalog's modules and its entry's consumes, refuses a subject the entry consumes, every filter
and a subject not filtered, and records a hand act before the consumer's create-or-update call.

Builds: design 47 H2 H-A-600, H-A-615, H-A-621, H-A-657
2026-11-25 17:10:12 +01:00
jschoubben af36f1a617 G14 ledger-lifetimes-planned: a ledger giving ended-days is planned with lifetimes, its snapshot store refuses when full, its binding says ended-days once the bus holds them
The bus module plans a ledger whose own configuration gives ended-days with a lifetime per key on its
state and index buckets and a lifetime per message on its snapshot store, reads a held stream's lifetime
back, plans every ledger's snapshot store to refuse when full, names ended-days in the binding only once
every object that asks a lifetime holds one, and says created again when the binding it would say differs
from the one it last said (Made.Said).

Builds: design 47 H2 H-A-634 (3), H-A-636, H-A-685 (1) (2), H-A-687 (1) (5)
2026-11-25 17:07:17 +01:00
jochen cd17899328 networkmanager: the uplink-names moments test waits on each call, not on the scheduler
The test changed check-address while the bundle, running beside it, had not yet read it
for its start's call. On a temporary directory in memory with one CPU, as a build step
runs, nothing yields before the test's write, so the start's call read the empty address
every time (pipeline main.517, asks mwvdrpjpbb0cf9 and mwvdrpjpb6c9b9); on a disk the
fsync yielded and it passed. The stood-in resolver now says each uplink-names call, and
the test changes the address only after the call before it.

Builds: design 08 sign-in-page §13, §25
2026-11-25 01:37:04 +01:00
mesh-tools 5153e5fdc2 Merge pull request 'networkmanager opens a network's sign-in page on its own machine (design 08 sign-in-page)' (#755) from feat/sign-in-page-uplink into main 2026-11-25 00:20:12 +00:00
mesh-tools 1712612729 Merge pull request 'i3 serves node-display-session.open (design 08 sign-in-page, issue 935)' (#754) from feat/sign-in-page-i3 into main 2026-11-25 00:20:10 +00:00
jochen ac50980ba1 systemd-resolved: the names file write refuses naming its bound on the deadline (review r2 (3))
Past WriteUplinkNamesBound (15 s) the refusal read the bare signal the
deadline killed the process with ("install failed: signal: killed"); it
now names the bound and says the file was left as it was, for either
step (install or mv).

Builds: design 08 sign-in-page §6, C-8
2026-11-25 01:18:09 +01:00
jochen d859380669 systemd-resolved: the machine's socket answers routes with outside_writes too (review r2 (5))
It answered an empty outside_writes while the bus answered the kept
history; the socket now reads the guard's own history (its own history
file, the same the bus's tools() reads in production), so both answer
the same (§5, DQ-5).

Builds: design 08 sign-in-page §5, §9, DQ-5
2026-11-25 01:17:55 +01:00
jochen 8f86aedeae systemd-resolved: checkUnknownPaths knows exactly its own files (review r2 (4))
It treated the verb's own uplink-names.new as unknown and accepted any
bare *.tmp; it now knows exactly uplink-names, uplink-names.new,
uplink-names.applied and uplink-names.applied.tmp, as §6 and §8 name
them, and nothing else.

Builds: design 08 sign-in-page §6, §8, C-7
2026-11-25 01:17:26 +01:00
jochen 9a3149df88 i3: test the opener's no-kill run with pipes, never a real sleep
Code review round 2 (C-5 follow-up). openerRun's core is now runWithoutKilling(ctx,
*exec.Cmd), callable directly by a test with a command of its own. The test's child
blocks reading its stdin (a pipe held open past the bound); after confirming
TimedOut, the test closes the pipe to unblock it, then waits on the child's own
end (a byte written to an extra file just before it exits, read with a plain
blocking read) instead of sleeping and polling for a marker file. A kill at the
bound now leaves that read empty, which the test checked by reintroducing the old
signal and watching it fail.

Builds: design 08 sign-in-page §3, §29
2026-11-25 01:13:18 +01:00
jochen 8ca052a0c7 networkmanager: the whole test's runtime publishes only what the membership lists
The stand-in tool runner refuses a subject the module's membership does not list, as
the runtime's mayPublish does: the module's held seat's own-node events, read from its
manifest and the nodeuplink contract (MembershipFor's rule at mesh-delivery ef8dd120).
Another node's subject is refused and stays kept.

Builds: design 08 sign-in-page §4a, §25; lead answer C-1
2026-11-25 01:13:13 +01:00
jochen 349ef43a36 networkmanager: a watcher refused at its start by a bus that is there exits
When the first subscribe fails while the system bus's socket is already there, no file
event will make it again: the watcher writes the reason to its journal and exits
non-zero, so its unit shows failing instead of staying active and deaf.

Builds: design 08 sign-in-page §14; lead answer C2-1 (hq f15bc2fd)
2026-11-25 01:12:23 +01:00
jochen a74afe71f3 systemd-resolved: an unknown path in its directory is left and journalled once (review r1 C-7)
The checks/owned check refuses a directory without unknown (ADR 0422 §8).
/var/lib/node-resolver stays, its value "module" (lead answer L-1), not
"program": no other program writes there. The guard looks for a path it
does not know every round and, finding one, leaves it exactly as it is
and says so to the journal once, never every round.

Builds: design 08 sign-in-page §6, C-7
2026-11-24 22:01:21 +01:00
jochen bd6dcdcd0c systemd-resolved: judge "in place" from what resolved holds now (review r1 C-4, note c)
C-4: the guard reads the link's domains fresh with rawDomainsOf before
skipping a round, never trusting its own applied record alone, so a
network manager that rewrites the link's domains, or a restarted
resolved, is found and the names are set again.

note (c): fallback.json's since is the time of the guard's first round,
never the zero time; it moved only on a real turn before, so the first
round's write carried a zero since.

Builds: design 08 sign-in-page §7, §8, C-4
2026-11-24 22:01:01 +01:00
jochen 717f8ec2e5 systemd-resolved: answer with the generated contract's own types (review r1 C-6, C-8)
C-6: import noderesolver (mesh-networking's seat definition) at the zero
version; routes, route, unroute and uplink-names answer with its
RoutesAnswer, RouteAnswer, UnrouteAnswer and UplinkNamesAnswer, never a
map or a parallel struct, and uplink-names' input names is a JSON array
(arrayArg), never a comma- or space-split string.

C-8: the names file write's 15 s is the stated constant
WriteUplinkNamesBound, not an inline literal.

Builds: design 08 sign-in-page §2, §5, §6, §9, DQ-12, C-6, C-8
2026-11-24 22:00:15 +01:00
jochen a94f9f14aa i3: open's own non-killing opener run, the generated answer type, a hand-act on every call
Code review round 1 (C-5, C-6, note (b)):
- open's opener now runs through its own openerRun, which stops waiting at its bound
  without sending any signal, instead of internal/desktop's Exec, which kills the
  command's process group at its deadline; a browser started under the account's
  service manager is never torn down by open's own 10 s bound (DMC-8).
- open imports mesh-contracts' generated nodedisplaysession package at the zero
  version and answers with its OpenAnswer type and Started constants; main.go names
  the tool from its Seat and VerbOpen constants.
- Every call to open, refused or not, writes one act to the log of acts done by hand
  (DQ-7 says "each call"), not only one that reaches the opener.

Builds: design 08 sign-in-page §3, §29
2026-11-24 21:53:45 +01:00
jochen 397e627b02 networkmanager: the watcher's health is its unit's state
The sign-in process is judged by its unit being active, on the machine without the bus,
and NetworkManager's service keeps no state and no health again. The watcher exits
non-zero when it cannot subscribe once the system bus came back, so its unit shows
failing; uplink_health stays a tool that reads and no longer gives the names again.

Builds: design 08 sign-in-page §11, §13, §14, §23, §24, §25, §27; lead answer C-2c (hq 6752a5cf)
2026-11-24 21:53:29 +01:00
jochen 55a90d963e networkmanager: the watcher redials the system bus only at its socket's event
A refused or dropped system bus is dialled again only at the file event that makes its
socket and at rating-again, never because the socket is merely there, so a bus that
refuses the watcher is not dialled in a loop.

Builds: design 08 sign-in-page §14; lead answer note (d) (hq df22a138)
2026-11-24 21:50:49 +01:00
jochen 42b5a7aef3 networkmanager: the watcher socket's bound is a stated constant
Builds: design 08 sign-in-page §12; lead answer C-8 (hq df22a138)
2026-11-24 21:50:00 +01:00
jochen 77602d8586 networkmanager: NetworkManager's unit is checked beside the watcher's tool
NetworkManager's service carries a check of kind unit, still with no state, so the
watcher's tool check stands beside a check of another kind, as zfs's units stand beside
its watch process's tool check.

Builds: design 08 sign-in-page §27; lead answer C-2 (hq df22a138)
2026-11-24 21:49:42 +01:00
jochen ae7d0f874b systemd-resolved: declare the private-interface fact, the literal mesh0 (lead answer L-2)
The fact itself was missing from the manifest (R2's own gap): the guard
and the uplink-names verb's DefaultRouteLink already read
/etc/node-resolver/private-interface, but nothing rendered it. Its
template is the literal "mesh0" per L-2, quick not thorough: the live
interface, named the same way already by netcheck's TunnelInterface and
networkmanager's unmanaged-devices. One value every module reads instead
is L-2's finding, carried outside this milestone.

Builds: design 08 sign-in-page §7, DQ-1
2026-11-24 21:36:32 +01:00
jochen 691ad760d3 systemd-resolved: test that a changed list replaces the old one on the link (issue 960)
R2's acceptance criteria name this case directly: the file's list changes
while the default-route link stays the same, and the guard gives the new
names to that same link without moving them first.

Builds: design 08 sign-in-page §7, §9
2026-11-24 21:34:42 +01:00
jochen 0c2a95aacd systemd-resolved: README names uplink-names, its files and the guard's new duty (issue 960)
Says the verb and its answer, the two new files (uplink-names, its
applied record) and fallback.json, the guard's round over the default-
route link, the sudo -n install / mv -f commands, and that uplink-names
only sets how resolved answers those names over a link, never the link
itself.

Builds: design 08 sign-in-page §10
2026-11-24 21:33:25 +01:00
jochen e20d3c7548 M8 networkmanager: the folder's unknown is the module's
The folder the two parts share says unknown module, so the node-engine does nothing
inside it and the watcher reacts: a path it does not know is left as it is and written
to its journal once per path, at its start and at the file event that makes it; the
README says so.

Builds: design 08 sign-in-page §12, §24, §25, §27; lead answer L-1 (hq 3a3a18a9)
2026-11-24 21:31:51 +01:00
jochen dd35217275 M10 networkmanager: the whole-module test
The watcher, its system bus and desktop stood in, opens the page with no bus; then the
built bundle, played as the tool runner plays it over a real bus with node-uplink's
events and a stand-in holder of node-resolver, publishes the kept events in order
with the times of their changes, each matching the seat's definition, and calls
uplink-names.

Builds: design 08 sign-in-page §1, §25, §26, §33
2026-11-24 21:29:28 +01:00
jochen 20c53a14db M9 networkmanager, systemd-networkd: their READMEs
networkmanager's README says its two parts and their folder, how the watcher opens the
page and finds the session without the bus, the events it keeps and the bundle
publishes, and the uplink-names call; systemd-networkd's says it announces neither
event and opens nothing.

Builds: design 08 sign-in-page §24, §28
2026-11-24 21:26:45 +01:00
jochen 9f5614b35e systemd-resolved: routes answers the uplink's names and the mesh's fallback (issue 960)
routes (bus and the machine socket) gains uplink_names {names, link,
refused}, the applied list's names resolved holds on that link now, never
the file's, and mesh_resolvers {silent, since} from the guard's fallback
state. The guard writes that state at each of ADR 0688's two turns, and
once more at its own first round, since it goes at every boot.

Builds: design 08 sign-in-page §2, §8, §9
2026-11-24 21:26:30 +01:00
jochen dc27af2227 M8 networkmanager: the manifest declares the sign-in parts
The manifest declares the watcher as a process run as the account with uplink_health
as its health, the folder the two parts share (the account's, 0700), the running event
the bundle consumes, the three verbs it invokes and its five tools.

Builds: design 08 sign-in-page §11, §12, §13, §27
2026-11-24 21:26:14 +01:00
jochen 1dec6eb02c M7 networkmanager: its tools and health
The bundle serves uplink_sign_in, uplink_names_again, uplink_rating_again,
uplink_publish_again and uplink_health: the read of the reaction, the three acts the
parts do by themselves, and the watcher process's health, which also gives the names
again where the resolver no longer holds them.

Builds: design 08 sign-in-page §13, §23
2026-11-24 21:25:17 +01:00
jochen 786a23638b M6 networkmanager: the bundle gives the resolver the check's name
The bundle calls this node's node-resolver uplink-names with the check address's host
at its start, at a changed check-address, at its bus connection's return and when this
node's holder of node-resolver runs, reading the holder from the assignments; no holder
is recorded and no failure, a failed call stands failed in names.json until the next
moment.

Builds: design 08 sign-in-page §12, §13, §22
2026-11-24 21:23:56 +01:00
jochen b694c5e2a5 systemd-resolved: the guard applies the uplink's names every round (issue 960)
Each round it finds the link carrying the default route (the lowest-metric
kernel default route that is neither one route routed nor the private
network's interface), gives it the names from uplink-names's file plus
its own search and routing domains, and takes them off the link they were
on before when that differs. What it applied is kept in
uplink-names.applied, read at its own start so a restart never infers
which link to take them off, and a resolved refusal is journalled once
per change, not every round. The guard's own names are left out of
whether a link is judged `route` routed, so the fallback still gives a
link holding only them its default route back while the mesh's resolvers
are silent (ADR 0688 stands).

Builds: design 08 sign-in-page §7, §8
2026-11-24 21:23:06 +01:00
jochen f6646c7254 M5 networkmanager: the bundle publishes the kept events
The bundle publishes what the watcher kept, in order and under each event's own
message id, deleting each once the stream acknowledged it and keeping a refused one
for the next moment: its start, a file event on pending/ and its bus connection's
return. The watcher now names the events by the seat's generated contract.

Builds: design 08 sign-in-page §1, §20, §22
2026-11-24 21:22:01 +01:00
jochen a4169a2325 M4 networkmanager: open the page and tell the person
At a join, at the watcher's start and at a session's start while PORTAL, once per ask,
the watcher opens the check address with systemd-run --user and xdg-open in the
person's session and then shows the notification its outcome calls for, critical when
the open failed; it says when the network is open, and handles what it hears during
an open after it.

Builds: design 08 sign-in-page §15, §18, §19, §22
2026-11-24 21:20:20 +01:00
jochen a40d7fb1c4 systemd-resolved: serve uplink-names, writing the host names file (issue 960)
The verb checks each host name (root, wildcard, trailing dot, a label over
63 bytes, the mesh's own domain or under it, more than 8), writes
/var/lib/node-resolver/uplink-names whole through sudo -n install then
sudo -n mv -f, and answers the names with the link carrying the default
route (the lowest-metric kernel default route that is neither routed nor
the private network's interface) and when they were set.

Builds: design 08 sign-in-page §2, §5, §6
2026-11-24 21:19:35 +01:00