Resolution: an unanswered requirement holds its consumers, not the node (A-452)

A requirement nothing answers no longer refuses the whole composition: each
module that wants it is held with the "nothing provides" words, as a refused
claim's claimant is, and the node composes the rest. Held modules stay in the
set, so what they provide still counts. The node is refused when every module
is held or no module of the set wants the name. Tests that used an unanswered
requirement to make a node's own set fail now use an ambiguous one.

Builds: design 47 G A-452 (extends A-405, A-407; ADR 0636 §3)
This commit is contained in:
2026-11-17 00:18:25 +01:00
parent 13fcfae051
commit 310ff0cabc
6 changed files with 117 additions and 11 deletions
+3 -1
View File
@@ -201,7 +201,9 @@ func TestAGrantIsCreatedForEachCredentialMadeForAConsumer(t *testing.T) {
}
// A consumer whose set does not resolve is skipped, not fatal.
nodeOf(t, &in, "laptop").Assigned = append(nodeOf(t, &in, "laptop").Assigned, "files")
in.Catalogue["files"] = catalogue.Manifest{Module: "files", Version: "1", Requires: []string{"s3-bucket", "nothing-gives-this"}}
in.Catalogue["files"] = catalogue.Manifest{Module: "files", Version: "1", Requires: []string{"s3-bucket", "two-give-this"}}
in.Catalogue["giver-a"] = catalogue.Manifest{Module: "giver-a", Version: "1", Provides: catalogue.Offers("two-give-this")}
in.Catalogue["giver-b"] = catalogue.Manifest{Module: "giver-b", Version: "1", Provides: catalogue.Offers("two-give-this")}
if got, err := Render(in, "anchor", Foreseeing); err != nil || len(got.Rendering.Grants) != 0 {
t.Errorf("a consumer that does not resolve: %v %+v", err, got.Rendering.Grants)
}