composer: the search for culprits goes on past a hold that changes the problem (G-24 review r2)

A hold that changes the problem but leaves the machine not composing keeps that module held and blamed,
and the search goes on against the retry's problem within the same blame_tries, until the machine
composes or no hold changes it: every module the change refuses is blamed, never only the first.

Builds: design 47 G §721, §722, A-470c, A-470v
This commit is contained in:
2026-11-17 13:10:51 +01:00
parent f21b8c202d
commit ed7cefb5d8
2 changed files with 41 additions and 15 deletions
+4
View File
@@ -206,6 +206,10 @@ func TestTheCommandWritesOneVerdictPerManifestAndMachine(t *testing.T) {
// problem is then no changed module's, and none is blamed.
{"a module its build was made of is not tried", search, []string{"m1", "m2", "m3"},
&compose.ComposedHow{Node: "a", Manifests: map[string]string{"m2": digest(t, search["m2"])}}, 20, []blame{}},
// A-470v: a hold that changes the problem but leaves the machine not composing keeps that module held and blamed,
// and the search goes on against the retry's problem: both modules the change refuses are blamed.
{"every module the change refuses is blamed", map[string]string{"m1": file("m1", "/var/lib/m1/env", secret), "m2": file("m2", "/var/lib/m2/env", secret), "m3": plain("m3")},
[]string{"m1", "m2", "m3"}, &compose.ComposedHow{Node: "a"}, 20, []blame{{Module: "m1", Problem: "repository"}, {Module: "m2", Problem: "repository"}}},
// G-24 H-AC4: past the request's blame_tries the modules not yet tried are named so.
{"past blame_tries the untried are named", search, []string{"m1", "m2", "m3"}, &compose.ComposedHow{Node: "a"}, 1,
[]blame{{Module: "m2", Problem: composer.NotTried}, {Module: "m3", Problem: composer.NotTried}}},