From 6557aca750486979d59b3826f4b7ba9b281b986c Mon Sep 17 00:00:00 2001 From: jochen Date: Sat, 26 Sep 2026 23:45:47 +0200 Subject: [PATCH] A machine's uplink is a seat (hq ADR 0117) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the-uplink joins the closed set as a node seat delivering nothing. Its holder is the module for the machine's own network manager, and keeps that manager from contradicting the mesh — the resolver file left to resolv-conf, mesh0 left alone — without ever declaring a link. Held per machine, so a machine running two managers is refused at assignment rather than found by its resolver being rewritten. The count test moves to fifteen; one test holds the seat's shape. --- internal/catalogue/seats.go | 7 +++++++ internal/catalogue/seats_test.go | 24 ++++++++++++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/internal/catalogue/seats.go b/internal/catalogue/seats.go index 2475e06..dfcadc9 100644 --- a/internal/catalogue/seats.go +++ b/internal/catalogue/seats.go @@ -47,6 +47,13 @@ var seats = []Seat{ {Name: "the-private-network", Scope: ScopeNode, Decision: "novox/hq ADR 0110"}, {Name: "the-resolver-configuration", Scope: ScopeNode, Decision: "novox/hq ADR 0110"}, {Name: "the-showcase", Scope: ScopeNode, Decision: "novox/hq ADR 0110"}, + // The program that manages the machine's own network. It delivers nothing: its holder only + // keeps the manager and the mesh from contradicting each other — the resolver file left to the + // mesh, the private network's interface left alone — and never declares a link, an address or + // a wireless network, because the link is the only channel a fix could arrive on. A seat + // rather than a condition in the resolver's module, so a machine running two managers is + // refused at assignment instead of found by the resolver being rewritten (novox/hq ADR 0117). + {Name: "the-uplink", Scope: ScopeNode, Decision: "novox/hq ADR 0117"}, } // Seats is every seat the mesh defines, in reading order. diff --git a/internal/catalogue/seats_test.go b/internal/catalogue/seats_test.go index 96cdfc2..f1c2087 100644 --- a/internal/catalogue/seats_test.go +++ b/internal/catalogue/seats_test.go @@ -44,12 +44,32 @@ func TestTheSeatsAreAClosedSetAndEachNamesItsDecision(t *testing.T) { delivered[s.Delivers] = s.Name } } - if len(Seats()) != 14 { - t.Errorf("the mesh defines %d seats rather than 14; the set is closed, so a change here is "+ + if len(Seats()) != 15 { + t.Errorf("the mesh defines %d seats rather than 15; the set is closed, so a change here is "+ "a decision (novox/hq ADR 0110): %s", len(Seats()), seatNames()) } } +// novox/hq ADR 0117: a machine's uplink is a seat, held per machine, and delivers nothing. +// +// **Nothing, because nothing may be required of it.** A holder only keeps its network manager from +// contradicting the mesh; a requirement resolving to it would make the manager the mesh's answer +// for something, and the manager's link is the one thing the mesh must never be able to break. +func TestTheUplinkIsANodeSeatThatDeliversNothing(t *testing.T) { + seat, known := SeatNamed("the-uplink") + if !known { + t.Fatalf("the uplink is not a seat; the seats are: %s", seatNames()) + } + if seat.Scope != ScopeNode || seat.Delivers != "" || seat.Decision != "novox/hq ADR 0117" { + t.Fatalf("the uplink is %+v, not a node seat delivering nothing by ADR 0117", seat) + } + // And a manager's module can hold it without providing anything. + raw := []byte(`{"module":"networkmanager","version":"1","claims":[{"name":"the-uplink","scope":"node"}]}`) + if _, err := ParseManifest(raw); err != nil { + t.Fatalf("a network manager's module could not hold the uplink: %v", err) + } +} + func claimed(claims string) []byte { return []byte(`{"module":"thing","version":"1","provides":[{"name":"npm-package-registry","scope":"mesh"}],"claims":` + claims + `}`) }