From fa918318b2a0d9086ee32b4613bb44f4f99ee334 Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 1 Nov 2026 02:14:21 +0100 Subject: [PATCH] Test the checker's latest package versions The checker builds every Go check against them (issue 1585, S14); a row in the repoModules test proves they come from the modules that hold each package and leave out a package no module holds. Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL --- .../cmd/mesh-delivery-checker/judge_test.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/mesh-delivery-checker/cmd/mesh-delivery-checker/judge_test.go b/modules/mesh-delivery-checker/cmd/mesh-delivery-checker/judge_test.go index 0c04f87..53c5ed0 100644 --- a/modules/mesh-delivery-checker/cmd/mesh-delivery-checker/judge_test.go +++ b/modules/mesh-delivery-checker/cmd/mesh-delivery-checker/judge_test.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "os" + "reflect" "strings" "testing" @@ -112,6 +113,20 @@ func TestTheTypeScriptPackagesPathsComeFromTheIndexersModulesNotTheManifest(t *t if got := r.PackagePaths("novox/mesh-delivery"); len(got) != 0 { t.Errorf("another repository: %v", got) } + // Issue 1585 (ADR 0573 §2): the latest published version of mesh-sdk's Go module and of every package a module uses is + // the commit of the module that holds it; a package no module holds is left out. + put(".", nil) + const contract = "git.novox.be/novox/mesh-controller/modules/route-proxy/contract" + user, err := delivery.EncodeModule(delivery.Module{Repository: "novox/mesh-catalog", Commit: strings.Repeat("b", 40), FP: "src1:" + strings.Repeat("b", 64), + Manifest: delivery.ManifestDigest([]byte(sdkManifest)), Path: "modules/x", + Inputs2: &delivery.KeptInputs2{Tree: "t", Packages: []string{contract, "git.novox.be/novox/mesh-sdk/go"}}}) + if err != nil { + t.Fatal(err) + } + r.Put(context.Background(), "x", user, false) + if got := r.LatestPackages(); !reflect.DeepEqual(got, delivery.PackageVersions{"git.novox.be/novox/mesh-sdk/go": strings.Repeat("a", 40)}) { + t.Errorf("latest packages = %v, want mesh-sdk at its module's commit and no unheld contract", got) + } } // A manifest whose config value falls back to a predefined key (ADR 0348 §7) is read, not logged as unreadable for the