The lab's installer carries a builder, and genesis is told what to build

Both beds now pass a repository and a commit, and refuse to run without them
rather than raising a machine the installer cannot finish.
This commit is contained in:
2026-09-13 04:24:18 +02:00
parent 1ba237a634
commit 607ea241c7
5 changed files with 49 additions and 12 deletions
+14 -2
View File
@@ -73,6 +73,11 @@ const binary = hostBinaryPath();
const installer = bootstrapBinaryPath();
const bundle = process.env["MESH_LAB_BUNDLE"] ?? "";
const modulesEnv = process.env["MESH_LAB_MODULES"] ?? "";
// What the installer is told to build. It carries a builder rather than a finished control plane
// (novox/hq ADR 0073), so genesis is given a repository and a commit — and a commit rather than a
// branch, because what is cloned is the trust anchor for everything this mesh will ever run.
const source = process.env["MESH_LAB_SOURCE"] ?? "";
const sourceRef = process.env["MESH_LAB_SOURCE_REF"] ?? "";
const skip = !capability.usable
? `lab not usable: ${capability.why}`
@@ -82,9 +87,13 @@ const skip = !capability.usable
? "MESH_LAB_BUNDLE is not set to a substrate bundle (mesh-host examples/)"
: !installer || !existsSync(installer)
? "MESH_LAB_BOOTSTRAP_BINARY is not set to a built mesh-bootstrap (mesh-host `make " +
"bootstrap IMAGE=mesh-control:development`). The anchor is raised BY the installer now, " +
"bootstrap IMAGE=mesh-builder:development`). The anchor is raised BY the installer now, " +
"so a run without one would be testing the procedure this bed exists to stop testing"
: false;
: !source
? "MESH_LAB_SOURCE is not set to the repository the control plane is built from"
: !sourceRef
? "MESH_LAB_SOURCE_REF is not set to the commit to build"
: false;
const SCENARIO = "whole-mesh-full";
/** novox hosts the substrate and the control plane; it is where `mesh` commands run. */
@@ -526,6 +535,7 @@ async function genesis(images: HeldImage[]): Promise<GenesisResult> {
const version = await placeBootstrap(name, CONTROL, installer as string,
(m) => console.log(`genesis:${m}`));
report.push(` installer ${version} at ${BOOTSTRAP_PATH}`);
report.push(` builds from ${source} at ${sourceRef.slice(0, 8)}`);
// The catalogue. `mesh-bootstrap --catalog` reads manifests from a CHECKOUT on the machine,
// because at this moment the mesh has no forge, no build machine and — until step 7 finishes —
@@ -560,6 +570,8 @@ async function genesis(images: HeldImage[]): Promise<GenesisResult> {
const command = [
BOOTSTRAP_PATH,
`--source ${source}`,
`--source-ref ${sourceRef}`,
`--bundle /tmp/substrate-template.lock`,
`--catalog ${CATALOGUE_ON_MACHINE}`,
`--node ${CONTROL}`,