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)
This commit is contained in:
2026-11-25 18:51:59 +01:00
parent 2bc0f27282
commit e32824be26
2 changed files with 6 additions and 8 deletions
@@ -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 {
@@ -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 {