diff --git a/modules/mesh-issues/cmd/mesh-issues/manifest_test.go b/modules/mesh-issues/cmd/mesh-issues/manifest_test.go index 8144def1..d8773669 100644 --- a/modules/mesh-issues/cmd/mesh-issues/manifest_test.go +++ b/modules/mesh-issues/cmd/mesh-issues/manifest_test.go @@ -222,3 +222,51 @@ func TestTheOwnersDefaultIsTheTemplatesOwners(t *testing.T) { t.Fatalf("the owners default (%d) and the template's owners (%d) differ", len(m.Config.Owners.Default), len(s.Owners)) } } + +// Every module folder of the catalogue that holds code the mesh builds (a go.mod or a package.json) is a +// registered owner, so an issue is located where it lives and the next new module cannot be missed +// (novox/hq issue 1815: mesh-build-go and mesh-build-node were not on the list). +// 1815/AC1 +func TestEveryCodeModuleOfTheCatalogueIsAnOwner(t *testing.T) { + _, _ = readManifest(t) + 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) + } + modules := filepath.Join("..", "..", "..") + dirs, err := os.ReadDir(modules) + if err != nil { + t.Fatal(err) + } + found := 0 + for _, d := range dirs { + if !d.IsDir() { + continue + } + for _, marker := range []string{"go.mod", "package.json"} { + if _, err := os.Stat(filepath.Join(modules, d.Name(), marker)); err != nil { + continue + } + found++ + if !slices.Contains(s.Owners, "mesh-catalog modules/"+d.Name()) { + t.Errorf("modules/%s holds code (%s) but %q is not among the owners: add it to module.json and files/settings.json", + d.Name(), marker, "mesh-catalog modules/"+d.Name()) + } + break + } + } + if found < 10 { + t.Fatalf("only %d code modules found under %s: the test looks in the wrong place", found, modules) + } + // 1815/AC2: the delivery repository's modules cannot ride on its repository entry (owns refuses a folder + // of a repository that is registered only as a whole), so each is named. + for _, m := range []string{"builder", "checker", "indexer"} { + if Owners(s.Owners).owns("mesh-delivery modules/mesh-delivery-"+m) == "" { + t.Errorf("mesh-delivery-%s is not an owner", m) + } + } +} diff --git a/modules/mesh-issues/files/settings.json b/modules/mesh-issues/files/settings.json index 66abd38f..0c0f17d6 100644 --- a/modules/mesh-issues/files/settings.json +++ b/modules/mesh-issues/files/settings.json @@ -12,6 +12,7 @@ "mesh-catalog modules/betterbird", "mesh-catalog modules/blueman", "mesh-catalog modules/bluetooth", + "mesh-catalog modules/brother", "mesh-catalog modules/ca-trust", "mesh-catalog modules/claude-code", "mesh-catalog modules/claude-licence-manager", @@ -45,6 +46,7 @@ "mesh-catalog modules/influxdb", "mesh-catalog modules/invoicing", "mesh-catalog modules/jira", + "mesh-catalog modules/kernel", "mesh-catalog modules/keycloak", "mesh-catalog modules/lab", "mesh-catalog modules/lemurs", @@ -56,11 +58,23 @@ "mesh-catalog modules/marrytts", "mesh-catalog modules/matrix", "mesh-catalog modules/memory-pressure", + "mesh-catalog modules/mesh-build-go", + "mesh-catalog modules/mesh-build-node", "mesh-catalog modules/mesh-catalog", "mesh-catalog modules/mesh-cli", + "mesh-catalog modules/mesh-config", "mesh-catalog modules/mesh-delivery", "mesh-catalog modules/mesh-delivery-gate", + "mesh-catalog modules/mesh-files", "mesh-catalog modules/mesh-issues", + "mesh-catalog modules/mesh-knowledge", + "mesh-catalog modules/mesh-mail", + "mesh-catalog modules/mesh-mail-notifier", + "mesh-catalog modules/mesh-mail-reader", + "mesh-catalog modules/mesh-mail-web", + "mesh-catalog modules/mesh-provisioner", + "mesh-catalog modules/mesh-provisioner-client", + "mesh-catalog modules/mesh-reads", "mesh-catalog modules/mesh-vault", "mesh-catalog modules/mesh-watcher", "mesh-catalog modules/messenger", @@ -130,11 +144,19 @@ "mesh-controller modules/build-agent", "mesh-controller modules/route-proxy", "mesh-delivery", + "mesh-delivery modules/mesh-delivery-builder", + "mesh-delivery modules/mesh-delivery-checker", + "mesh-delivery modules/mesh-delivery-forge-bridge", + "mesh-delivery modules/mesh-delivery-indexer", + "mesh-delivery modules/mesh-delivery-teller", + "mesh-delivery modules/mesh-delivery-view", + "mesh-delivery modules/mesh-delivery-watchman", "mesh-host", "mesh-lab", "mesh-media-catalog", "mesh-sdk", - "mesh-tools" + "mesh-tools", + "okioki" ], "duplicate-check": "on", "judge-model": "sonnet", diff --git a/modules/mesh-issues/module.json b/modules/mesh-issues/module.json index dcfc71c3..12ded74a 100644 --- a/modules/mesh-issues/module.json +++ b/modules/mesh-issues/module.json @@ -105,6 +105,7 @@ "mesh-catalog modules/betterbird", "mesh-catalog modules/blueman", "mesh-catalog modules/bluetooth", + "mesh-catalog modules/brother", "mesh-catalog modules/ca-trust", "mesh-catalog modules/claude-code", "mesh-catalog modules/claude-licence-manager", @@ -138,6 +139,7 @@ "mesh-catalog modules/influxdb", "mesh-catalog modules/invoicing", "mesh-catalog modules/jira", + "mesh-catalog modules/kernel", "mesh-catalog modules/keycloak", "mesh-catalog modules/lab", "mesh-catalog modules/lemurs", @@ -149,11 +151,23 @@ "mesh-catalog modules/marrytts", "mesh-catalog modules/matrix", "mesh-catalog modules/memory-pressure", + "mesh-catalog modules/mesh-build-go", + "mesh-catalog modules/mesh-build-node", "mesh-catalog modules/mesh-catalog", "mesh-catalog modules/mesh-cli", + "mesh-catalog modules/mesh-config", "mesh-catalog modules/mesh-delivery", "mesh-catalog modules/mesh-delivery-gate", + "mesh-catalog modules/mesh-files", "mesh-catalog modules/mesh-issues", + "mesh-catalog modules/mesh-knowledge", + "mesh-catalog modules/mesh-mail", + "mesh-catalog modules/mesh-mail-notifier", + "mesh-catalog modules/mesh-mail-reader", + "mesh-catalog modules/mesh-mail-web", + "mesh-catalog modules/mesh-provisioner", + "mesh-catalog modules/mesh-provisioner-client", + "mesh-catalog modules/mesh-reads", "mesh-catalog modules/mesh-vault", "mesh-catalog modules/mesh-watcher", "mesh-catalog modules/messenger", @@ -223,11 +237,19 @@ "mesh-controller modules/build-agent", "mesh-controller modules/route-proxy", "mesh-delivery", + "mesh-delivery modules/mesh-delivery-builder", + "mesh-delivery modules/mesh-delivery-checker", + "mesh-delivery modules/mesh-delivery-forge-bridge", + "mesh-delivery modules/mesh-delivery-indexer", + "mesh-delivery modules/mesh-delivery-teller", + "mesh-delivery modules/mesh-delivery-view", + "mesh-delivery modules/mesh-delivery-watchman", "mesh-host", "mesh-lab", "mesh-media-catalog", "mesh-sdk", - "mesh-tools" + "mesh-tools", + "okioki" ] }, "duplicate-check": {