From a252aae862410ad2b50b6c7953b96acde5ef9de2 Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 23 Oct 2026 15:12:21 +0200 Subject: [PATCH] Make the build modules and the delivery parts core issue owners and drop build-agent (issue 1041, E3) --- modules/mesh-issues/cmd/mesh-issues/check.go | 7 +-- .../mesh-issues/cmd/mesh-issues/core_test.go | 47 +++++++++++++++++++ modules/mesh-issues/files/settings.json | 1 - modules/mesh-issues/module.json | 1 - 4 files changed, 51 insertions(+), 5 deletions(-) create mode 100644 modules/mesh-issues/cmd/mesh-issues/core_test.go diff --git a/modules/mesh-issues/cmd/mesh-issues/check.go b/modules/mesh-issues/cmd/mesh-issues/check.go index 3cb2bae9..50ec850e 100644 --- a/modules/mesh-issues/cmd/mesh-issues/check.go +++ b/modules/mesh-issues/cmd/mesh-issues/check.go @@ -174,9 +174,10 @@ func (o Owners) locatedIn(e string) (string, error) { } // core is an owner whose issues are core issues (hq cycle.py, to-be 45): the controller, the node-engine, -// the tool runner and the console, the SDK, and the catalogue's bus, forge and build agent. -var core = regexp.MustCompile(`\b(mesh-controller|mesh-host|mesh-tools|mesh-sdk|node-tools|` + - `mesh-catalog\s+modules/(nats|gitea|build-agent))\b`) +// the tool runner and the console, the SDK, the delivery parts, and the catalogue's bus, forge and build modules +// (issue 1041; the build agent is gone, ADR 0524 §5). +var core = regexp.MustCompile(`\b(mesh-controller|mesh-host|mesh-tools|mesh-sdk|node-tools|mesh-delivery|` + + `mesh-build-(go|node|image)|mesh-catalog\s+modules/(nats|gitea))\b`) // IsCore says whether an issue located in these owners is a core issue (ADR 0237). func IsCore(locatedIn []string) bool { diff --git a/modules/mesh-issues/cmd/mesh-issues/core_test.go b/modules/mesh-issues/cmd/mesh-issues/core_test.go new file mode 100644 index 00000000..8057324a --- /dev/null +++ b/modules/mesh-issues/cmd/mesh-issues/core_test.go @@ -0,0 +1,47 @@ +package main + +import ( + "encoding/json" + "os" + "path/filepath" + "strings" + "testing" +) + +// Issue 1041 (R4g, E3): the build seat's modules and the delivery parts are core, and build-agent is no owner any more. +func TestIsCoreNamesTheBuildModulesAndTheDeliveryParts(t *testing.T) { + for _, e := range []string{ + "mesh-catalog modules/mesh-build-go", "mesh-catalog modules/mesh-build-node", "mesh-catalog modules/mesh-build-image", + "mesh-catalog modules/mesh-build-go/cmd/mesh-build-go", + "mesh-delivery", "mesh-delivery modules/mesh-delivery-checker", "mesh-catalog modules/mesh-delivery-gate", + "mesh-catalog modules/nats", "mesh-catalog modules/gitea", "mesh-controller", + } { + if !IsCore([]string{e}) { + t.Errorf("an issue located in %q is not core", e) + } + } + for _, e := range []string{"mesh-catalog modules/records", "hq", "mesh-catalog modules/mesh-issues", "mesh-catalog modules/mesh-build-extra"} { + if IsCore([]string{e}) { + t.Errorf("an issue located in %q is core", e) + } + } +} + +func TestNoOwnerNamesBuildAgent(t *testing.T) { + if IsCore([]string{"mesh-catalog modules/build-agent"}) { + t.Error("mesh-catalog modules/build-agent is core: build-agent is gone") + } + tmpl, err := os.ReadFile(filepath.Join("..", "..", "files", "settings.json")) + if err != nil { + t.Fatal(err) + } + var s Settings + if err := json.Unmarshal(tmpl, &s); err != nil { + t.Fatal(err) + } + for _, o := range s.Owners { + if strings.Contains(o, "build-agent") { + t.Errorf("the owner %q is registered: build-agent is gone (ADR 0524 §5)", o) + } + } +} diff --git a/modules/mesh-issues/files/settings.json b/modules/mesh-issues/files/settings.json index 92887e0e..1cb2d002 100644 --- a/modules/mesh-issues/files/settings.json +++ b/modules/mesh-issues/files/settings.json @@ -142,7 +142,6 @@ "mesh-catalog modules/zsh-autosuggestions", "mesh-catalog modules/zsh-syntax-highlighting", "mesh-controller", - "mesh-controller modules/build-agent", "mesh-controller modules/route-proxy", "mesh-delivery", "mesh-delivery modules/mesh-delivery-builder", diff --git a/modules/mesh-issues/module.json b/modules/mesh-issues/module.json index bb2601eb..830e1495 100644 --- a/modules/mesh-issues/module.json +++ b/modules/mesh-issues/module.json @@ -235,7 +235,6 @@ "mesh-catalog modules/zsh-autosuggestions", "mesh-catalog modules/zsh-syntax-highlighting", "mesh-controller", - "mesh-controller modules/build-agent", "mesh-controller modules/route-proxy", "mesh-delivery", "mesh-delivery modules/mesh-delivery-builder",