Rename mesh-control -> mesh-controller, substrate -> foundation
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
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// Package examples checks the bundles shipped in this directory.
|
||||
//
|
||||
// **Nothing checked them before.** `substrate-first-node.lock` is what a machine becomes when
|
||||
// **Nothing checked them before.** `foundation-first-node.lock` is what a machine becomes when
|
||||
// there is no mesh to ask — the one declaration applied with nothing to verify it against — and
|
||||
// it was edited by hand and read by nobody but a running host.
|
||||
package examples
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
|
||||
func bundle(t *testing.T) *declaration.Declaration {
|
||||
t.Helper()
|
||||
raw, err := os.ReadFile("substrate-first-node.lock")
|
||||
raw, err := os.ReadFile("foundation-first-node.lock")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -27,12 +27,12 @@ func bundle(t *testing.T) *declaration.Declaration {
|
||||
return d
|
||||
}
|
||||
|
||||
// Defends novox/hq ADR 0028: the substrate supplies the control plane and nothing else.
|
||||
// Defends novox/hq ADR 0028: the foundation supplies the control plane and nothing else.
|
||||
//
|
||||
// The object store was substrate for months on the strength of "it cannot grant itself a bucket",
|
||||
// The object store was foundation for months on the strength of "it cannot grant itself a bucket",
|
||||
// which answers half the test. The control plane never needed one, and nothing noticed because
|
||||
// nothing counted what the bundle holds.
|
||||
func TestTheBundleCarriesTheSubstrateAndTheControlPlaneAndNothingElse(t *testing.T) {
|
||||
func TestTheBundleCarriesTheFoundationAndTheControlPlaneAndNothingElse(t *testing.T) {
|
||||
var images []string
|
||||
for _, r := range bundle(t).Resources {
|
||||
c, ok := r.(*declaration.Container)
|
||||
@@ -48,7 +48,7 @@ func TestTheBundleCarriesTheSubstrateAndTheControlPlaneAndNothingElse(t *testing
|
||||
}
|
||||
sort.Strings(images)
|
||||
|
||||
want := []string{"lavinmq", "mesh-control", "postgres"}
|
||||
want := []string{"lavinmq", "mesh-controller", "postgres"}
|
||||
if strings.Join(images, ",") != strings.Join(want, ",") {
|
||||
t.Fatalf("the bundle carries %v; expected exactly %v.\n\n"+
|
||||
"Adding one is a change to what every first node becomes, and to ADR 0006's "+
|
||||
@@ -57,13 +57,13 @@ func TestTheBundleCarriesTheSubstrateAndTheControlPlaneAndNothingElse(t *testing
|
||||
}
|
||||
|
||||
// The control plane is in the bundle, and the design overlooked it once by reasoning about
|
||||
// substrate services rather than counting containers (novox/hq 03-DESIGN/01-to-be/07).
|
||||
// foundation services rather than counting containers (novox/hq 03-DESIGN/01-to-be/07).
|
||||
func TestTheControlPlaneIsCarriedToo(t *testing.T) {
|
||||
for _, r := range bundle(t).Resources {
|
||||
if c, ok := r.(*declaration.Container); ok && strings.Contains(c.Image, "mesh-control") {
|
||||
if c, ok := r.(*declaration.Container); ok && strings.Contains(c.Image, "mesh-controller") {
|
||||
return
|
||||
}
|
||||
}
|
||||
t.Fatal("nothing in the bundle starts the control plane, so the machine would raise a " +
|
||||
"substrate and stop")
|
||||
"foundation and stop")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user