From b58a3b487de817d4c706252bd1e34305fa710384 Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 27 Sep 2026 15:37:21 +0200 Subject: [PATCH] A build's outcome belongs to the role, not to the module holding it ADR 0121. The builder declared `built` as its own event, so every consumer depended on which module happens to be the build machine today. It is the build-machine role's event now: the builder declares none of its own, and the catalogue listens for `mesh-build-machine.built` rather than `builder.built`. Nothing changes about what reaches the catalogue. What changes is that it survives the build machine being a different module, which is the whole reason the mesh has a word for a role. --- modules/builder/module.json | 3 --- modules/mesh-catalog/index.ts | 4 ++-- modules/mesh-catalog/module.json | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/builder/module.json b/modules/builder/module.json index de6ea36..a6cf4a1 100644 --- a/modules/builder/module.json +++ b/modules/builder/module.json @@ -20,9 +20,6 @@ "secrets": { "npm-package-registry": "/var/lib/mesh/builder/package-registry.secret" }, - "emits": [ - "built" - ], "own-secrets": { "broker": "/var/lib/mesh/builder/broker" }, diff --git a/modules/mesh-catalog/index.ts b/modules/mesh-catalog/index.ts index bb68529..0c703a2 100644 --- a/modules/mesh-catalog/index.ts +++ b/modules/mesh-catalog/index.ts @@ -1,6 +1,6 @@ // mesh-catalog's entrypoint — the module graph's consumer (novox/hq ADR 0070, ADR 0072). // -// The builder announces what it built; this places it in the graph and announces what that means. +// The build-machine role announces what it built; this places it in the graph and announces what that means. // The control plane hooks the *meaning* — a module was upgraded — rather than the build output, so // it never has to interpret an artifact or ask this module anything. // @@ -47,7 +47,7 @@ interface Built { replay?: boolean; } -await on("builder.built", async (event) => { +await on("mesh-build-machine.built", async (event) => { const body = event.body as Built; if (!body.module || !body.commit) { // Said rather than dropped: a build that announced itself without saying what it built is a diff --git a/modules/mesh-catalog/module.json b/modules/mesh-catalog/module.json index e940df4..e396055 100644 --- a/modules/mesh-catalog/module.json +++ b/modules/mesh-catalog/module.json @@ -29,7 +29,7 @@ "broker": "/var/lib/mesh/mesh-catalog/broker" }, "consumes": [ - "builder.built" + "mesh-build-machine.built" ], "emits": [ "registered",