From c2967432e68ec4d24b1c09c5eab7520b8f0268a0 Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 23 Oct 2026 15:20:27 +0200 Subject: [PATCH] =?UTF-8?q?Refuse=20the=20build=20queue's=20verbs=20by=20n?= =?UTF-8?q?ame=20and=20drop=20the=20rows=20R4e=20removed,=20so=20a=20calle?= =?UTF-8?q?r=20is=20told=20the=20backlog=20is=20the=20delivery=20view's=20?= =?UTF-8?q?and=20a=20pause=20the=20build=20seat's=20(issue=201887=20A9b,?= =?UTF-8?q?=20ADR=200525=20=C2=A79)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go/catalogue/verbs.go | 45 +++++++++------------------------- go/catalogue/verbs_r4g_test.go | 31 +++++++++++++++++++++++ 2 files changed, 43 insertions(+), 33 deletions(-) create mode 100644 go/catalogue/verbs_r4g_test.go diff --git a/go/catalogue/verbs.go b/go/catalogue/verbs.go index 266bac6..bdf299b 100644 --- a/go/catalogue/verbs.go +++ b/go/catalogue/verbs.go @@ -350,36 +350,24 @@ var ControllerVerbs = []Verb{ "its shell — `node show ace`, `module list`, `plans`, `conditions show ` — and answer what it " + "printed. The generic verb beside the named ones (novox/hq ADR 0154), and since ADR 0266 it only reads: " + "status, version, help, seats, healers, hand-acts, durations, collection, images, artifacts, data, builds, " + - "queue, plan, plans (not stop/close/go), doctor (not run), conditions list/show/history, node list/show, " + + "plan, plans (not stop/close/go), doctor (not run), conditions list/show/history, node list/show, " + "module list, settings show/preferences, retire list, cleanup list, delivery plan/walks, bus, mirrors (not " + "--record/--confirm). What writes has its named verb; what sets a key, issues a credential or a token, or " + "accepts, recovers or exports a secret is the controller's terminal's alone.", Input: schema(map[string]string{ "command": "the command line, as the controller's binary takes it; quotes group a word with spaces", }, []string{"command"})}, - // The build queue, controlled by hand (novox/hq ADR 0219). Every verb that drops an ask leaves a - // failed outcome for it, so a plan waiting on it fails visibly instead of hanging. - {Name: "queue", Description: "Every ask in the build queue: waiting, in flight (on which machine, for how long), " + - "and dead (handed out as often as allowed and never settled) — each with its id, repository, path, ref and when it was asked. " + - "Answers the table as text and, as data, each ask's state, kind (check or build), repository, commit, machine, since " + - "and position among the waiting (novox/hq issue 455).", + // The build queue went with build-agent (novox/hq ADR 0525 §9): asks are the build seats' streams, their backlog the + // streams' own state, shown in the delivery view. The verbs are refused by name for one release, naming that. + {Name: "queue", Description: "Removed in R4g (ADR 0525 §9): refused by name, naming its replacement: the build seats' backlog in the delivery view", Input: schema(nil, nil)}, - {Name: "cancel", Description: "Drop one waiting or dead ask from the build queue; its outcome is recorded failed, " + - "cancelled by hand, and a plan that asked for it fails. One in flight is refused: `kill` ends it where it runs.", - Input: schema(map[string]string{"id": "the ask's build id, as `queue` lists it"}, []string{"id"})}, - {Name: "clear", Description: "Cancel every waiting ask in the build queue — and with dead, every dead one too — each " + - "recorded failed, cancelled by hand. Never touches one in flight.", - Input: schema(map[string]string{"dead": "\"true\" to cancel the dead asks as well"}, nil, "dead")}, - {Name: "rebuild", Description: "Removed in R4e (ADR 0501 §5 / ADR 0503 §3): refused by name, naming its replacement", - Input: schema(nil, nil)}, - {Name: "replay", Description: "Ask a recorded build's repository and path again at the commit it built, under a new id: " + - "a dry run only, nothing recorded or registered (novox/hq ADR 0429 §18: a fingerprint's key is built again by the " + - "builder, never registered by hand).", - Input: schema(map[string]string{"id": "the build's id"}, []string{"id"})}, + {Name: "cancel", Description: "Removed in R4g (ADR 0525 §9): refused by name, naming its replacement", Input: schema(nil, nil)}, + {Name: "clear", Description: "Removed in R4g (ADR 0525 §9): refused by name, naming its replacement", Input: schema(nil, nil)}, + {Name: "replay", Description: "Removed in R4g (ADR 0525 §9): refused by name, naming its replacement", Input: schema(nil, nil)}, // novox/hq issue 686: a builder ran a branch's store tests for the first time in its pull request's merge check. {Name: "try", Description: "Try a pushed branch or commit before its pull request (novox/hq issue 686): the " + "checker (mesh-delivery-checker) merges the head onto the repository's trunk and runs its levels on the merge, " + - "as it judges a pull request (ADR 0503 §3); no merge-check.sh is run and build-agent is not asked. Answers at " + + "as it judges a pull request (ADR 0503 §3), its levels asks on the build seats (ADR 0525 §1); no merge-check.sh is run. Answers at " + "once with an id; asked again with that id it waits up to 20 s and answers pass, fail or error, how long it " + "took and the lines naming what failed — or that it is still waiting or running, to ask again. Sets no " + "status on the forge, registers and builds nothing for delivery. One try of a commit at a time — a second " + @@ -388,23 +376,14 @@ var ControllerVerbs = []Verb{ "repository": "the repository on the forge, owner/name; with ref", "ref": "the branch or commit to try, as pushed to the forge", "base": "the branch it is merged into (the repository's default branch when none is named)", - "tests": "only the tests this `go test -run` pattern names, where the repository's merge-check.sh reads " + - "MESH_CHECK_TESTS; a script that does not runs whole", + "tests": "only the tests this `go test -run` pattern names", "store-only": "\"true\": only the integration level", "id": "instead of a repository: the id a try answered, to read what came of it", }, nil, "store-only"), Replaces: []string{"sh merge-check.sh", "docker run postgres"}}, - // novox/hq ADR 0350 §5: asked by the delivery's owner when the forge says a pull request closed unmerged. - {Name: "forget-checks", Description: "Removed in R4e (ADR 0501 §5 / ADR 0503 §3): refused by name, naming its replacement", - Input: schema(nil, nil)}, - {Name: "kill", Description: "End a build where it runs: the machine that took it stops its commands and containers and " + - "announces it failed, killed by hand — settled, never handed to another machine.", - Input: schema(map[string]string{"id": "the build's id"}, []string{"id"})}, - {Name: "pause", Description: "The build seat's holder on one machine — or every holder — takes no new build until resumed; " + - "a build running finishes. Kept across a restart of the holder. A plan waiting on a paused seat says so and is not late.", - Input: schema(map[string]string{"node": "one machine; every holder when absent"}, nil)}, - {Name: "resume", Description: "The build seat's holder on one machine — or every holder — takes builds again.", - Input: schema(map[string]string{"node": "one machine; every holder when absent"}, nil)}, + {Name: "kill", Description: "Removed in R4g (ADR 0525 §9): refused by name, naming its replacement: a build seat's ask ends where it runs", Input: schema(nil, nil)}, + {Name: "pause", Description: "Removed in R4g (ADR 0525 §9): refused by name, naming its replacement: /node-build-.pause", Input: schema(nil, nil)}, + {Name: "resume", Description: "Removed in R4g (ADR 0525 §9): refused by name, naming its replacement: /node-build-.resume", Input: schema(nil, nil)}, // Acts done by hand, and what the bounds are set from (novox/hq to-be 45 §7, Phase 0). {Name: "hand-act", Description: "Record an act done by hand outside the mesh — a container restarted, a file " + "edited, a service started on a machine — with why and its cause, in the hand-act log beside the pushes and " + diff --git a/go/catalogue/verbs_r4g_test.go b/go/catalogue/verbs_r4g_test.go new file mode 100644 index 0000000..41e1876 --- /dev/null +++ b/go/catalogue/verbs_r4g_test.go @@ -0,0 +1,31 @@ +package catalogue + +import ( + "strings" + "testing" +) + +// 1887/A9b: the build queue's verbs are refused by name, naming what replaced them, and the verbs R4e removed are gone. +func TestTheBuildQueueVerbsAreRefusedByName(t *testing.T) { + rows := map[string]Verb{} + for _, v := range ControllerVerbs { + rows[v.Name] = v + } + for _, gone := range []string{"rebuild", "forget-checks"} { + if _, ok := rows[gone]; ok { + t.Errorf("the controller still lists %s", gone) + } + } + for _, refused := range []string{"queue", "cancel", "clear", "kill", "pause", "resume", "replay"} { + v, ok := rows[refused] + if !ok || !strings.HasPrefix(v.Description, "Removed in R4g (ADR 0525 §9): refused by name") { + t.Errorf("%s = %q, want refused by name", refused, v.Description) + } + } + if !strings.Contains(rows["queue"].Description, "delivery view") || !strings.Contains(rows["pause"].Description, "node-build-") { + t.Errorf("queue and pause do not name their replacements: %q, %q", rows["queue"].Description, rows["pause"].Description) + } + if strings.Contains(rows["try"].Description, "build-agent") { + t.Errorf("try still names build-agent: %q", rows["try"].Description) + } +}