B3: an answered build ask is one journal line naming its ask

The line a build step's finish wrote named no ask, so an answer could not be
matched to the ask the runner put. BuildStep now takes the ask's id and its
finish writes "answered <ask> <pipeline> <movers> <step> <outcome>".

Builds: design 47 H2 §792
This commit is contained in:
2026-11-22 00:52:34 +01:00
parent 7dbd440a4e
commit 3a647a8e2d
3 changed files with 32 additions and 36 deletions
@@ -39,7 +39,7 @@ type askTaker interface {
// stepBuilder is build.Builder's BuildStep.
type stepBuilder interface {
BuildStep(ctx context.Context, run meshbuilds.StepRun) meshbuilds.StepEnded
BuildStep(ctx context.Context, ask string, run meshbuilds.StepRun) meshbuilds.StepEnded
}
// queueMsg is what the queue reads of a message pulled from the seat's work queue (jetstream.Msg).
@@ -141,7 +141,7 @@ func (q *stepQueue) build(ctx context.Context, m queueMsg, id string, ra *runnin
tick = t.C
}
done := make(chan meshbuilds.StepEnded, 1)
go func() { done <- q.builder.BuildStep(ctx, ra.run) }()
go func() { done <- q.builder.BuildStep(ctx, id, ra.run) }()
var end meshbuilds.StepEnded
for waiting := true; waiting; {
select {
@@ -151,7 +151,6 @@ func (q *stepQueue) build(ctx context.Context, m queueMsg, id string, ra *runnin
_ = m.InProgress()
}
}
end.ID = id
if err := q.say(context.WithoutCancel(ctx), meshbuilds.SubjectStepEnded(q.node), id, end); err != nil {
q.logf("saying the end of the build step %s: %v; the ask is handed again", id, err)
_ = m.Nak()