From 5555a3c5690a27f11aa41b71bfb0e9d54419e2cc Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Mon, 31 Aug 2026 22:50:48 +0200 Subject: [PATCH] fix(nodes): skip checksum sidecars when staging option dirs stageDirectory and countStageableFiles already skip them, but stageOptionDir did not - and it is the path sherpa-onnx voices take for espeak-ng-data. The receiver writes ".sha256" for every file it accepts, so staging the sidecars made it write sidecars for those in turn, one level deeper on every load. Observed on a live node: ".sha256" repeated eleven times, 5077 junk files out of 7832 in the models dir, and still growing. Staging never finished, so vits-piper-it_IT-paola-sherpa stayed permanently "staging on node" and every realtime warmup needing that voice failed with the session then going silent. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_0142UfUh8HWxdim5JZqf8Tr6 Signed-off-by: Ettore Di Giacinto --- core/services/nodes/router.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/services/nodes/router.go b/core/services/nodes/router.go index d094d0f20..11ec2d6c6 100644 --- a/core/services/nodes/router.go +++ b/core/services/nodes/router.go @@ -1874,6 +1874,16 @@ func (r *SmartRouter) stageOptionDir(ctx context.Context, node *BackendNode, dir if walkErr != nil || d.IsDir() { return nil } + // Same reason as stageDirectory: the receiver writes ".sha256" for + // every file it accepts, so staging the sidecars makes it write sidecars + // for those in turn. Option dirs are walked on every load, so each pass + // added a level - an espeak-ng-data tree observed in the wild had grown + // to ".sha256" repeated eleven times and 5077 junk files, which is + // enough to keep a sherpa-onnx voice permanently "staging" and fail + // every realtime warmup that needs it. + if isHashSidecar(path) { + return nil + } if _, err := r.fileStager.EnsureRemote(ctx, node.ID, path, keyFn(path)); err != nil { xlog.Warn("Failed to stage option directory file, skipping", "path", path, "error", err) }