Two machines holding the build role share one queue, and neither is handed an ask while busy (hq ADR 0190)

Against a real bus: three asks, two machines; each takes one, the third waits until one is free
and then goes to that one; a machine that stops leaves nothing taken twice. The redelivery of an
ask a dead machine held is the ack wait's, proven by the hand-back test beside this one.

And the order a live mesh switches over in, written where the role is named: queued builds first,
then this controller, then build-agent assigned where machines build, then the builder and the old
seat's stream forgotten.
This commit is contained in:
jochen
2026-10-02 22:35:39 +02:00
parent 9f9d9b3b25
commit 905f3363c9
2 changed files with 87 additions and 0 deletions
+7
View File
@@ -22,6 +22,13 @@ import (
// TheBuildMachine is the role a build is submitted to: node-scoped, held on every machine that
// builds, and the work shared among them (novox/hq ADR 0190). The name stays for every caller; what
// it names moved from the mesh's one build machine to whichever build agent is idle.
//
// **Switching a live mesh over, in order.** The old seat's stream and worker
// (SEAT_MESH_BUILD_MACHINE, SEAT_MESH_BUILD_MACHINE_worker) stay on the bus until removed by hand,
// and the builder module keeps draining them while it is assigned. From the moment a controller
// with this name runs, new asks go to node-build-agent and wait in its stream until some machine
// holds the seat. So: let the queued builds finish; roll this controller; register and assign
// build-agent to the machines that build; unassign builder and forget it and its seat's stream.
const TheBuildMachine = "node-build-agent"
// BuildWork is where a build request lands, and BuildOutcome is where its result does. Derived from