fix(fleet): worker_hello periodisch wiederholen (wie Satellit) — Box wird nach Diagnostic/Bridge-Neustart wieder sichtbar

Worker sendeten worker_hello nur EINMAL beim Connect. Startet das Diagnostic
oder die Bridge NACH der Box neu, verpassen sie das hello (RVS spielt es nicht
nach) und sehen nur noch worker_ping → die Box taucht nicht in der Compute-
Flotte auf. Der Satellit ist genau deshalb zuverlaessig sichtbar: er wiederholt
sat_hello periodisch.

- alle vier Worker (f5tts/whisper/voxtral/llm-adapter): worker_hello wird jetzt
  zusaetzlich alle ~30s (jeder 3. Ping-Zyklus) wiederholt → ein neu gestartetes
  Diagnostic/Bridge lernt die Box innerhalb von 30s, ohne Box-Neustart.
- diagnostic/server.js: Voice-Reconcile (f5tts) laeuft nur beim ERSTEN/erneuten
  Auftauchen der Box, nicht bei jedem 30s-hello-Resend (sonst Push/Pull-Dauerlauf).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-09-19 04:12:16 +02:00
co-authored by Claude Opus 4.8
parent 831fbfab58
commit 2d2c182a0c
5 changed files with 41 additions and 17 deletions
+6 -2
View File
@@ -1076,6 +1076,10 @@ function connectRVS(forcePlain) {
const p = msg.payload || {};
if (p.instanceId) {
const prev = workers.get(p.instanceId) || {};
// War die Box vor diesem hello schon frisch gesehen? worker_hello wird
// jetzt alle ~30s wiederholt — Reconcile nur beim ERSTEN/erneuten
// Auftauchen, nicht bei jedem Resend.
const wasFresh = prev.last_seen && (Date.now() - prev.last_seen < WORKER_OFFLINE_MS);
workers.set(p.instanceId, {
instanceId: p.instanceId, service: p.service || "",
node: p.node || "", gpus: p.gpus || "", model: p.model || "",
@@ -1083,8 +1087,8 @@ function connectRVS(forcePlain) {
busy: !!prev.busy, last_seen: Date.now(),
});
broadcastWorkers();
// Voice-Flotte: f5tts-Box gerade online → Stimmen abgleichen/provisionieren.
if ((p.service || "") === "f5tts") reconcileVoices(p.instanceId, p.voices);
// Voice-Flotte: f5tts-Box NEU online → Stimmen abgleichen/provisionieren.
if ((p.service || "") === "f5tts" && !wasFresh) reconcileVoices(p.instanceId, p.voices);
}
} else if (msg.type === "worker_ping") {
// Heartbeat eines Workers (traegt busy-Status).