From 0830fcb25ec4c8d528acc5d343ad9fb395898591 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 28 Oct 2026 22:17:40 +0100 Subject: [PATCH] Hold that a refused module not held today keeps the answer refused (issue 1126) --- go/compose/frombus/answer_rows_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/go/compose/frombus/answer_rows_test.go b/go/compose/frombus/answer_rows_test.go index e62289e..46461d1 100644 --- a/go/compose/frombus/answer_rows_test.go +++ b/go/compose/frombus/answer_rows_test.go @@ -98,6 +98,12 @@ func answerNamesEveryRefusalAndLeavesAnOldBuildToTheNode(t *testing.T) { if today.Verdict == delivery.CandidateRefused || len(today.Refusals) != 0 || len(today.Held) != 3 || today.Held[0].Why == "" { t.Errorf("held as today: %+v", today) } + // A refused module the node does not hold today stays a refusal: holding only api today leaves spiegel and web refused. + part := Answer(ctx, b, Mesh{}, Scope{Node: "n1", Placements: given(b), HeldToday: []string{"api"}}, + map[string]string{"lemurs": fp("e"), "web": fp("1"), "api": fp("2"), "spiegel": fp("3")}, nil, "p-h1", 3) + if part.Verdict != delivery.CandidateRefused || len(part.Refusals) != 2 || len(part.Held) != 1 || part.Held[0].Module != "api" { + t.Errorf("held as today in part: %+v", part) + } // The fold: spiegel runs inside the node's own composition at a build of the old form. Its resources are carried as // they run, each after the one it runs after: the node's own is the one it runs, and the node composes itself.