Resolution: a requirement nothing in the mesh answers holds its consumers too; optional ones stay absent (A-452)

The mesh-wide refusal ("nothing in this mesh provides") holds its consumers as the
node-wide one does; a module that wants the name only optionally is left absent
(ADR 0330 §3), never held. A held why still names the nodes that offer nothing
here. The two tests of the first commit are folded as rows into one table test
that replaces two existing ones.

Builds: design 47 G A-452
This commit is contained in:
2026-11-17 00:25:30 +01:00
parent 310ff0cabc
commit c6d893e141
5 changed files with 124 additions and 97 deletions
+3 -1
View File
@@ -675,7 +675,9 @@ func otherNodeNotResolvedIsNamed(t *testing.T) {
given[n] = &p
}
a := Answer(ctx, b, Mesh{}, Scope{Node: "n1", Assignments: given}, map[string]string{"cons": "src2:" + strings.Repeat("1", 64)}, nil, "p-h1", 1)
if a.Verdict != nodeengine.CandidateAnswerVerdictRefused || !strings.Contains(a.Refused, "prov on n2 lacks container-runtime") {
// cons is held for the requirement nothing answers (A-452) and its why names n2's provider.
if a.Verdict != nodeengine.CandidateAnswerVerdictRefused || len(a.Refusals) != 1 || a.Refusals[0].Module != "cons" ||
!strings.Contains(a.Refusals[0].Why, "prov on n2 lacks container-runtime") {
t.Errorf("a refusal for want of n2's provider = %+v", a)
}
}