From d88c0f269d5f81c52138e52c7129e9f0bcd08ba7 Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 8 Nov 2026 15:44:19 +0100 Subject: [PATCH] Grants test: compare the record against a deep copy, so a written holding fails it (issue 1966) Claude-Session: https://claude.ai/code/session_01NcbgfFfQ4Z9UE5jK32PmE5 --- modules/mesh-grants/grants_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/mesh-grants/grants_test.go b/modules/mesh-grants/grants_test.go index 5ba770c3..1cfe5cd9 100644 --- a/modules/mesh-grants/grants_test.go +++ b/modules/mesh-grants/grants_test.go @@ -1325,7 +1325,11 @@ func TestGrants(t *testing.T) { in.Manifests[c] = claimer(c) in.Assigned["b"] = append(in.Assigned["b"], c) } - before := in.Placed + before := maps.Clone(in.Placed) + for node, p := range before { + p.Holds = slices.Clone(p.Holds) + before[node] = p + } recs, gaps := grants.ListRecords(in) users, refusedU, err := grants.ComposeEach(recs) if len(refusedU) != 0 {