From f0e7631d11f5392e1902db8866a7024ee0b98715 Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 15 Nov 2026 16:53:48 +0100 Subject: [PATCH] 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 --- .../internal/assign/wants_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/mesh-delivery-assigner/internal/assign/wants_test.go b/modules/mesh-delivery-assigner/internal/assign/wants_test.go index dbe4453c..fd1dc76a 100644 --- a/modules/mesh-delivery-assigner/internal/assign/wants_test.go +++ b/modules/mesh-delivery-assigner/internal/assign/wants_test.go @@ -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)