From a6c225eb45b6c98ae65f6d655da5160a664b8e53 Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 1 Nov 2026 15:36:52 +0100 Subject: [PATCH] =?UTF-8?q?Pause=20before=20a=20declined=20ask=20is=20put?= =?UTF-8?q?=20again=20with=20a=20context's=20bound,=20not=20a=20timer=20(A?= =?UTF-8?q?DR=200437=20=C2=A78,=20issue=201578)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The builder's manifest test refuses time.After. The previous commit's pause used it. Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL --- modules/mesh-delivery-builder/internal/build/askagain.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/mesh-delivery-builder/internal/build/askagain.go b/modules/mesh-delivery-builder/internal/build/askagain.go index a7d6cd6..0a7e2a9 100644 --- a/modules/mesh-delivery-builder/internal/build/askagain.go +++ b/modules/mesh-delivery-builder/internal/build/askagain.go @@ -326,10 +326,12 @@ func (b *Builder) answer(ctx context.Context, l *lane, ask delivery.StepAsk, ask if bound := b.declineBound(); now.Sub(firstDecline) > bound { return step, ask, fmt.Errorf("the ask %s of %s was declined for %s and no build node took it: %s", ask.ID, l.module, bound.Round(time.Second), declinedWords(declines)) } - select { - case <-ctx.Done(): + // The pause is a context's bound, not a timer (ADR 0437 ยง8). + pause, stop := context.WithTimeout(ctx, b.declinePause()) + <-pause.Done() + stop() + if ctx.Err() != nil { return step, ask, ctx.Err() - case <-time.After(b.declinePause()): } old := ask.ID ask.ID, ask.At = buildstep.NewID(), time.Now()