From e32824be26823c5478716f4fe61d989ce24cae90 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 25 Nov 2026 18:51:59 +0100 Subject: [PATCH] P5 H-A-755: a group reopened in its own pipeline says no mover-added; only a module start adds says it, with the caller Builds: design 47 H2 H-A-755, H-A-750 (2) --- .../internal/pipeline/handplace.go | 10 ++++------ .../internal/pipeline/verbs_test.go | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/modules/mesh-delivery-pipeline/internal/pipeline/handplace.go b/modules/mesh-delivery-pipeline/internal/pipeline/handplace.go index 02a3fbd66..f707ebbf5 100644 --- a/modules/mesh-delivery-pipeline/internal/pipeline/handplace.go +++ b/modules/mesh-delivery-pipeline/internal/pipeline/handplace.go @@ -237,16 +237,14 @@ func (v Verbs) reopenGroup(caller string, from seat.Pipeline, group []string, ad return fmt.Errorf("the %s step of %s in %s is not asked again: %w", st.Step, st.Module, from.Pipeline, err) } } - // Each module added, and each group mover with no failed step whose steps are placed again, is said by mover-added with the - // caller (H-A-750 (2), H-A-751). + // Only a module start adds to a pipeline that did not move it is said by mover-added with the caller (H-A-750 (2), H-A-755); a + // group reopened in its own pipeline adds none. p, _, err := s.Store.Get(from.Pipeline) if err != nil { return fmt.Errorf("the pipeline %s is not read: %w", from.Pipeline, err) } - for _, m := range p.Movers { - if slices.ContainsFunc(add, func(a seat.Mover) bool { return a.Module == m.Module }) || (slices.Contains(group, m.Module) && !slices.ContainsFunc(failed, func(f seat.StepResult) bool { return f.Module == m.Module })) { - s.sayMoverAdded(p, m, AddedFrom{Caller: caller}) - } + for _, m := range add { + s.sayMoverAdded(p, m, AddedFrom{Caller: caller}) } if len(failed) == 0 || len(add) > 0 { if len(failed) == 0 { diff --git a/modules/mesh-delivery-pipeline/internal/pipeline/verbs_test.go b/modules/mesh-delivery-pipeline/internal/pipeline/verbs_test.go index add29332b..89734ab92 100644 --- a/modules/mesh-delivery-pipeline/internal/pipeline/verbs_test.go +++ b/modules/mesh-delivery-pipeline/internal/pipeline/verbs_test.go @@ -554,8 +554,8 @@ func TestStartWithModulesJoinsTheHeadsPipelineOrReopensIt(t *testing.T) { if a, err = v.Start("operator", seat.StartInput{Branch: "main", Modules: []string{"app"}, Why: "app left unfinished"}); err != nil || a.Pipeline != "main.9" { t.Fatalf("start of app, which cancelled main.9 left unfinished, = %+v, %v", a, err) } - if got, _, _ = store.Get("main.9"); got.Outcome != seat.PipelineOutcomeRunning || got.Ended != nil || len(added) != 3 || added[2].Module != "app" || added[2].Caller != "operator" || Moves(got, "lib") || got.Started == nil || !got.Started.Equal(first) { - t.Errorf("main.9 is %s ended %v, mover-added %+v; want it reopened and its unfinished movers said by the caller", got.Outcome, got.Ended, added) + if got, _, _ = store.Get("main.9"); got.Outcome != seat.PipelineOutcomeRunning || got.Ended != nil || len(added) != 2 || Moves(got, "lib") || got.Started == nil || !got.Started.Equal(first) { + t.Errorf("main.9 is %s ended %v, mover-added %+v; want it reopened and no mover-added said for the reopen of a group already among its movers (H-A-755)", got.Outcome, got.Ended, added) } p5 := store[pkey].p for i := range p5.Steps {