R2: a row holds the build seats' work queues above three deliveries and at most ten (ADR 0664 §2, ADR 0436 §6, issue 1748 review 2)
mesh/delivery merged: source.main moved to novox/mesh-delivery@8b03cc036ec7
mesh/delivery-group group fix/1748-transport-retry merged: every member is merged
mesh/check checking 7e0634205aa4 on 8b03cc036ec7 | novox/mesh-delivery#196 in group fix/1748-transport-retry

Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
2026-11-09 23:55:13 +01:00
parent a8c8f8fb5a
commit 7e0634205a
@@ -18,6 +18,7 @@ import (
"git.novox.be/novox/mesh-contracts/identity-and-access/go/clients/meshvaultclient"
"git.novox.be/novox/mesh-contracts/identity-and-access/go/seats/meshvault"
"git.novox.be/novox/mesh-delivery/modules/mesh-delivery-builder/builds"
"git.novox.be/novox/mesh-delivery/sdk/buildstep"
"git.novox.be/novox/mesh-sdk/go/announce"
"git.novox.be/novox/mesh-sdk/go/catalogue"
"github.com/nats-io/nats.go/jetstream"
@@ -146,6 +147,20 @@ func TestTheCopiedComposerComposesAsTheControllers(t *testing.T) {
t.Errorf("may publish %s: %v, want %v", subject, got, want)
}
}
// ADR 0664 §2 with ADR 0436 §6: the work queue offers a build seat's ask more often than the module runs it, so the stream
// never drops an ask before the module has ended it, and at most ten times.
for _, seat := range []string{"node-build-go", "node-build-node", "node-build-image"} {
held := Seat{Name: seat, Scope: "node", Accepts: []string{"delivery", "check", "recheck"}, PulledByKind: true}
_, workers := SeatTrafficObjects([]Principal{{Kind: KindModule, Node: "one", Module: "m-" + seat, Holds: []Seat{held}}})
if len(workers) == 0 {
t.Fatalf("%s: no worker composed", seat)
}
for _, w := range workers {
if w.MaxDeliver <= buildstep.AskRuns || w.MaxDeliver > 10 {
t.Errorf("%s worker %s offers an ask %d times, want more than %d runs and at most 10", seat, w.Name, w.MaxDeliver, buildstep.AskRuns)
}
}
}
plain, err := PermissionsFor(Principal{Kind: KindModule, Node: "one", Module: "shop",
Uses: []Seat{{Name: "telegram-sender", Accepts: []string{"send"}}}})
if err != nil {