Design 47 H1: the runner says a mover waits on its registration when placed from the half or the queue (A-327)

A pipeline placed at its turn in the queue, or once its branch's half was held,
dropped its movers with no registration without a word: main.20 and main.22 sat
running with every step ended and nothing said why (their mover
mesh-delivery-contracts has no registration, so it is never placed and the
pipeline never ends).

Builds: design 47 G A-327, design 47 H §746
This commit is contained in:
2026-11-20 17:38:20 +01:00
parent 20f0e9baaf
commit 577ec05205
2 changed files with 25 additions and 1 deletions
@@ -610,7 +610,12 @@ func (s *Starter) placeWaiting(store Updater, due func(seat.Pipeline) bool, reg
continue
}
before := len(p.Steps)
asks, _, ended, notAsked := s.placeMovers(&p, reg, half.Entries, now)
asks, unregistered, ended, notAsked := s.placeMovers(&p, reg, half.Entries, now)
// Until its registration arrives, the pipeline says it waits on it (A-327): a mover with no registration has no step,
// and the pipeline does not end before it is placed.
for _, m := range unregistered {
s.logf("%s: %s has no registration yet: its steps wait on its registration, which places them (A-327)", key, m)
}
if len(p.Steps) == before {
continue
}
@@ -3,6 +3,8 @@ package pipeline
import (
"encoding/json"
"errors"
"fmt"
"slices"
"strings"
"testing"
@@ -280,6 +282,23 @@ func TestAPipelineStartedBeforeItsRegistrationIsPlacedWhenItArrives(t *testing.T
if n != 1 || err != nil || len(p.Steps) == 0 || len(asks.asks) == before {
t.Errorf("the pipeline a runner before this one set aside: placed %d (%v), %d steps, %d asks more, want it started as a newly started one", n, err, len(p.Steps), len(asks.asks)-before)
}
// A-327: a mover with no registration, in a pipeline placed from the half held later (the queue's turn, the half held),
// is said to wait on its registration, so the pipeline that cannot end before it is placed says why.
var logged []string
s.Logf = func(f string, a ...any) { logged = append(logged, fmt.Sprintf(f, a...)) }
held = false
taken = catalog.TakeInTaken{Branch: "next", Source: 8, Entries: []catalog.TakeInEntry{{Module: "app", Commit: "c4", Fingerprint: "src2:dd"}, {Module: "contracts", Commit: "c4", Fingerprint: "src2:ee"}}}
if n, err := s.TakenIn(taken, late); n != 1 || err != nil {
t.Fatalf("the take-in of two movers started %d (%v)", n, err)
}
held, logged = true, nil
if n, err := s.Waiting(store.memStore, "next", late); n != 1 || err != nil {
t.Fatalf("the half of next placed %d (%v), want next.8's registered mover", n, err)
}
if !slices.ContainsFunc(logged, func(l string) bool { return strings.Contains(l, "next.8: contracts has no registration yet") }) {
t.Errorf("placing next.8 said %q, want that contracts waits on its registration (A-327)", logged)
}
}
// R1/AC1 (design 47 H §747): a start names an event, never a sweep. A take-in starts the pipelines of its own entries