assigner: test that a placed node's want held at F names its release

The rules' hold at F rebuilt the want without its version, so novox's want of mesh-delivery-pipeline stood as
{fp, self}; 98875eba names the release after the self derivation. This row fails without it.

Builds: design 47 G A-430a
This commit is contained in:
2026-11-15 16:53:48 +01:00
parent 98875eba70
commit f0e7631d11
@@ -424,6 +424,17 @@ func TestEachRuleHoldsTheWantBack(t *testing.T) {
return composedEverywhere(node, fp)
}
}, want: mwc.Want{Fp: fNew, Self: true}},
// A-430a: a placed node's want held at F by the rules names F's release, as a moved want does (novox's want of
// mesh-delivery-pipeline stood as {fp, self}, the hold having rebuilt it without its version).
{name: "placed, held at F, names its release", before: fNew, set: func(m *Module, n *Nodes) {
atF(m, n)
m.Held = true
m.Self = func(node string) bool { return node == "g14" }
m.KeptBuilds = func(fp string) (KeptBuild, bool) {
return KeptBuild{Parts: map[string]string{"mail:image": "sha256:1"}, KeptOn: "g14", Version: "1.2.3"}, fp == fNew
}
}, rule: mwc.RuleNotHeld, want: mwc.Want{Fp: fNew, Self: true, Version: "1.2.3", KeptOn: "g14", Yes: dig(fNew),
Words: "mail is held at " + short(fNew) + " and g14 ran no other fingerprint healthy to set it back to"}},
} {
m, n := ready()
c.set(&m, &n)