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:
2026-09-16 18:40:40 +02:00
parent 49b80d8516
commit 5d6e8fbe7a
89 changed files with 785 additions and 785 deletions
+8 -8
View File
@@ -9,7 +9,7 @@
* agree over a wire. Everything either side of the wire is already asserted in its own suite.
*
* MESH_LAB_HOST_BINARY a built mesh-host
* MESH_LAB_BUNDLE the substrate bundle
* MESH_LAB_BUNDLE the foundation bundle
* MESH_LAB_BUILDER a built mesh-builder
*/
@@ -20,7 +20,7 @@ import { loadScenario } from "../../src/declaration/parse.ts";
import { raise } from "../../src/lifecycle/raise.ts";
import { destroy, exec } from "../../src/lifecycle/operate.ts";
import { hostBinaryPath, HOST_PATH } from "../../src/lifecycle/place.ts";
import { labIsUsable, destroyAll, substrateBundle } from "./harness.ts";
import { labIsUsable, destroyAll, foundationBundle } from "./harness.ts";
import type { HeldImage } from "../../src/pinning.ts";
import { incus } from "../../src/incus/client.ts";
import { machineName } from "../../src/lifecycle/names.ts";
@@ -35,7 +35,7 @@ const skip = !capability.usable
: !host || !existsSync(host)
? "MESH_LAB_HOST_BINARY is not set to a built mesh-host"
: !bundle || !existsSync(bundle)
? "MESH_LAB_BUNDLE is not set to a substrate bundle"
? "MESH_LAB_BUNDLE is not set to a foundation bundle"
: !builder || !existsSync(builder)
? "MESH_LAB_BUILDER is not set to a built mesh-builder"
: false;
@@ -79,12 +79,12 @@ async function must(command: string): Promise<string> {
}
async function mesh(command: string): Promise<string> {
return must(`docker exec mesh-control /mesh-control ${command}`);
return must(`docker exec mesh-controller /mesh-controller ${command}`);
}
/** The bundle: ours by the ID the machine holds, everything else upstream. */
function bundleFor(images: HeldImage[]): string {
return substrateBundle(bundle, images);
return foundationBundle(bundle, images);
}
before(async () => {
@@ -92,8 +92,8 @@ before(async () => {
const raised = await raise(loadScenario(`scenarios/${SCENARIO}.yml`), {});
instanceId = raised.instanceId;
await must(`cat > /tmp/substrate.lock <<'MESHBUNDLE'\n${bundleFor(raised.images)}\nMESHBUNDLE`);
await must(`${HOST_PATH} apply /tmp/substrate.lock`);
await must(`cat > /tmp/foundation.lock <<'MESHBUNDLE'\n${bundleFor(raised.images)}\nMESHBUNDLE`);
await must(`${HOST_PATH} apply /tmp/foundation.lock`);
// The mesh's artifact store, standing where the `registry` module would. Read back rather than
// assumed: a builder publishing into a registry that never came up fails several minutes later,
@@ -166,7 +166,7 @@ test("a build that cannot succeed says why, and records nothing", { skip, timeou
// A failure is a result. A build that fails silently is indistinguishable from a builder that
// is not running, and those want completely different responses.
const { out, ok } = await on(
`docker exec mesh-control /mesh-control build /root/does-not-exist --wait 120s`,
`docker exec mesh-controller /mesh-controller build /root/does-not-exist --wait 120s`,
);
assert.equal(ok, false, "a build of nothing reported success");
assert.match(out, /could not build/, out);