The build queue is controlled through the controller and the build seat (hq ADR 0219) #57

Merged
mesh-admin merged 4 commits from feat/the-build-queue-is-controlled into main 2026-10-05 18:22:02 +00:00
Contributor

Implements hq ADR 0219 (hq #105).

Controller verbs: queue (waiting / in flight with machine / handed back / dead), cancel <id>, clear [--dead], rebuild <module|build>, replay <build> (dry run; --register refused while anything newer is outstanding, --older to roll an older commit out), kill <id>, pause [node], resume [node].
Build seat verbs per machine (announced for console discovery): current, kill (process group + labelled containers, failed outcome, ack), pause/resume (flag survives restart, immediate).
Plans: keep the build id they asked for and accept only its outcome; say a paused seat and are not late (flagged past 24 h); plans retry <id> resumes failed builds and stopped first-machine rollouts; rebuild joins the plan holding the module.
Nothing dropped is silent: cancel/clear/kill leave a failed outcome; a cancelled ask taken in the same instant is ended, not built; a waiting build call hears a cancel.

Grants: holder reads one key of the cancelled set, publishes paused.<own node>, answers its own verb subjects; controller may call the build seat's verbs.

Independently reviewed twice; every must/should/nice item fixed. Full suite with fresh postgres + NATS: all packages ok; -race clean on link, mesh-builder, builder (also fixes a pre-existing race in a link test).

Rollout order: merge this → push the broker's machine (new grants) → merge mesh-catalog feat/build-agent-serves-its-seat (its module check passes only against this controller).

Implements hq ADR 0219 (hq #105). **Controller verbs:** `queue` (waiting / in flight with machine / handed back / dead), `cancel <id>`, `clear [--dead]`, `rebuild <module|build>`, `replay <build>` (dry run; `--register` refused while anything newer is outstanding, `--older` to roll an older commit out), `kill <id>`, `pause [node]`, `resume [node]`. **Build seat verbs per machine** (announced for console discovery): `current`, `kill` (process group + labelled containers, failed outcome, ack), `pause`/`resume` (flag survives restart, immediate). **Plans:** keep the build id they asked for and accept only its outcome; say a paused seat and are not late (flagged past 24 h); `plans retry <id>` resumes failed builds and stopped first-machine rollouts; `rebuild` joins the plan holding the module. **Nothing dropped is silent:** cancel/clear/kill leave a failed outcome; a cancelled ask taken in the same instant is ended, not built; a waiting `build` call hears a cancel. Grants: holder reads one key of the cancelled set, publishes `paused.<own node>`, answers its own verb subjects; controller may call the build seat's verbs. Independently reviewed twice; every must/should/nice item fixed. Full suite with fresh postgres + NATS: all packages ok; `-race` clean on link, mesh-builder, builder (also fixes a pre-existing race in a link test). **Rollout order:** merge this → push the broker's machine (new grants) → merge mesh-catalog `feat/build-agent-serves-its-seat` (its `module check` passes only against this controller).
mesh-admin added 4 commits 2026-10-05 17:50:16 +00:00
A queued ask could only be waited out and a running build only ended by
stopping the machine, which redelivered it elsewhere. The holder now serves
current, kill, pause and resume on its own machine's subjects; a kill ends
the build's process group and labelled containers and settles the ask as
failed, killed by hand; pause is kept in the workspace across a restart and
said on the bus. The controller writes cancelled ids to a cancelled set the
holder reads on taking an ask, closing the race a delete alone leaves.
Nothing showed what waited for a build machine, and an ask could not be
dropped without leaving the plan that made it waiting for ever. New verbs:
queue, cancel, clear, rebuild, replay, kill, pause, resume, and plans retry.
Every ask a person drops is recorded failed through the same take-in as a
failed build; a plan keeps the id it asked each module under and matches
its outcome by it. replay is a dry run unless registered, and registering
an older commit than one registered since needs --older (hq issue 207).
A plan waiting on a seat paused on every holder says so and is not late;
a failed plan can be retried, and a rebuild joins the plan holding the
module instead of running beside it.
The holder's verbs were served and found by nothing; it now answers discovery
with its machine's four, as a runtime announces a seat's verb, so the console
finds <node>/node-build-agent.kill. A cancel publishes no outcome, so a build
waited for also looks at the cancelled set. A plan that stopped at its first
machine is retried by sending that machine the module again, unless a newer
plan holds it.
A registered replay asked now outranked newer asks of its module, and a plan
took any later outcome as its answer. A replay is now refused while the module
is asked anywhere, a plan module asked under an id is answered by that id
alone, and a rebuild of a commit asks what the module follows. An ask handed
back after a restart no longer reads as dead; a cancel that meets a start is
withdrawn; pause holds for an ask fetched as it lands; kill removes containers
before and after the build ends and says whether its outcome went out; a
holder may say only its own machine is paused.
mesh-admin merged commit e0ce2236dd into main 2026-10-05 18:22:02 +00:00
mesh-admin deleted branch feat/the-build-queue-is-controlled 2026-10-05 18:22:02 +00:00
Author
Contributor

Delivery novox/mesh-controller@e0ce2236dd0f — held since 2026-10-06T23:05:28Z

Held for a person: merged without a passing check: only a person decides that it goes on — mesh-delivery.release with why lets it go on.

Delivery plan — builds build-agent, mesh-controller, route-proxy → ace, g14, novox, shanks; no bus step

  • tier 0: mesh-controller
  • tier 1: build-agent
  • tier 2: route-proxy
  • ace: receives build-agent, route-proxy
  • g14: receives build-agent
  • novox: receives mesh-controller, build-agent, route-proxy
  • shanks: receives build-agent
  • build-agent keeps data (ADR 0233): what it holds is backed up before it moves
  • route-proxy provides route: its consumers are sent again after it
  • route-proxy keeps data (ADR 0233): what it holds is backed up before it moves

Transitions

  • 2026-10-06 23:05 (new) → proposed (announced): novox/mesh-controller#57 merged; its head was not heard by this owner, so it is made from the forge's word
  • 2026-10-06 23:05 proposed → held (merged-unchecked): merged without a passing check — a verdict known with it is taken first: only a person decides that it goes on

The commit's note under refs/notes/mesh-plan keeps every transition: git log --notes=mesh-plan.

<!-- mesh-delivery:view --> **Delivery** `novox/mesh-controller@e0ce2236dd0f` — **held** since 2026-10-06T23:05:28Z Held for a person: merged without a passing check: only a person decides that it goes on — `mesh-delivery.release` with why lets it go on. **Delivery plan** — builds build-agent, mesh-controller, route-proxy → ace, g14, novox, shanks; no bus step - tier 0: mesh-controller - tier 1: build-agent - tier 2: route-proxy - ace: receives build-agent, route-proxy - g14: receives build-agent - novox: receives mesh-controller, build-agent, route-proxy - shanks: receives build-agent - build-agent keeps data (ADR 0233): what it holds is backed up before it moves - route-proxy provides route: its consumers are sent again after it - route-proxy keeps data (ADR 0233): what it holds is backed up before it moves **Transitions** - 2026-10-06 23:05 (new) → proposed (announced): novox/mesh-controller#57 merged; its head was not heard by this owner, so it is made from the forge's word - 2026-10-06 23:05 proposed → held (merged-unchecked): merged without a passing check — a verdict known with it is taken first: only a person decides that it goes on The commit's note under `refs/notes/mesh-plan` keeps every transition: `git log --notes=mesh-plan`.
This repo is archived. You cannot comment on pull requests.
No Reviewers
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-controller#57