From 6bbbceb55f8992e652fbadda8ba8bd7381c4e4e6 Mon Sep 17 00:00:00 2001 From: jochen Date: Tue, 10 Nov 2026 17:18:47 +0100 Subject: [PATCH] A-D29: a template in the runner's manifest is refused, as in every part on the validator's list (issue 1966) Design 47 *A module's registration* (b229f5c4 lines 480-481): a unit test of the manifest validator refuses a template in the manifest of every part on its list, the runner's included. The row of TestTheIndexerJudgesEveryManifestOnce now judges mesh-delivery-pipeline beside mesh-config; it fails with the list as it stood before 0ad243c1. Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ --- .../internal/index/verdicts_test.go | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/mesh-delivery-indexer/internal/index/verdicts_test.go b/modules/mesh-delivery-indexer/internal/index/verdicts_test.go index f8b1ab7e..c1d529ac 100644 --- a/modules/mesh-delivery-indexer/internal/index/verdicts_test.go +++ b/modules/mesh-delivery-indexer/internal/index/verdicts_test.go @@ -359,12 +359,16 @@ func TestTheIndexerJudgesEveryManifestOnce(t *testing.T) { } } // DLV-J1 (ADR 0619 §1, §3): a foundation part asking bus state in the new form is refused; the nine and the pipeline runner are the foundation. - cfg := hold("mesh-config", `{"module":"mesh-config","version":"1","requires":[{"name":"cache","storage":"key-value","template":"state"}]}`) - if _, err := ix.JudgeAll(ctx, map[string]bool{cfg: true}); err != nil { - t.Fatal(err) - } - if v := verdict(cfg); !meshcatalogclient.VerdictRefuses(v) || !strings.Contains(strings.Join(v.Problems, " "), "part of the foundation") { - t.Fatalf("mesh-config asking new-form bus state: %+v", v) + // Design 47 *A module's registration* (b229f5c4 lines 480-481): a template in the manifest of every part on the list is + // refused, the runner's included. + for _, part := range []string{"mesh-config", "mesh-delivery-pipeline"} { + d := hold(part, `{"module":"`+part+`","version":"1","requires":[{"name":"cache","storage":"key-value","template":"state"}]}`) + if _, err := ix.JudgeAll(ctx, map[string]bool{d: true}); err != nil { + t.Fatal(err) + } + if v := verdict(d); !meshcatalogclient.VerdictRefuses(v) || !strings.Contains(strings.Join(v.Problems, " "), "part of the foundation") { + t.Fatalf("%s asking new-form bus state: %+v", part, v) + } } if !slices.Equal(judge.Foundation, []string{"nats", "mesh-grants", "mesh-delivery-indexer", "mesh-delivery-assigner", "node-tools", "mesh-delivery-builder", "mesh-delivery-checker", "mesh-config", "mesh-vault", "mesh-delivery-pipeline"}) {