From 07b2e4e703c854df07371678857113d1fa64907f Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Fri, 22 May 2026 22:06:08 +0000 Subject: [PATCH] test(distributed): InstallBackend tolerates silent (pre-Phase-2) workers A worker on pre-Phase-2 code never publishes progress events. The new master subscribes optimistically; this spec pins that a silent worker still produces a green install with no progressCb ticks. The install reply is the source of truth for terminal state; the progress stream is a best-effort UX enrichment. Signed-off-by: Ettore Di Giacinto --- .../nodes/managers_distributed_test.go | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/core/services/nodes/managers_distributed_test.go b/core/services/nodes/managers_distributed_test.go index 1aaada2b9..478c8c786 100644 --- a/core/services/nodes/managers_distributed_test.go +++ b/core/services/nodes/managers_distributed_test.go @@ -619,6 +619,32 @@ var _ = Describe("DistributedBackendManager", func() { Expect(pcts).To(ConsistOf(10.0, 100.0)) }) }) + + Context("InstallBackend tolerates silent (pre-Phase-2) workers", func() { + It("completes successfully even when no progress events are ever published", func() { + node := registerHealthyBackend("worker-silent", "10.0.0.8:50051") + mc.scriptReply(messaging.SubjectNodeBackendInstall(node.ID), messaging.BackendInstallReply{Success: true, Address: "10.0.0.8:50051"}) + // NO scheduleProgressPublish call - silent worker. + + var ticks int + var mu sync.Mutex + progressCb := func(file, current, total string, pct float64) { + mu.Lock() + defer mu.Unlock() + ticks++ + } + + opVal := op("vllm") + opVal.ID = "op-silent-1" + Expect(mgr.InstallBackend(ctx, opVal, progressCb)).To(Succeed()) + + Consistently(func() int { + mu.Lock() + defer mu.Unlock() + return ticks + }, "200ms").Should(Equal(0)) + }) + }) }) Describe("UpgradeBackend", func() {