From c7aabd303710ef3f5b7763c571f7682f613f40ae Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 28 Sep 2026 03:52:08 +0200 Subject: [PATCH] An edge is recorded by path, like the artifact it points at The test pinned what a build stood on to the address the builder pulled from; the edge names another module's artifact and is kept the way that artifact is (novox/hq 04-ISSUES/102). --- cmd/mesh-controller/addresses_test.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cmd/mesh-controller/addresses_test.go b/cmd/mesh-controller/addresses_test.go index fbe76d2..39ec4ec 100644 --- a/cmd/mesh-controller/addresses_test.go +++ b/cmd/mesh-controller/addresses_test.go @@ -17,8 +17,8 @@ import ( var aDigest = "sha256:" + strings.Repeat("e", 64) -// **A build is recorded by digest and path**, whatever address the builder pushed to — and only -// what the build made is rewritten: an image the module runs from elsewhere is left where it says. +// **A build is recorded by digest and path**, whatever address the builder pushed to — what it +// made and what it stood on both; an image the module runs from elsewhere is left where it says. func TestABuildIsRecordedWithoutTheStoresAddress(t *testing.T) { manifest, _ := json.Marshal(map[string]any{ "module": "gitea", "version": "1", @@ -65,8 +65,11 @@ func TestABuildIsRecordedWithoutTheStoresAddress(t *testing.T) { if strings.Contains(string(kept.Manifest), "anchor.internal:5100") { t.Errorf("the recorded manifest still carries the store's address:\n%s", kept.Manifest) } - if kept.Against[0] != "anchor.internal:5100/mesh-tools/runtime@"+aDigest { - t.Errorf("what the build stood on was rewritten: %v", kept.Against) + // What the build stood on is an edge to another module's artifact, and it is recorded the way + // that artifact is: by path in the store, so the edge still names the same thing when the + // store answers at another address. + if kept.Against[0] != catalogue.ArtifactStoreScheme+"mesh-tools/runtime@"+aDigest { + t.Errorf("what the build stood on was recorded by address: %v", kept.Against) } }