From 450ea7eddc68ca148c74c1fd00302a14d5d68d63 Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 22 Nov 2026 00:04:53 +0100 Subject: [PATCH] S10 check-needs: a Go artifact declares what its tests need in its manifest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit catalogue.Artifact gains check-needs (node-modules), the field that replaces the marker file in a package's directory; its readers read it from the manifest. Builds: design 47 H2 §800; H-A-350 DMC-6 --- go/catalogue/config_test.go | 7 ++++--- go/catalogue/manifest.go | 6 ++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/go/catalogue/config_test.go b/go/catalogue/config_test.go index 01e69253..e89fee35 100644 --- a/go/catalogue/config_test.go +++ b/go/catalogue/config_test.go @@ -138,7 +138,7 @@ func TestAConfigManifestIsWrittenBackInItsOwnForm(t *testing.T) { declared := []byte(`{"module":"c","version":"1","config":{"font":{"type":"string","renamed-from":"font-name"}}, "packages":{"mesh-sdk":"0.2"}, "build":{"artifacts":[{"name":"go","kind":"package","language":"go","paths":["go"],"series":"0.2", - "generated-from":"seats"},{"name":"lib","kind":"package","language":"typescript"}]}}`) + "generated-from":"seats","check-needs":"node-modules"},{"name":"lib","kind":"package","language":"typescript"}]}}`) m, err = decodeForTest(declared) if err != nil { t.Fatal(err) @@ -146,12 +146,13 @@ func TestAConfigManifestIsWrittenBackInItsOwnForm(t *testing.T) { if m.Settings["font"].RenamedFrom != "font-name" || m.AcceptedSeries("mesh-sdk") != "0.2" || m.AcceptedSeries("mesh-contracts") != DefaultSeries || m.Build.Artifacts[0].SeriesOf() != "0.2" || m.AcceptedSeries("mesh-sdk", "0.1") != "0.2" || m.AcceptedSeries("mesh-contracts", "0.10", "x", "0.3", "1.0") != "0.3" || - m.Build.Artifacts[0].GeneratedFrom != "seats" || m.Build.Artifacts[1].SeriesOf() != "0.1" { + m.Build.Artifacts[0].GeneratedFrom != "seats" || m.Build.Artifacts[1].SeriesOf() != "0.1" || + m.Build.Artifacts[0].CheckNeeds != "node-modules" || m.Build.Artifacts[1].CheckNeeds != "" { t.Fatalf("read %+v", m) } raw, _ = json.Marshal(m) for _, said := range []string{`"renamed-from":"font-name"`, `"packages":{"mesh-sdk":"0.2"}`, `"series":"0.2"`, - `"generated-from":"seats"`} { + `"generated-from":"seats"`, `"check-needs":"node-modules"`} { if !strings.Contains(string(raw), said) { t.Errorf("written back without %s: %s", said, raw) } diff --git a/go/catalogue/manifest.go b/go/catalogue/manifest.go index e4444846..14cb4738 100644 --- a/go/catalogue/manifest.go +++ b/go/catalogue/manifest.go @@ -1263,6 +1263,12 @@ type Artifact struct { // module carrying it holds contracts only and claims no seat, which the judge refuses naming the seat; the build // modules' test step regenerates the package and fails on a file out of step. GeneratedFrom string `json:"generated-from,omitempty"` + + // CheckNeeds is what a Go artifact's tests need beside its Go toolchain: `node-modules`, the module's npm tree, + // which the pipeline runner has the seat node-build-node install before the integration level (design 47 H2 §800; + // H-A-350 DMC-6). It replaces the marker file check-needs in a package's directory; the Go build module's digest and + // the delivery SDK's step run read it here. Empty needs nothing more. + CheckNeeds string `json:"check-needs,omitempty"` } // AcceptedSeries is the series of the package of that name this module accepts: the one Packages names, or else the