From 016ddb2b3ab89d2bae3cdb0e794c40c597798391 Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 28 Sep 2026 16:08:46 +0200 Subject: [PATCH] The catalogue hears what it missed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It asks what it missed on every start and the answer never arrived: the control plane replayed each build it held as a module's event from a module called "control-plane", which does not exist, so its own account refused the publish and the graph kept the gap. The control plane now states those under the seat it holds (novox/hq ADR 0134, mesh-controller #129), so this consumes that too — one handler, because what a build means for the graph is the same whether the build machine says it as it happens or the mesh says what it already held. --- modules/mesh-catalog/index.ts | 16 ++++++++++++++-- modules/mesh-catalog/module.json | 3 ++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/modules/mesh-catalog/index.ts b/modules/mesh-catalog/index.ts index 416f31a..ce85050 100644 --- a/modules/mesh-catalog/index.ts +++ b/modules/mesh-catalog/index.ts @@ -49,7 +49,15 @@ interface Built { replay?: boolean; } -await on("mesh-build-machine.built", async (event) => { +/** + * What a build means for the graph, wherever it came from. + * + * Two emitters say the same thing and neither is a mistake: the build machine says it as it happens, + * and the control plane says what it already held when this module asks what it missed + * (novox/hq ADR 0134). A replay is marked as one in its body, so nothing acts on a module that moved + * months ago — see `replay` above. + */ +const placeTheBuild = async (event: { body: unknown }): Promise => { 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 @@ -91,7 +99,11 @@ await on("mesh-build-machine.built", async (event) => { because: next.because, }); } -}); +}; + +// As it happens, and what the mesh already held when this module asked what it missed. +await on("mesh-build-machine.built", placeTheBuild); +await on("mesh-controller.built-before", placeTheBuild); // **And ask for what was built before this catalogue existed** (novox/hq 04-ISSUES/050). // diff --git a/modules/mesh-catalog/module.json b/modules/mesh-catalog/module.json index 60316c3..f6dd5c7 100644 --- a/modules/mesh-catalog/module.json +++ b/modules/mesh-catalog/module.json @@ -29,7 +29,8 @@ "broker": "/var/lib/mesh/mesh-catalog/broker" }, "consumes": [ - "mesh-build-machine.built" + "mesh-build-machine.built", + "mesh-controller.built-before" ], "emits": [ "registered", -- 2.54.0