P1 (log): the step log's entry of a step asked again after a passed-over end names the pipeline's revision and the passed-over one

Builds: design 47 H2 H-A-577 (3), H-A-743
This commit is contained in:
2026-11-25 18:08:09 +01:00
parent 78813b0bcf
commit 9907de906d
2 changed files with 8 additions and 0 deletions
@@ -263,6 +263,10 @@ func TestAPipelineWithNothingOpenEndsAtOnce(t *testing.T) {
if len(started) != 1 || !started[0].Result.Rerun || started[0].Result.By != "mesh-delivery-pipeline" || started[0].Result.Ask != "x1again" {
t.Errorf("step-started said %+v, want one rerun by the runner of x1again", started)
}
// H-A-743: the step log's entry of the step asked again names the pipeline's own revision and the passed-over end's.
if len(p.Unlogged) != 1 || p.Unlogged[0].Revision == 0 || p.Unlogged[0].PassedOver == 0 || p.Unlogged[0].PassedOver >= p.Unlogged[0].Revision || p.Unlogged[0].What != seat.LogEntryWhatStarted {
t.Errorf("the step log's entries %+v, want one started entry naming the pipeline's revision and the older passed-over one", p.Unlogged)
}
if !slices.ContainsFunc(journal, func(l string) bool { return strings.Contains(l, "passed over") }) {
t.Errorf("the passed-over end is not said: %q", journal)
}
@@ -370,6 +370,10 @@ func (h *Hearer) OnStepEndedRevised(bs StepSeat, subject string, ev StepEnded, s
old := s.Ask
a, why := h.supersededAgain(&p, i, ev, passed, now)
if a != nil {
// The step log's entry of the step asked again names the pipeline's own revision and the one the passed-over end
// named (design 47 H2 H-A-577 (3), H-A-743).
p.Unlogged = append(p.Unlogged, seat.LogEntry{Pipeline: ev.Pipeline, Module: s.Module, Step: s.Step, Artifact: s.Artifact,
What: seat.LogEntryWhatStarted, Outcome: seat.LogEntryOutcomeRunning, Revision: own, PassedOver: superseding, At: now})
if _, err := h.Store.Update(ev.Pipeline, p, rev); errors.Is(err, ErrChanged) {
continue
} else if err != nil {