From c3b88b914896b7b4f004d3f92774ee7000384730 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 16 Sep 2026 18:40:40 +0200 Subject: [PATCH] Rename mesh-control -> mesh-controller, substrate -> foundation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One name per thing, per the HQ glossary: the module/container/image/binary/repo becomes mesh-controller, the seat the-controller, and the store+broker pair the foundation (embedded base bundles, default template and example lock renamed with their go:embed directives). No behaviour change — a pure vocabulary rename. Claude-Session: https://claude.ai/code/session_01D6qtiYU3P9jk3pnAXyAFyx --- Dockerfile | 6 ++--- Makefile | 8 +++---- README.md | 24 +++++++++---------- cmd/mesh-builder/main.go | 4 ++-- cmd/mesh-builder/once.go | 2 +- cmd/{mesh-control => mesh-controller}/acts.go | 2 +- .../acts_test.go | 2 +- cmd/{mesh-control => mesh-controller}/api.go | 0 .../api_test.go | 0 .../board.go | 0 .../board_test.go | 2 +- .../build.go | 8 +++---- .../licence.go | 0 cmd/{mesh-control => mesh-controller}/main.go | 18 +++++++------- .../mesh_for_test.go | 8 +++---- .../modules.go | 12 +++++----- .../network.go | 6 ++--- .../network_test.go | 2 +- .../nodes.go | 8 +++---- .../nodes_test.go | 0 cmd/{mesh-control => mesh-controller}/plan.go | 14 +++++------ cmd/{mesh-control => mesh-controller}/push.go | 8 +++---- .../push_test.go | 0 .../readable.go | 0 .../readable_test.go | 2 +- .../rotate.go | 0 .../secret.go | 0 .../secret_test.go | 0 .../status.go | 4 ++-- .../status_test.go | 0 .../stores.go | 8 +++---- .../upgrades.go | 4 ++-- examples/modules/modules_test.go | 4 ++-- examples/postgres-provisioner/where_test.go | 2 +- go.mod | 2 +- internal/broker/agreement_test.go | 4 ++-- internal/broker/management.go | 6 ++--- internal/broker/module_account_test.go | 2 +- internal/builder/builder.go | 2 +- internal/builder/builder_test.go | 2 +- internal/builder/standing_on_test.go | 2 +- internal/catalogue/bootstrap_cycle_test.go | 2 +- internal/catalogue/co_located_test.go | 2 +- internal/catalogue/declaration.go | 10 ++++---- internal/catalogue/filtering.go | 10 ++++---- ...e_test.go => filtering_foundation_test.go} | 6 ++--- internal/catalogue/manifest.go | 2 +- internal/catalogue/provided_test.go | 4 ++-- internal/identity/identity.go | 2 +- internal/identity/identity_test.go | 2 +- internal/inventory/buildinput_test.go | 2 +- internal/inventory/catalogue.go | 2 +- internal/inventory/catalogue_test.go | 2 +- internal/inventory/forget_test.go | 2 +- internal/inventory/fortest.go | 2 +- internal/inventory/inventory.go | 2 +- .../0017-what-a-machine-already-holds.sql | 2 +- internal/inventory/nodes.go | 2 +- internal/inventory/ports.go | 2 +- internal/inventory/ports_test.go | 2 +- internal/inventory/secrets.go | 2 +- internal/inventory/secrets_test.go | 2 +- internal/licences/adapters/adapters.go | 2 +- internal/licences/fortest.go | 2 +- internal/licences/licences.go | 6 ++--- internal/licences/refresh_test.go | 4 ++-- internal/licences/submitrefresh_test.go | 2 +- internal/link/enrol_shape_test.go | 8 +++---- internal/link/enrolment.go | 6 ++--- internal/link/heard_test.go | 6 ++--- internal/link/protocol.go | 2 +- internal/overlay/declaration.go | 2 +- internal/overlay/generator.go | 2 +- internal/overlay/opens_test.go | 2 +- internal/secrets/sealedbox_xcheck_test.go | 2 +- .../testdata/module-sealedbox-fixture.json | 2 +- module.json | 24 +++++++++---------- 77 files changed, 157 insertions(+), 157 deletions(-) rename cmd/{mesh-control => mesh-controller}/acts.go (99%) rename cmd/{mesh-control => mesh-controller}/acts_test.go (98%) rename cmd/{mesh-control => mesh-controller}/api.go (100%) rename cmd/{mesh-control => mesh-controller}/api_test.go (100%) rename cmd/{mesh-control => mesh-controller}/board.go (100%) rename cmd/{mesh-control => mesh-controller}/board_test.go (99%) rename cmd/{mesh-control => mesh-controller}/build.go (98%) rename cmd/{mesh-control => mesh-controller}/licence.go (100%) rename cmd/{mesh-control => mesh-controller}/main.go (93%) rename cmd/{mesh-control => mesh-controller}/mesh_for_test.go (94%) rename cmd/{mesh-control => mesh-controller}/modules.go (97%) rename cmd/{mesh-control => mesh-controller}/network.go (98%) rename cmd/{mesh-control => mesh-controller}/network_test.go (97%) rename cmd/{mesh-control => mesh-controller}/nodes.go (98%) rename cmd/{mesh-control => mesh-controller}/nodes_test.go (100%) rename cmd/{mesh-control => mesh-controller}/plan.go (99%) rename cmd/{mesh-control => mesh-controller}/push.go (98%) rename cmd/{mesh-control => mesh-controller}/push_test.go (100%) rename cmd/{mesh-control => mesh-controller}/readable.go (100%) rename cmd/{mesh-control => mesh-controller}/readable_test.go (98%) rename cmd/{mesh-control => mesh-controller}/rotate.go (100%) rename cmd/{mesh-control => mesh-controller}/secret.go (100%) rename cmd/{mesh-control => mesh-controller}/secret_test.go (100%) rename cmd/{mesh-control => mesh-controller}/status.go (98%) rename cmd/{mesh-control => mesh-controller}/status_test.go (100%) rename cmd/{mesh-control => mesh-controller}/stores.go (95%) rename cmd/{mesh-control => mesh-controller}/upgrades.go (98%) rename internal/catalogue/{filtering_substrate_test.go => filtering_foundation_test.go} (91%) diff --git a/Dockerfile b/Dockerfile index 4e398c0..9bc18a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,13 +22,13 @@ COPY . . ARG VERSION=development RUN CGO_ENABLED=0 go build -trimpath \ -ldflags "-s -w -X main.version=${VERSION}" \ - -o /mesh-control ./cmd/mesh-control + -o /mesh-controller ./cmd/mesh-controller FROM scratch -COPY --from=build /mesh-control /mesh-control +COPY --from=build /mesh-controller /mesh-controller # Numeric because there is no /etc/passwd to look a name up in. Nothing here needs to be root: # it opens outbound connections and writes nothing to its own filesystem. USER 65534:65534 -ENTRYPOINT ["/mesh-control"] +ENTRYPOINT ["/mesh-controller"] diff --git a/Makefile b/Makefile index bb6bc6f..2e21062 100644 --- a/Makefile +++ b/Makefile @@ -12,20 +12,20 @@ LDFLAGS := -s -w -X main.version=$(VERSION) # touches a database anybody else is using. Override PG_PORT if this one is taken -- the first # port chosen was already serving something that had been up for six days. PG_PORT ?= 55532 -PG_CONTAINER ?= mesh-control-check +PG_CONTAINER ?= mesh-controller-check PG_IMAGE ?= postgres:17-alpine export MESH_TEST_POSTGRES ?= postgres://postgres:check@127.0.0.1:$(PG_PORT)/postgres?sslmode=disable .PHONY: build image check test vet fmt postgres postgres-stop clean build: - CGO_ENABLED=0 go build -trimpath -ldflags '$(LDFLAGS)' -o build/mesh-control ./cmd/mesh-control + CGO_ENABLED=0 go build -trimpath -ldflags '$(LDFLAGS)' -o build/mesh-controller ./cmd/mesh-controller # Tagged 'development' as well as by version, because the lab places images by name and a # scenario naming a version would have to be edited on every build. The version tag is what a # real bundle pins. -IMAGE ?= mesh-control:$(VERSION) -DEV_TAG ?= mesh-control:development +IMAGE ?= mesh-controller:$(VERSION) +DEV_TAG ?= mesh-controller:development image: docker build --build-arg VERSION=$(VERSION) -t $(IMAGE) -t $(DEV_TAG) . diff --git a/README.md b/README.md index 287af4a..427ed83 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# mesh-control +# mesh-controller **Tier 2 of Novox Mesh — the control plane.** Everything that needs to know about more than one node. @@ -31,17 +31,17 @@ argument that is not settled there. | the interface every surface speaks to | not built; its shape is not decided | ``` -mesh-control migrate bring each context's schema up to date -mesh-control node add create a node record -mesh-control node list the nodes this mesh knows about -mesh-control token issue --node a one-time right to join, for an existing record -mesh-control token issue --new create the record and issue for it -mesh-control identity show this control plane's signing key -mesh-control broker show where the broker is, and what to expect there -mesh-control version what this binary is +mesh-controller migrate bring each context's schema up to date +mesh-controller node add create a node record +mesh-controller node list the nodes this mesh knows about +mesh-controller token issue --node a one-time right to join, for an existing record +mesh-controller token issue --new create the record and issue for it +mesh-controller identity show this control plane's signing key +mesh-controller broker show where the broker is, and what to expect there +mesh-controller version what this binary is ``` -`migrate` is **step 3 of the substrate bootstrap** — the step the first node cannot get past, run +`migrate` is **step 3 of the foundation bootstrap** — the step the first node cannot get past, run against a database raised moments earlier from the bundle the host carries. ### Tokens, and what they are missing @@ -176,7 +176,7 @@ without its neighbour checked out is a repository nobody can build. **What this mesh sends, read by the host that receives it:** ``` -mesh-control: ./build/mesh-control plan --json > /tmp/d.json +mesh-controller: ./build/mesh-controller plan --json > /tmp/d.json mesh-host: MESH_EMITTED=/tmp/d.json go test ./internal/declaration/ -v ``` @@ -184,7 +184,7 @@ mesh-host: MESH_EMITTED=/tmp/d.json go test ./internal/declaration/ -v ``` mesh-host: MESH_ENROL_OUT=/tmp/enrol.json go test ./internal/link/ -mesh-control: MESH_ENROL=/tmp/enrol.json make check +mesh-controller: MESH_ENROL=/tmp/enrol.json make check ``` The second does more than compare shapes: it seals something to the key that arrived and opens it diff --git a/cmd/mesh-builder/main.go b/cmd/mesh-builder/main.go index 9a5c9e2..5ec294a 100644 --- a/cmd/mesh-builder/main.go +++ b/cmd/mesh-builder/main.go @@ -32,8 +32,8 @@ import ( amqp "github.com/rabbitmq/amqp091-go" - "github.com/novox/mesh-control/internal/builder" - "github.com/novox/mesh-control/internal/link" + "github.com/novox/mesh-controller/internal/builder" + "github.com/novox/mesh-controller/internal/link" ) // version is set at build time. diff --git a/cmd/mesh-builder/once.go b/cmd/mesh-builder/once.go index 8423c67..1ea9da7 100644 --- a/cmd/mesh-builder/once.go +++ b/cmd/mesh-builder/once.go @@ -9,7 +9,7 @@ import ( "os" "strings" - "github.com/novox/mesh-control/internal/builder" + "github.com/novox/mesh-controller/internal/builder" ) // buildOnce is the builder doing one build and stopping, with no broker and no mesh. diff --git a/cmd/mesh-control/acts.go b/cmd/mesh-controller/acts.go similarity index 99% rename from cmd/mesh-control/acts.go rename to cmd/mesh-controller/acts.go index 7911024..4a0abe8 100644 --- a/cmd/mesh-control/acts.go +++ b/cmd/mesh-controller/acts.go @@ -6,7 +6,7 @@ import ( "sort" "strings" - "github.com/novox/mesh-control/internal/catalogue" + "github.com/novox/mesh-controller/internal/catalogue" ) // The things the mesh can be asked to do, separated from how it was asked. diff --git a/cmd/mesh-control/acts_test.go b/cmd/mesh-controller/acts_test.go similarity index 98% rename from cmd/mesh-control/acts_test.go rename to cmd/mesh-controller/acts_test.go index 7cbc642..a2e99a6 100644 --- a/cmd/mesh-control/acts_test.go +++ b/cmd/mesh-controller/acts_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - "github.com/novox/mesh-control/internal/catalogue" + "github.com/novox/mesh-controller/internal/catalogue" ) // What an assignment says about the machines it was not about. diff --git a/cmd/mesh-control/api.go b/cmd/mesh-controller/api.go similarity index 100% rename from cmd/mesh-control/api.go rename to cmd/mesh-controller/api.go diff --git a/cmd/mesh-control/api_test.go b/cmd/mesh-controller/api_test.go similarity index 100% rename from cmd/mesh-control/api_test.go rename to cmd/mesh-controller/api_test.go diff --git a/cmd/mesh-control/board.go b/cmd/mesh-controller/board.go similarity index 100% rename from cmd/mesh-control/board.go rename to cmd/mesh-controller/board.go diff --git a/cmd/mesh-control/board_test.go b/cmd/mesh-controller/board_test.go similarity index 99% rename from cmd/mesh-control/board_test.go rename to cmd/mesh-controller/board_test.go index 85462c3..ea8029d 100644 --- a/cmd/mesh-control/board_test.go +++ b/cmd/mesh-controller/board_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/novox/mesh-control/internal/inventory" + "github.com/novox/mesh-controller/internal/inventory" ) // Refused and failed stay distinct all the way to the page. diff --git a/cmd/mesh-control/build.go b/cmd/mesh-controller/build.go similarity index 98% rename from cmd/mesh-control/build.go rename to cmd/mesh-controller/build.go index 008adee..1506400 100644 --- a/cmd/mesh-control/build.go +++ b/cmd/mesh-controller/build.go @@ -12,10 +12,10 @@ import ( "strings" "time" - "github.com/novox/mesh-control/internal/broker" - "github.com/novox/mesh-control/internal/catalogue" - "github.com/novox/mesh-control/internal/inventory" - "github.com/novox/mesh-control/internal/link" + "github.com/novox/mesh-controller/internal/broker" + "github.com/novox/mesh-controller/internal/catalogue" + "github.com/novox/mesh-controller/internal/inventory" + "github.com/novox/mesh-controller/internal/link" ) // asking a build machine for a module, and what came back. diff --git a/cmd/mesh-control/licence.go b/cmd/mesh-controller/licence.go similarity index 100% rename from cmd/mesh-control/licence.go rename to cmd/mesh-controller/licence.go diff --git a/cmd/mesh-control/main.go b/cmd/mesh-controller/main.go similarity index 93% rename from cmd/mesh-control/main.go rename to cmd/mesh-controller/main.go index f69e90b..bcfb385 100644 --- a/cmd/mesh-control/main.go +++ b/cmd/mesh-controller/main.go @@ -1,9 +1,9 @@ -// Command mesh-control is the control plane: everything that needs to know about more than one +// Command mesh-controller is the control plane: everything that needs to know about more than one // node (novox/hq ADR 0006). // // It runs as one process holding several contexts, each owning its own store. Today it holds one, // `inventory`, and does one thing with it — brings its schema up to date, which is step 3 of the -// bootstrap in novox/hq 07-the-substrate and the step the first node cannot get past without. +// bootstrap in novox/hq 07-the-foundation and the step the first node cannot get past without. package main import ( @@ -14,11 +14,11 @@ import ( "os/signal" "syscall" - "github.com/novox/mesh-control/internal/identity" - "github.com/novox/mesh-control/internal/inventory" - "github.com/novox/mesh-control/internal/licences" - "github.com/novox/mesh-control/internal/link" - "github.com/novox/mesh-control/internal/store" + "github.com/novox/mesh-controller/internal/identity" + "github.com/novox/mesh-controller/internal/inventory" + "github.com/novox/mesh-controller/internal/licences" + "github.com/novox/mesh-controller/internal/link" + "github.com/novox/mesh-controller/internal/store" ) // version is stamped at link time. Unset in a development build, and it says so rather than @@ -40,7 +40,7 @@ var held = []struct { func main() { if err := run(); err != nil { - fmt.Fprintf(os.Stderr, "mesh-control: %v\n", err) + fmt.Fprintf(os.Stderr, "mesh-controller: %v\n", err) os.Exit(1) } } @@ -119,7 +119,7 @@ func run() error { } func usage() { - fmt.Fprint(os.Stderr, `mesh-control — the control plane + fmt.Fprint(os.Stderr, `mesh-controller — the control plane migrate bring each context's schema up to date node add create a node record diff --git a/cmd/mesh-control/mesh_for_test.go b/cmd/mesh-controller/mesh_for_test.go similarity index 94% rename from cmd/mesh-control/mesh_for_test.go rename to cmd/mesh-controller/mesh_for_test.go index 43ff46f..35f3627 100644 --- a/cmd/mesh-control/mesh_for_test.go +++ b/cmd/mesh-controller/mesh_for_test.go @@ -8,10 +8,10 @@ import ( "fmt" "testing" - "github.com/novox/mesh-control/internal/catalogue" - "github.com/novox/mesh-control/internal/inventory" - "github.com/novox/mesh-control/internal/licences" - "github.com/novox/mesh-control/internal/overlay" + "github.com/novox/mesh-controller/internal/catalogue" + "github.com/novox/mesh-controller/internal/inventory" + "github.com/novox/mesh-controller/internal/licences" + "github.com/novox/mesh-controller/internal/overlay" ) // A mesh a command can be run against. diff --git a/cmd/mesh-control/modules.go b/cmd/mesh-controller/modules.go similarity index 97% rename from cmd/mesh-control/modules.go rename to cmd/mesh-controller/modules.go index cc09f3e..4a12a0b 100644 --- a/cmd/mesh-control/modules.go +++ b/cmd/mesh-controller/modules.go @@ -12,10 +12,10 @@ import ( "sort" "strings" - "github.com/novox/mesh-control/internal/broker" - "github.com/novox/mesh-control/internal/catalogue" - "github.com/novox/mesh-control/internal/inventory" - "github.com/novox/mesh-control/internal/overlay" + "github.com/novox/mesh-controller/internal/broker" + "github.com/novox/mesh-controller/internal/catalogue" + "github.com/novox/mesh-controller/internal/inventory" + "github.com/novox/mesh-controller/internal/overlay" ) // the catalogue: what exists, what is assigned, and how it is configured. @@ -257,7 +257,7 @@ func moduleCommand(ctx context.Context, args []string) error { if err != nil { return err } - // The substrate owns the bus; make sure it exists before a module binds onto it. + // The foundation owns the bus; make sure it exists before a module binds onto it. if err := management.EnsureEventExchanges(ctx); err != nil { return err } @@ -271,7 +271,7 @@ func moduleCommand(ctx context.Context, args []string) error { if err != nil { return err } - // A consumer's queue, with its dead-letter, is the substrate's to declare — its own account + // A consumer's queue, with its dead-letter, is the foundation's to declare — its own account // may not (ADR 0043). Made now, so it exists before the module binds onto it. if len(m.Consumes) > 0 { if err := management.EnsureModuleQueue(ctx, *forNode, module); err != nil { diff --git a/cmd/mesh-control/network.go b/cmd/mesh-controller/network.go similarity index 98% rename from cmd/mesh-control/network.go rename to cmd/mesh-controller/network.go index c031f5f..7c561b8 100644 --- a/cmd/mesh-control/network.go +++ b/cmd/mesh-controller/network.go @@ -10,9 +10,9 @@ import ( "strings" "time" - "github.com/novox/mesh-control/internal/catalogue" - "github.com/novox/mesh-control/internal/inventory" - "github.com/novox/mesh-control/internal/overlay" + "github.com/novox/mesh-controller/internal/catalogue" + "github.com/novox/mesh-controller/internal/inventory" + "github.com/novox/mesh-controller/internal/overlay" ) // the private network: who is on it, where, and what they are called. diff --git a/cmd/mesh-control/network_test.go b/cmd/mesh-controller/network_test.go similarity index 97% rename from cmd/mesh-control/network_test.go rename to cmd/mesh-controller/network_test.go index 3c354c6..789fe8a 100644 --- a/cmd/mesh-control/network_test.go +++ b/cmd/mesh-controller/network_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - "github.com/novox/mesh-control/internal/inventory" + "github.com/novox/mesh-controller/internal/inventory" ) // placementOf is what the mesh holds about where one node is. diff --git a/cmd/mesh-control/nodes.go b/cmd/mesh-controller/nodes.go similarity index 98% rename from cmd/mesh-control/nodes.go rename to cmd/mesh-controller/nodes.go index 6d021d0..e6dcfe0 100644 --- a/cmd/mesh-control/nodes.go +++ b/cmd/mesh-controller/nodes.go @@ -8,10 +8,10 @@ import ( "strings" "time" - "github.com/novox/mesh-control/internal/broker" - "github.com/novox/mesh-control/internal/inventory" - "github.com/novox/mesh-control/internal/link" - "github.com/novox/mesh-control/internal/token" + "github.com/novox/mesh-controller/internal/broker" + "github.com/novox/mesh-controller/internal/inventory" + "github.com/novox/mesh-controller/internal/link" + "github.com/novox/mesh-controller/internal/token" ) // what a machine is, and what it is allowed to be told. diff --git a/cmd/mesh-control/nodes_test.go b/cmd/mesh-controller/nodes_test.go similarity index 100% rename from cmd/mesh-control/nodes_test.go rename to cmd/mesh-controller/nodes_test.go diff --git a/cmd/mesh-control/plan.go b/cmd/mesh-controller/plan.go similarity index 99% rename from cmd/mesh-control/plan.go rename to cmd/mesh-controller/plan.go index a37e1a9..5aa92b6 100644 --- a/cmd/mesh-control/plan.go +++ b/cmd/mesh-controller/plan.go @@ -9,10 +9,10 @@ import ( "sort" "strings" - "github.com/novox/mesh-control/internal/broker" - "github.com/novox/mesh-control/internal/catalogue" - "github.com/novox/mesh-control/internal/inventory" - "github.com/novox/mesh-control/internal/licences" + "github.com/novox/mesh-controller/internal/broker" + "github.com/novox/mesh-controller/internal/catalogue" + "github.com/novox/mesh-controller/internal/inventory" + "github.com/novox/mesh-controller/internal/licences" "net" "strconv" ) @@ -453,11 +453,11 @@ func declarationWith(ctx context.Context, open *stores, node string, // The ports the mesh itself needs open, which no module declares. Read from the broker this // control plane was told about rather than written down twice: the address a node is handed in // its token and the port its machine must accept on are the same fact. - var substrate []int + var foundation []int if b, err := broker.FromEnvironment(); err == nil { if _, port, err := net.SplitHostPort(b.Address); err == nil { if n, err := strconv.Atoi(port); err == nil { - substrate = append(substrate, n) + foundation = append(foundation, n) } } } @@ -465,7 +465,7 @@ func declarationWith(ctx context.Context, open *stores, node string, return plan.Declaration(catalogue.Rendering{ Settings: settings, Generators: gens, Grants: grants, Needed: needed, Ports: ports, Certificate: certificate, Authority: authority, Mesh: private, Names: names, - Substrate: substrate}) + Foundation: foundation}) } // routeNamesInTheMesh is every routed name and the address of the node that serves it (novox/hq diff --git a/cmd/mesh-control/push.go b/cmd/mesh-controller/push.go similarity index 98% rename from cmd/mesh-control/push.go rename to cmd/mesh-controller/push.go index 1def023..656d683 100644 --- a/cmd/mesh-control/push.go +++ b/cmd/mesh-controller/push.go @@ -12,10 +12,10 @@ import ( "strings" "time" - "github.com/novox/mesh-control/internal/broker" - "github.com/novox/mesh-control/internal/catalogue" - "github.com/novox/mesh-control/internal/inventory" - "github.com/novox/mesh-control/internal/link" + "github.com/novox/mesh-controller/internal/broker" + "github.com/novox/mesh-controller/internal/catalogue" + "github.com/novox/mesh-controller/internal/inventory" + "github.com/novox/mesh-controller/internal/link" ) // reportUnhostable says which of a node's assigned modules the machine cannot run, once per push. diff --git a/cmd/mesh-control/push_test.go b/cmd/mesh-controller/push_test.go similarity index 100% rename from cmd/mesh-control/push_test.go rename to cmd/mesh-controller/push_test.go diff --git a/cmd/mesh-control/readable.go b/cmd/mesh-controller/readable.go similarity index 100% rename from cmd/mesh-control/readable.go rename to cmd/mesh-controller/readable.go diff --git a/cmd/mesh-control/readable_test.go b/cmd/mesh-controller/readable_test.go similarity index 98% rename from cmd/mesh-control/readable_test.go rename to cmd/mesh-controller/readable_test.go index 2091d2a..fd7dedc 100644 --- a/cmd/mesh-control/readable_test.go +++ b/cmd/mesh-controller/readable_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/novox/mesh-control/internal/inventory" + "github.com/novox/mesh-controller/internal/inventory" ) // The shape something other than a person reads. diff --git a/cmd/mesh-control/rotate.go b/cmd/mesh-controller/rotate.go similarity index 100% rename from cmd/mesh-control/rotate.go rename to cmd/mesh-controller/rotate.go diff --git a/cmd/mesh-control/secret.go b/cmd/mesh-controller/secret.go similarity index 100% rename from cmd/mesh-control/secret.go rename to cmd/mesh-controller/secret.go diff --git a/cmd/mesh-control/secret_test.go b/cmd/mesh-controller/secret_test.go similarity index 100% rename from cmd/mesh-control/secret_test.go rename to cmd/mesh-controller/secret_test.go diff --git a/cmd/mesh-control/status.go b/cmd/mesh-controller/status.go similarity index 98% rename from cmd/mesh-control/status.go rename to cmd/mesh-controller/status.go index 86bd83a..2ebdd1f 100644 --- a/cmd/mesh-control/status.go +++ b/cmd/mesh-controller/status.go @@ -8,8 +8,8 @@ import ( "strings" "time" - "github.com/novox/mesh-control/internal/inventory" - "github.com/novox/mesh-control/internal/overlay" + "github.com/novox/mesh-controller/internal/inventory" + "github.com/novox/mesh-controller/internal/overlay" ) // is anything broken, is anything not answering, is anything out of date. diff --git a/cmd/mesh-control/status_test.go b/cmd/mesh-controller/status_test.go similarity index 100% rename from cmd/mesh-control/status_test.go rename to cmd/mesh-controller/status_test.go diff --git a/cmd/mesh-control/stores.go b/cmd/mesh-controller/stores.go similarity index 95% rename from cmd/mesh-control/stores.go rename to cmd/mesh-controller/stores.go index 5c467b2..8a46256 100644 --- a/cmd/mesh-control/stores.go +++ b/cmd/mesh-controller/stores.go @@ -5,10 +5,10 @@ import ( "fmt" "time" - "github.com/novox/mesh-control/internal/identity" - "github.com/novox/mesh-control/internal/inventory" - "github.com/novox/mesh-control/internal/licences" - "github.com/novox/mesh-control/internal/store" + "github.com/novox/mesh-controller/internal/identity" + "github.com/novox/mesh-controller/internal/inventory" + "github.com/novox/mesh-controller/internal/licences" + "github.com/novox/mesh-controller/internal/store" ) // reaching each context's store, which no other context may touch. diff --git a/cmd/mesh-control/upgrades.go b/cmd/mesh-controller/upgrades.go similarity index 98% rename from cmd/mesh-control/upgrades.go rename to cmd/mesh-controller/upgrades.go index 2823d0a..63b5769 100644 --- a/cmd/mesh-control/upgrades.go +++ b/cmd/mesh-controller/upgrades.go @@ -7,8 +7,8 @@ import ( "fmt" "strings" - "github.com/novox/mesh-control/internal/inventory" - "github.com/novox/mesh-control/internal/link" + "github.com/novox/mesh-controller/internal/inventory" + "github.com/novox/mesh-controller/internal/link" ) // following acts on what the catalogue announces. diff --git a/examples/modules/modules_test.go b/examples/modules/modules_test.go index 72d93c1..bd60453 100644 --- a/examples/modules/modules_test.go +++ b/examples/modules/modules_test.go @@ -10,8 +10,8 @@ import ( "strings" "testing" - "github.com/novox/mesh-control/internal/catalogue" - "github.com/novox/mesh-control/internal/overlay" + "github.com/novox/mesh-controller/internal/catalogue" + "github.com/novox/mesh-controller/internal/overlay" ) // The examples are manifests, so the thing to check is that the catalogue accepts them. diff --git a/examples/postgres-provisioner/where_test.go b/examples/postgres-provisioner/where_test.go index 534afae..1097ae2 100644 --- a/examples/postgres-provisioner/where_test.go +++ b/examples/postgres-provisioner/where_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/novox/mesh-control/internal/catalogue" + "github.com/novox/mesh-controller/internal/catalogue" ) // The password comes from a file, because that is how the mesh delivers one. diff --git a/go.mod b/go.mod index 2cee974..a827fad 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/novox/mesh-control +module github.com/novox/mesh-controller go 1.25.0 diff --git a/internal/broker/agreement_test.go b/internal/broker/agreement_test.go index f2360e8..00f692a 100644 --- a/internal/broker/agreement_test.go +++ b/internal/broker/agreement_test.go @@ -4,8 +4,8 @@ import ( "regexp" "testing" - "github.com/novox/mesh-control/internal/broker" - "github.com/novox/mesh-control/internal/link" + "github.com/novox/mesh-controller/internal/broker" + "github.com/novox/mesh-controller/internal/link" ) // The names are written twice, so a test keeps them agreeing. diff --git a/internal/broker/management.go b/internal/broker/management.go index 0277d61..684d0a1 100644 --- a/internal/broker/management.go +++ b/internal/broker/management.go @@ -68,7 +68,7 @@ const ExchangeName = "mesh" const BuildQueueName = "builds" // The events bus (novox/hq ADR 0042): one topic exchange every event rides, a second for tool -// RPC kept apart, and a dead-letter home for a poison event. The substrate owns these — a module's +// RPC kept apart, and a dead-letter home for a poison event. The foundation owns these — a module's // account cannot declare them, only bind its own queue to the events one. const ( EventsExchangeName = "mesh.events" @@ -151,7 +151,7 @@ func (m *Management) CreateModuleAccount(ctx context.Context, node, module, pass } // EnsureModuleQueue declares a consuming module's queue with its dead-letter exchange, idempotently. -// The substrate declares it because a scoped module account may not: the broker refuses a queue with +// The foundation declares it because a scoped module account may not: the broker refuses a queue with // a dead-letter exchange to a non-administrator (novox/hq ADR 0043), so a consumer passively checks // the queue the mesh made rather than declaring its own. func (m *Management) EnsureModuleQueue(ctx context.Context, node, module string) error { @@ -166,7 +166,7 @@ func (m *Management) EnsureModuleQueue(ctx context.Context, node, module string) } // EnsureEventExchanges declares the bus's exchanges and the dead-letter home, idempotently. The -// substrate owns them (a module's account may not declare an exchange), and a dead-letter exchange +// foundation owns them (a module's account may not declare an exchange), and a dead-letter exchange // with no queue behind it drops what it receives — so a durable queue bound to `#` retains a poison // event for inspection, which is the whole reason the trail exists. func (m *Management) EnsureEventExchanges(ctx context.Context) error { diff --git a/internal/broker/module_account_test.go b/internal/broker/module_account_test.go index 05b4f7d..2f401fc 100644 --- a/internal/broker/module_account_test.go +++ b/internal/broker/module_account_test.go @@ -9,7 +9,7 @@ import ( "strings" "testing" - "github.com/novox/mesh-control/internal/broker" + "github.com/novox/mesh-controller/internal/broker" ) // The audit logger consumes everything and emits nothing. Its account must let it declare and read diff --git a/internal/builder/builder.go b/internal/builder/builder.go index a9f7acf..a174d48 100644 --- a/internal/builder/builder.go +++ b/internal/builder/builder.go @@ -17,7 +17,7 @@ import ( "strings" "time" - "github.com/novox/mesh-control/internal/catalogue" + "github.com/novox/mesh-controller/internal/catalogue" ) // Turning a repository into artifacts the mesh can pin. diff --git a/internal/builder/builder_test.go b/internal/builder/builder_test.go index 6938d71..c04ba87 100644 --- a/internal/builder/builder_test.go +++ b/internal/builder/builder_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/novox/mesh-control/internal/catalogue" + "github.com/novox/mesh-controller/internal/catalogue" ) // A repository becoming artifacts the mesh can pin. diff --git a/internal/builder/standing_on_test.go b/internal/builder/standing_on_test.go index b4d3e1f..5cee3cd 100644 --- a/internal/builder/standing_on_test.go +++ b/internal/builder/standing_on_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - "github.com/novox/mesh-control/internal/catalogue" + "github.com/novox/mesh-controller/internal/catalogue" ) // A module naming a base the mesh has not built is refused, and the refusal names what is missing. diff --git a/internal/catalogue/bootstrap_cycle_test.go b/internal/catalogue/bootstrap_cycle_test.go index e37ab7f..9cbbd67 100644 --- a/internal/catalogue/bootstrap_cycle_test.go +++ b/internal/catalogue/bootstrap_cycle_test.go @@ -51,7 +51,7 @@ func TestAModuleThatDoesNotProvideTheStoreStillBuilds(t *testing.T) { // A mapping that names an address still names the port, and the machine side is still the middle. // -// The substrate bundle writes "127.0.0.1:5432:5432" today, so the shape is not hypothetical. +// The foundation bundle writes "127.0.0.1:5432:5432" today, so the shape is not hypothetical. // Found in review: the first cut split on the first colon, read "127.0.0.1" as the machine port, // failed to parse it, and silently skipped the mapping — which put the filter back on the // declared port, the exact fault MachineSide was written to end. diff --git a/internal/catalogue/co_located_test.go b/internal/catalogue/co_located_test.go index 7fac677..e667917 100644 --- a/internal/catalogue/co_located_test.go +++ b/internal/catalogue/co_located_test.go @@ -62,7 +62,7 @@ func routeProxy() Manifest { // A co-located provider's served VALUES reach its consumer, not just its served keys. // // The mesh walks a provider on ANOTHER machine and settles what it serves with that node's settings -// layers before offering it (cmd/mesh-control plan.go, theRestOfTheMesh). A provider on the +// layers before offering it (cmd/mesh-controller plan.go, theRestOfTheMesh). A provider on the // consumer's own machine was never settled at all: resolve.go's servedHere and declaration.go's // here() both read the manifest and stop there. So a served value the operator supplied — the one // kind of value a manifest cannot carry, because it is different on every mesh — arrived as the diff --git a/internal/catalogue/declaration.go b/internal/catalogue/declaration.go index c99cb26..2204a62 100644 --- a/internal/catalogue/declaration.go +++ b/internal/catalogue/declaration.go @@ -89,11 +89,11 @@ type Rendering struct { // a fact about the mesh, and resolution answers questions about one machine. Mesh []string - // Substrate is the ports the mesh itself needs reachable on every machine, which no module - // declares because the substrate is not a module (novox/hq 04-ISSUES/051 and 052). The broker + // Foundation is the ports the mesh itself needs reachable on every machine, which no module + // declares because the foundation is not a module (novox/hq 04-ISSUES/051 and 052). The broker // is the one that matters: a machine dials it to enrol, and a firewall derived only from // modules closes it. - Substrate []int + Foundation []int // Names is every machine's internal name and its address, for containers to be given. // @@ -213,7 +213,7 @@ func (r Resolution) Declaration(with Rendering) ([]map[string]any, error) { if err != nil { return nil, err } - filtering := AsNftables(rules, with.Mesh, r.PublicDomain != "", with.Substrate) + filtering := AsNftables(rules, with.Mesh, r.PublicDomain != "", with.Foundation) var out []map[string]any for _, m := range r.Modules { @@ -821,7 +821,7 @@ func here(r Resolution, requirement string, with Rendering) (*Needed, error) { // // **The one derivation, so the two arrangements cannot disagree.** For a provider elsewhere the // control plane walks that node, reads its manifest with that machine's port assignments, and -// settles the result with that node's settings layers before offering it (cmd/mesh-control plan.go, +// settles the result with that node's settings layers before offering it (cmd/mesh-controller plan.go, // theRestOfTheMesh). A provider on the consumer's own machine never passes through that walk, so // every step of it has to be repeated here — and each step that was not repeated was a promise the // co-located arrangement quietly broke: first the port (novox/hq 04-ISSUES/038), then the settled diff --git a/internal/catalogue/filtering.go b/internal/catalogue/filtering.go index ba1d6dc..773a434 100644 --- a/internal/catalogue/filtering.go +++ b/internal/catalogue/filtering.go @@ -217,10 +217,10 @@ const SSHPort = 22 // `outward` says this machine is reachable from outside the mesh, which is the only thing that // decides whether ssh is answered there as well as on the private network. // -// `substrate` is the ports the MESH ITSELF needs reachable, which no module declares. +// `foundation` is the ports the MESH ITSELF needs reachable, which no module declares. // // **Everything else in this file is derived from what modules say they listen on, and the -// substrate is not a module** (novox/hq 04-ISSUES/051). So the broker — the port every machine +// foundation is not a module** (novox/hq 04-ISSUES/051). So the broker — the port every machine // dials to enrol and to receive every declaration it is ever sent — was absent from the ruleset, // and nothing noticed: a mesh of one never dials its own broker across the network. The first // machine to join a firewalled anchor is refused by the packet filter during enrolment, before @@ -229,7 +229,7 @@ const SSHPort = 22 // It is a floor for the same reason ssh is. A machine nobody can reach is a machine nobody can // repair; a machine the mesh cannot reach is a machine the mesh cannot manage. Neither is a thing // any module asks for, and neither may be derived away. -func AsNftables(rules []Rule, mesh []string, outward bool, substrate []int) string { +func AsNftables(rules []Rule, mesh []string, outward bool, foundation []int) string { var b strings.Builder b.WriteString("# Computed by the mesh from what is assigned to this node.\n") b.WriteString("# Edits are lost on the next declaration; change a module's listens instead.\n\n") @@ -297,9 +297,9 @@ func AsNftables(rules []Rule, mesh []string, outward bool, substrate []int) stri // Not narrowed to the private network, because the machines that need this most are the ones // not on it yet: a node enrols BEFORE it has an address here, over the ordinary network, and a // rule allowing only the private network would close the door being knocked on. - if len(substrate) > 0 { + if len(foundation) > 0 { b.WriteString("\n\t\t# the mesh's own — never derived, never closed\n") - for _, port := range substrate { + for _, port := range foundation { b.WriteString(fmt.Sprintf("\t\ttcp dport %d accept\n", port)) } } diff --git a/internal/catalogue/filtering_substrate_test.go b/internal/catalogue/filtering_foundation_test.go similarity index 91% rename from internal/catalogue/filtering_substrate_test.go rename to internal/catalogue/filtering_foundation_test.go index 7df5680..96d4263 100644 --- a/internal/catalogue/filtering_substrate_test.go +++ b/internal/catalogue/filtering_foundation_test.go @@ -7,7 +7,7 @@ import ( // The mesh's own ports survive a ruleset derived from modules that do not mention them. // -// **The firewall is computed from what modules declare they listen on, and the substrate is not a +// **The firewall is computed from what modules declare they listen on, and the foundation is not a // module** (novox/hq 04-ISSUES/052). So the broker's port — the one every machine dials to enrol // and to receive every declaration it is ever sent — was absent from every ruleset the mesh ever // generated, and nothing caught it: a mesh of one never dials its own broker across the network, @@ -37,12 +37,12 @@ func TestTheBrokersPortIsOpenedThoughNoModuleDeclaresIt(t *testing.T) { // And a mesh that was never told about a broker still gets a ruleset, rather than an empty one or // a panic. A control plane in that state cannot issue tokens either, which is where it surfaces. -func TestNoBrokerMeansNoSubstrateRuleRatherThanNoRuleset(t *testing.T) { +func TestNoBrokerMeansNoFoundationRuleRatherThanNoRuleset(t *testing.T) { out := AsNftables(nil, []string{"10.42.0.1"}, false, nil) if !strings.Contains(out, "table inet mesh") { t.Fatalf("no ruleset at all:\n%s", out) } if strings.Contains(out, "never derived, never closed\n\t\ttcp dport") { - t.Fatalf("a substrate rule was written for a mesh with no broker:\n%s", out) + t.Fatalf("a foundation rule was written for a mesh with no broker:\n%s", out) } } diff --git a/internal/catalogue/manifest.go b/internal/catalogue/manifest.go index 38585f6..79646e1 100644 --- a/internal/catalogue/manifest.go +++ b/internal/catalogue/manifest.go @@ -706,7 +706,7 @@ func ParseManifest(raw []byte) (Manifest, error) { // that provides the store and also builds something asks the mesh to put an artifact into the // thing that artifact is needed to create. // - // It is the question the substrate record asks of every candidate — can it grant itself the + // It is the question the foundation record asks of every candidate — can it grant itself the // thing it provides? The store cannot create its own database, the broker cannot create its // own virtual host, and a registry cannot grant itself a repository. Such a module names its // image, exactly as the bundle names the three a first node starts from. diff --git a/internal/catalogue/provided_test.go b/internal/catalogue/provided_test.go index 12d9a09..17719e6 100644 --- a/internal/catalogue/provided_test.go +++ b/internal/catalogue/provided_test.go @@ -5,8 +5,8 @@ import ( "strings" "testing" - "github.com/novox/mesh-control/internal/catalogue" - "github.com/novox/mesh-control/internal/overlay" + "github.com/novox/mesh-controller/internal/catalogue" + "github.com/novox/mesh-controller/internal/overlay" ) // The manifests the control plane actually ships, resolved. diff --git a/internal/identity/identity.go b/internal/identity/identity.go index 2d64b7b..c38d88c 100644 --- a/internal/identity/identity.go +++ b/internal/identity/identity.go @@ -19,7 +19,7 @@ import ( "time" "github.com/jackc/pgx/v5" - "github.com/novox/mesh-control/internal/store" + "github.com/novox/mesh-controller/internal/store" ) // Name is what this context is called: its database and its credential are named after it. diff --git a/internal/identity/identity_test.go b/internal/identity/identity_test.go index 577681e..7aa1582 100644 --- a/internal/identity/identity_test.go +++ b/internal/identity/identity_test.go @@ -13,7 +13,7 @@ import ( "time" "github.com/jackc/pgx/v5" - "github.com/novox/mesh-control/internal/store" + "github.com/novox/mesh-controller/internal/store" ) func fresh(t *testing.T) *Identity { diff --git a/internal/inventory/buildinput_test.go b/internal/inventory/buildinput_test.go index fd67283..6bb6e97 100644 --- a/internal/inventory/buildinput_test.go +++ b/internal/inventory/buildinput_test.go @@ -3,7 +3,7 @@ package inventory import ( "testing" - "github.com/novox/mesh-control/internal/catalogue" + "github.com/novox/mesh-controller/internal/catalogue" ) // The image every module is compiled on top of is built and never run. diff --git a/internal/inventory/catalogue.go b/internal/inventory/catalogue.go index 6d23461..71527d3 100644 --- a/internal/inventory/catalogue.go +++ b/internal/inventory/catalogue.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/jackc/pgx/v5" - "github.com/novox/mesh-control/internal/catalogue" + "github.com/novox/mesh-controller/internal/catalogue" ) // ErrNoSuchModule is what the mesh says about a module it has never been told about. diff --git a/internal/inventory/catalogue_test.go b/internal/inventory/catalogue_test.go index 13dbf43..1a6cce0 100644 --- a/internal/inventory/catalogue_test.go +++ b/internal/inventory/catalogue_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/novox/mesh-control/internal/catalogue" + "github.com/novox/mesh-controller/internal/catalogue" ) func manifest(name string, provides, requires []string) catalogue.Manifest { diff --git a/internal/inventory/forget_test.go b/internal/inventory/forget_test.go index 31e3b02..a8a8ca3 100644 --- a/internal/inventory/forget_test.go +++ b/internal/inventory/forget_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - "github.com/novox/mesh-control/internal/catalogue" + "github.com/novox/mesh-controller/internal/catalogue" ) // What removing a module takes with it, and what re-registering one does not. diff --git a/internal/inventory/fortest.go b/internal/inventory/fortest.go index 6536f8f..dddca8f 100644 --- a/internal/inventory/fortest.go +++ b/internal/inventory/fortest.go @@ -10,7 +10,7 @@ import ( "github.com/jackc/pgx/v5" - "github.com/novox/mesh-control/internal/store" + "github.com/novox/mesh-controller/internal/store" ) // ForTest is a fresh inventory in a database of its own, dropped when the test ends. diff --git a/internal/inventory/inventory.go b/internal/inventory/inventory.go index 34fe44e..44b6c14 100644 --- a/internal/inventory/inventory.go +++ b/internal/inventory/inventory.go @@ -10,7 +10,7 @@ package inventory import ( "embed" - "github.com/novox/mesh-control/internal/store" + "github.com/novox/mesh-controller/internal/store" ) // Name is what this context is called: its database, and the environment variable holding the diff --git a/internal/inventory/migrations/0017-what-a-machine-already-holds.sql b/internal/inventory/migrations/0017-what-a-machine-already-holds.sql index 14de2cf..44f30fe 100644 --- a/internal/inventory/migrations/0017-what-a-machine-already-holds.sql +++ b/internal/inventory/migrations/0017-what-a-machine-already-holds.sql @@ -1,6 +1,6 @@ -- Ports a machine holds that the mesh did not assign. -- --- novox/hq ADR 0038. The substrate is not a module: a node raises it from the bundle it carries +-- novox/hq ADR 0038. The foundation is not a module: a node raises it from the bundle it carries -- before any mesh exists, so the control plane has never heard of the store or the broker. Told -- what they hold, it can put a module somewhere else; not told, it hands out a port one of them -- has and finds out from a container runtime three layers down. diff --git a/internal/inventory/nodes.go b/internal/inventory/nodes.go index 65a34d4..ed6d60b 100644 --- a/internal/inventory/nodes.go +++ b/internal/inventory/nodes.go @@ -13,7 +13,7 @@ import ( "time" "github.com/jackc/pgx/v5" - "github.com/novox/mesh-control/internal/store" + "github.com/novox/mesh-controller/internal/store" ) // Inventory is this context, holding the store it exclusively owns. diff --git a/internal/inventory/ports.go b/internal/inventory/ports.go index 8ac354e..3e031c4 100644 --- a/internal/inventory/ports.go +++ b/internal/inventory/ports.go @@ -120,7 +120,7 @@ func (i *Inventory) assignPort( if err != nil { return Assigned{}, err } - // And what the machine itself says it already holds — the substrate it raised before there + // And what the machine itself says it already holds — the foundation it raised before there // was a mesh to ask (novox/hq ADR 0038). Not assignments: nothing here chose them, and // nothing here can move them. carried, err := i.carriedOn(ctx, nodeID) diff --git a/internal/inventory/ports_test.go b/internal/inventory/ports_test.go index 808876e..ef2c8fa 100644 --- a/internal/inventory/ports_test.go +++ b/internal/inventory/ports_test.go @@ -4,7 +4,7 @@ import ( "errors" "testing" - "github.com/novox/mesh-control/internal/catalogue" + "github.com/novox/mesh-controller/internal/catalogue" ) func aNodeWithModules(t *testing.T, modules ...string) (*Inventory, string) { diff --git a/internal/inventory/secrets.go b/internal/inventory/secrets.go index 8672542..9756459 100644 --- a/internal/inventory/secrets.go +++ b/internal/inventory/secrets.go @@ -7,7 +7,7 @@ import ( "github.com/jackc/pgx/v5" - "github.com/novox/mesh-control/internal/secrets" + "github.com/novox/mesh-controller/internal/secrets" ) // Where sealed secrets live. diff --git a/internal/inventory/secrets_test.go b/internal/inventory/secrets_test.go index 309c47f..9a92f07 100644 --- a/internal/inventory/secrets_test.go +++ b/internal/inventory/secrets_test.go @@ -5,7 +5,7 @@ import ( "crypto/ecdh" "crypto/rand" "encoding/base64" - "github.com/novox/mesh-control/internal/catalogue" + "github.com/novox/mesh-controller/internal/catalogue" "strings" "testing" diff --git a/internal/licences/adapters/adapters.go b/internal/licences/adapters/adapters.go index 6f8e27b..dfe4da2 100644 --- a/internal/licences/adapters/adapters.go +++ b/internal/licences/adapters/adapters.go @@ -23,7 +23,7 @@ import ( "strings" "sync" - "github.com/novox/mesh-control/internal/secrets" + "github.com/novox/mesh-controller/internal/secrets" ) // Shape is how a vendor's credential behaves, and the switch the ADR 0050 carve-out turns on. diff --git a/internal/licences/fortest.go b/internal/licences/fortest.go index 10d9276..193376c 100644 --- a/internal/licences/fortest.go +++ b/internal/licences/fortest.go @@ -13,7 +13,7 @@ import ( "github.com/jackc/pgx/v5" - "github.com/novox/mesh-control/internal/store" + "github.com/novox/mesh-controller/internal/store" ) // ForTest is a fresh licence store in a database of its own, dropped when the test ends. diff --git a/internal/licences/licences.go b/internal/licences/licences.go index face562..b0f49e0 100644 --- a/internal/licences/licences.go +++ b/internal/licences/licences.go @@ -20,9 +20,9 @@ import ( "time" "github.com/jackc/pgx/v5" - "github.com/novox/mesh-control/internal/licences/adapters" - "github.com/novox/mesh-control/internal/secrets" - "github.com/novox/mesh-control/internal/store" + "github.com/novox/mesh-controller/internal/licences/adapters" + "github.com/novox/mesh-controller/internal/secrets" + "github.com/novox/mesh-controller/internal/store" ) // Name is what this context is called: its database and its credential are named after it. diff --git a/internal/licences/refresh_test.go b/internal/licences/refresh_test.go index 6478fda..b7600bb 100644 --- a/internal/licences/refresh_test.go +++ b/internal/licences/refresh_test.go @@ -10,8 +10,8 @@ import ( "golang.org/x/crypto/nacl/box" - "github.com/novox/mesh-control/internal/licences/adapters" - "github.com/novox/mesh-control/internal/secrets" + "github.com/novox/mesh-controller/internal/licences/adapters" + "github.com/novox/mesh-controller/internal/secrets" ) // nodeKeyPair is a node's key as the node would hold it: the public half the mesh seals to, and an diff --git a/internal/licences/submitrefresh_test.go b/internal/licences/submitrefresh_test.go index e12cb19..0e32567 100644 --- a/internal/licences/submitrefresh_test.go +++ b/internal/licences/submitrefresh_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - "github.com/novox/mesh-control/internal/secrets" + "github.com/novox/mesh-controller/internal/secrets" ) // SubmitRefresh is the boundary a manager NODE crosses to publish a refresh it performed: the control diff --git a/internal/link/enrol_shape_test.go b/internal/link/enrol_shape_test.go index 6257950..e28070b 100644 --- a/internal/link/enrol_shape_test.go +++ b/internal/link/enrol_shape_test.go @@ -11,9 +11,9 @@ import ( "golang.org/x/crypto/nacl/box" - "github.com/novox/mesh-control/internal/catalogue" - "github.com/novox/mesh-control/internal/inventory" - "github.com/novox/mesh-control/internal/link" + "github.com/novox/mesh-controller/internal/catalogue" + "github.com/novox/mesh-controller/internal/inventory" + "github.com/novox/mesh-controller/internal/link" ) // What a node says when it joins, as that node's own code writes it. @@ -25,7 +25,7 @@ import ( // Skipped unless MESH_ENROL names the file the host's suite wrote: // // mesh-host: MESH_ENROL_OUT=/tmp/enrol.json go test ./internal/link/ -// mesh-control: MESH_ENROL=/tmp/enrol.json make check +// mesh-controller: MESH_ENROL=/tmp/enrol.json make check // // **What this does not cover**, said so nobody reads more into a pass than is there: the full // enrolment path also issues a broker account, and that needs a broker. What is checked here is diff --git a/internal/link/enrolment.go b/internal/link/enrolment.go index dc7eef2..a7c05f8 100644 --- a/internal/link/enrolment.go +++ b/internal/link/enrolment.go @@ -9,9 +9,9 @@ import ( "fmt" "sort" - "github.com/novox/mesh-control/internal/broker" - "github.com/novox/mesh-control/internal/identity" - "github.com/novox/mesh-control/internal/inventory" + "github.com/novox/mesh-controller/internal/broker" + "github.com/novox/mesh-controller/internal/identity" + "github.com/novox/mesh-controller/internal/inventory" ) // Enrolment is what actually happens when a node presents a token: the token is spent, the key is diff --git a/internal/link/heard_test.go b/internal/link/heard_test.go index c9b438d..01fb10b 100644 --- a/internal/link/heard_test.go +++ b/internal/link/heard_test.go @@ -5,8 +5,8 @@ import ( "strings" "testing" - "github.com/novox/mesh-control/internal/inventory" - "github.com/novox/mesh-control/internal/link" + "github.com/novox/mesh-controller/internal/inventory" + "github.com/novox/mesh-controller/internal/link" ) // Turning what a node said into what the mesh keeps. @@ -152,7 +152,7 @@ func TestABareAliveDoesNotWipeTheDeclarationThatSaysANodeIsCurrent(t *testing.T) func TestAFailureDoesNotBecomeTheAccountOfWhatTheMachineHolds(t *testing.T) { // A partial list is not an account of what the machine holds. Recording one as though it // were would tell a rebuilding node to remove what it still has — which is the fault that - // destroyed a substrate once (novox/hq 04-ISSUES/010). + // destroyed a foundation once (novox/hq 04-ISSUES/010). inv := inventory.ForTest(t) ctx := context.Background() node, err := inv.AddNode(ctx, "workstation") diff --git a/internal/link/protocol.go b/internal/link/protocol.go index a4bea31..28c37c4 100644 --- a/internal/link/protocol.go +++ b/internal/link/protocol.go @@ -88,7 +88,7 @@ type Report struct { // Carried are the machine's ports held by what that host raised from its own bundle. // - // **The half the mesh cannot know** (novox/hq ADR 0038). The substrate is not a module — a + // **The half the mesh cannot know** (novox/hq ADR 0038). The foundation is not a module — a // node raises it before any mesh exists — so without being told, the mesh assigns a module a // port the store or the broker already holds, and hears about it from a container runtime. // diff --git a/internal/overlay/declaration.go b/internal/overlay/declaration.go index 481024c..0039fb4 100644 --- a/internal/overlay/declaration.go +++ b/internal/overlay/declaration.go @@ -127,7 +127,7 @@ func config(node Node, peers []Peer, keyPath string) string { b.WriteString("PostDown = sysctl -q -w net.ipv4.ip_forward=0\n") // And past the machine's own firewall, which on any node with a container runtime is - // closed. Docker sets the FORWARD policy to DROP and inserts its chains, so the substrate + // closed. Docker sets the FORWARD policy to DROP and inserts its chains, so the foundation // this mesh installs at tier 1 silently breaks the network it builds at tier 2: every // spoke reaches the hub, no spoke reaches any other, and every part of it reports // success. Found in the lab; nothing about it is visible from the mesh's own state. diff --git a/internal/overlay/generator.go b/internal/overlay/generator.go index ac6f88b..3b10895 100644 --- a/internal/overlay/generator.go +++ b/internal/overlay/generator.go @@ -5,7 +5,7 @@ import ( "fmt" "strconv" - "github.com/novox/mesh-control/internal/catalogue" + "github.com/novox/mesh-controller/internal/catalogue" ) // The private network as a module rather than as code beside the module system. diff --git a/internal/overlay/opens_test.go b/internal/overlay/opens_test.go index f764f19..06f4c93 100644 --- a/internal/overlay/opens_test.go +++ b/internal/overlay/opens_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - "github.com/novox/mesh-control/internal/catalogue" + "github.com/novox/mesh-controller/internal/catalogue" ) func networkOf(t *testing.T, nodes []Node) *Generator { diff --git a/internal/secrets/sealedbox_xcheck_test.go b/internal/secrets/sealedbox_xcheck_test.go index cbc3dc3..856cb53 100644 --- a/internal/secrets/sealedbox_xcheck_test.go +++ b/internal/secrets/sealedbox_xcheck_test.go @@ -15,7 +15,7 @@ import ( // **Why it must hold.** The refresh token is sealed to the manager node — at adoption and after each // rotation — by the manager MODULE, in TypeScript (mesh-catalog anthropic-manager/sealedbox.ts). The // HOST then unseals it with Go's box.OpenAnonymous (mesh-host identity.SealingKey.Unseal) to mount the -// cleartext, and mesh-control seals every other credential with box.SealAnonymous (secrets.Seal). If +// cleartext, and mesh-controller seals every other credential with box.SealAnonymous (secrets.Seal). If // the TS seal and the Go box disagreed by a byte, the host would refuse the refresh token as a value // it cannot open — silently, as a manager that never gets its credential. So this is load-bearing, and // it is pinned here rather than trusted. diff --git a/internal/secrets/testdata/module-sealedbox-fixture.json b/internal/secrets/testdata/module-sealedbox-fixture.json index bd50c37..6823c09 100644 --- a/internal/secrets/testdata/module-sealedbox-fixture.json +++ b/internal/secrets/testdata/module-sealedbox-fixture.json @@ -1,5 +1,5 @@ { - "_comment": "Produced by mesh-catalog anthropic-manager sealedbox.ts (crypto_box_seal). Proves that value the module seals to a node's public key opens under Go box.OpenAnonymous — the host's Unseal and mesh-control secrets.Seal/Open. Regenerate with the module's compiled seal().", + "_comment": "Produced by mesh-catalog anthropic-manager sealedbox.ts (crypto_box_seal). Proves that value the module seals to a node's public key opens under Go box.OpenAnonymous — the host's Unseal and mesh-controller secrets.Seal/Open. Regenerate with the module's compiled seal().", "managerPublicKey": "rJZ9OSnuCcU5MNi8iV0EK8c5nYN+Cx5A+q+miIIIoUc=", "managerPrivateKey": "wGHx9hpbO1pyvLiw8oGwi31LBce3HscDiGhXpNU+wl4=", "plaintext": "rt-a-refresh-token-only-the-manager-may-read", diff --git a/module.json b/module.json index a6b7c36..a3b7a9d 100644 --- a/module.json +++ b/module.json @@ -1,5 +1,5 @@ { - "module": "mesh-control", + "module": "mesh-controller", "version": "1", "slug": "control", "capabilities": [ @@ -7,42 +7,42 @@ ], "claims": [ { - "name": "the-control-plane", + "name": "the-controller", "scope": "mesh" } ], "own-secrets": { - "inventory": "/var/lib/mesh/mesh-control/inventory", - "identity": "/var/lib/mesh/mesh-control/identity", - "licences": "/var/lib/mesh/mesh-control/licences", - "broker": "/var/lib/mesh/mesh-control/broker", - "broker-management": "/var/lib/mesh/mesh-control/broker-management", - "broker-address": "/var/lib/mesh/mesh-control/broker-address" + "inventory": "/var/lib/mesh/mesh-controller/inventory", + "identity": "/var/lib/mesh/mesh-controller/identity", + "licences": "/var/lib/mesh/mesh-controller/licences", + "broker": "/var/lib/mesh/mesh-controller/broker", + "broker-management": "/var/lib/mesh/mesh-controller/broker-management", + "broker-address": "/var/lib/mesh/mesh-controller/broker-address" }, "resources": [ { "id": "mesh-state", "type": "directory", - "path": "/var/lib/mesh/mesh-control", + "path": "/var/lib/mesh/mesh-controller", "mode": "0700" }, { "id": "control-env", "type": "file", - "path": "/var/lib/mesh/mesh-control/control.env", + "path": "/var/lib/mesh/mesh-controller/control.env", "mode": "0600", "content": "MESH_STORE_INVENTORY=${secret:inventory}\nMESH_STORE_IDENTITY=${secret:identity}\nMESH_STORE_LICENCES=${secret:licences}\nMESH_BROKER_AMQP=${secret:broker}\nMESH_BROKER_MANAGEMENT=${secret:broker-management}\nMESH_BROKER_ADDRESS=${secret:broker-address}\n" }, { "id": "server", "type": "container", - "name": "mesh-control", + "name": "mesh-controller", "network": "host", "args": [ "serve" ], "env-file": [ - "/var/lib/mesh/mesh-control/control.env" + "/var/lib/mesh/mesh-controller/control.env" ], "env": { "MESH_BROKER_CERTIFICATE": "/broker-tls/tls.crt"