From 24f50c7c86d9d37e0d5e07f52eec23be6447c929 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 22 Oct 2026 21:39:55 +0200 Subject: [PATCH] mesh-build-go: name go.mod among the narrowing test's paths, since mesh-sdk 104533e8 keeps only the manifest and the lock files beside them (review finding S1) --- .../cmd/mesh-build-go/narrow_integration_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/mesh-build-go/cmd/mesh-build-go/narrow_integration_test.go b/modules/mesh-build-go/cmd/mesh-build-go/narrow_integration_test.go index 421e1f6b..e7478478 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/narrow_integration_test.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/narrow_integration_test.go @@ -13,7 +13,8 @@ import ( // ADR 0499 ยง4 (issue 1758): a fetch asked with the module's directory and its named paths leaves the workspace holding // only those, the manifest and the lock files; the rest of the commit is gone before any run step; a request naming -// paths without a directory is refused before anything is fetched. +// paths without a directory is refused before anything is fetched. go.mod is kept only when named among the paths +// (mesh-sdk's narrowKept is the manifest and the lock files, review finding S1), as a Go build that names its paths does. func TestAFetchWithNamedPathsNarrowsTheWorkspace(t *testing.T) { f := newForge(t) _, head := f.repo("novox/narrow", map[string]string{ @@ -26,7 +27,7 @@ func TestAFetchWithNamedPathsNarrowsTheWorkspace(t *testing.T) { "other/o.go": "package other\n", }) m, states := f.module(t) - res, st := fetched(t, m, states, map[string]any{"repository": "novox/narrow", "commit": head, "dir": "lib", "paths": []any{"cmd"}}) + res, st := fetched(t, m, states, map[string]any{"repository": "novox/narrow", "commit": head, "dir": "lib", "paths": []any{"cmd", "go.mod"}}) if st.State != delivery.StepPassed { t.Fatalf("the fetch ended %s: %s", st.State, st.Reason) }