From 401289aface56420151f2a6441824e4a3b999db7 Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 20 Nov 2026 05:52:52 +0100 Subject: [PATCH] mesh-conditions: the hold reads a want's fingerprint alone Review round 1, Must 2: the want's composed digest left mesh-sdk's motion.Want (H-A-78); the hold read it and no longer built. Builds: design 47 H H-A-78 (1) Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy --- modules/mesh-conditions/cmd/mesh-conditions/hold.go | 2 +- .../mesh-conditions/cmd/mesh-conditions/hold_test.go | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/mesh-conditions/cmd/mesh-conditions/hold.go b/modules/mesh-conditions/cmd/mesh-conditions/hold.go index cbf90c8e5..9b99add42 100644 --- a/modules/mesh-conditions/cmd/mesh-conditions/hold.go +++ b/modules/mesh-conditions/cmd/mesh-conditions/hold.go @@ -321,5 +321,5 @@ func decodeWant(value []byte) (motion.Want, error) { if err := json.Unmarshal(value, &w); err != nil { return motion.Want{}, err } - return motion.Want{FP: w.Fp, Composed: w.Composed, Removed: w.Removed}, nil + return motion.Want{FP: w.Fp, Removed: w.Removed}, nil } diff --git a/modules/mesh-conditions/cmd/mesh-conditions/hold_test.go b/modules/mesh-conditions/cmd/mesh-conditions/hold_test.go index 6850411c6..34c17cc39 100644 --- a/modules/mesh-conditions/cmd/mesh-conditions/hold_test.go +++ b/modules/mesh-conditions/cmd/mesh-conditions/hold_test.go @@ -34,8 +34,9 @@ const ( // failed delivery raises what stands at once; another module's and the machine's own are raised at once; compare lists a // held key as held. func TestADeliveryHoldsItsOwnFindingsUntilItEnds(t *testing.T) { - want := func(fp, composed string) []byte { - raw, _ := json.Marshal(meshwants.WantsByWantNodeModuleValue{V: 1, Fp: fp, Composed: composed}) + // A want names the fingerprint alone (design 47 H, H-A-78): a have at it is the want applied. + want := func(fp string) []byte { + raw, _ := json.Marshal(meshwants.WantsByWantNodeModuleValue{V: 1, Fp: fp}) return raw } have := func(fp, composed string, phase, h string) haveSpec { return haveSpec{fp, composed, phase, h} } @@ -55,10 +56,10 @@ func TestADeliveryHoldsItsOwnFindingsUntilItEnds(t *testing.T) { said: "raised module.mesh-controller.novox.unhealthy", line: "as the delivery of version 0d1e2f3a4b5c"}, } { r := newRig() - _ = r.k.Want("want.novox.mesh-controller", want(ctrlRunning, ctrlComposed), false) + _ = r.k.Want("want.novox.mesh-controller", want(ctrlRunning), false) r.engineHave("novox.mesh-controller", have(ctrlRunning, ctrlComposed, motion.PhaseRunning, engineclient.HealthOK)) // The delivery starts: the assigner wants the next fingerprint; the node applies it. - _ = r.k.Want("want.novox.mesh-controller", want(ctrlNext, ctrlNextComp), false) + _ = r.k.Want("want.novox.mesh-controller", want(ctrlNext), false) r.engineHave("novox.mesh-controller", have(ctrlNext, ctrlNextComp, motion.PhaseApplying, engineclient.HealthUnknown)) own, ownRaw := finding(t, watchman, cc.ScopeModule, "mesh-controller.novox", "unhealthy", "health", cc.Warning, r.now) other, otherRaw := finding(t, watchman, cc.ScopeModule, "postgres.novox", "unhealthy", "health", cc.Warning, r.now) @@ -109,7 +110,7 @@ func TestADeliveryHoldsItsOwnFindingsUntilItEnds(t *testing.T) { } r.k.Assignments("ace.mesh-delivery-assigner", placed["ace.mesh-delivery-assigner"], false) r.k.Assignments("ace.node", placed["ace.node"], false) - _ = r.k.Want("want.ace.mesh-delivery-assigner", want(ctrlNext, ctrlNextComp), false) + _ = r.k.Want("want.ace.mesh-delivery-assigner", want(ctrlNext), false) r.engineHave("ace.mesh-delivery-assigner", have(ctrlRunning, ctrlComposed, motion.PhaseRunning, engineclient.HealthOK)) seatKey, seatRaw := finding(t, selfCheck, cc.ScopeSeat, "mesh-module-assigner.ace", "holder-silent", "D3", cc.Warning, r.now) _ = r.k.Finding(selfCheck, seatKey, seatRaw, false)