Voice hook logs played lines as failed: it waits 10 s, but Pulse answers /notify only after playback ends

Abierto Apto para principiantes
#2,985 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 5 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
bun, typescript

Línea de trabajo

Lee hooks/handlers/VoiceNotification.ts alrededor de la línea 110 y LIFEOS/PULSE/VoiceServer/voice.ts en torno a /notify y a la reproducción esperada. Empieza comparando el tiempo de espera del cliente con lo que tarda la reproducción normal; el issue informa que un tiempo de espera de 40 segundos funciona como solución provisional. El trabajo estará terminado cuando las líneas reproducidas se registren como enviadas en lugar de como fallidas por tiempo de espera; el issue no indica ninguna prueba que ejecutar.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Version

LifeOS 8.761.0 · attestation: not run

What is broken

The voice hook waits 10 s for Pulse's /notify answer on a normal (non-interruptible) line. Pulse answers only after the line has finished playing: /notify awaits sendNotification, which awaits playback for a non-interruptible clip. A closing line takes Fish generation plus its playing time, usually over 10 s, so the hook aborts and logs the line as failed ("The operation timed out") although it played.

On one install, joining the hook's voice-events.jsonl with Pulse's played records: 383 of the 392 rows logged as timed out have a matching played record; median time from request to end of playback 12.9 s, longest 33 s. The log reports a voice outage that is not there. The comment at :108 sizes the wait for a server that answers in about a second.

Where (file:line)

hooks/handlers/VoiceNotification.ts:110 · LIFEOS/PULSE/VoiceServer/voice.ts:980 (/notify awaits sendNotification), :778-780 (non-interruptible playback awaited)

Repro on a clean tree
# Any 8.761.0 install with Pulse voice on (not platform-specific).
# 1. Static: the probe prints the client wait and the server lines that hold the /notify answer until
#    playback ends. It reads two release files and writes nothing.
cat > probe.js <<'EOF'
const { join } = await import("node:path");
const read = (p) => Bun.file(join(process.cwd(), "skills/LifeOS/install", p)).text();
const hook = await read("hooks/handlers/VoiceNotification.ts"), srv = await read("LIFEOS/PULSE/VoiceServer/voice.ts");
const at = (src, re) => { const L = src.split(String.fromCharCode(10)); const i = L.findIndex((l) => re.test(l)); return "  :" + (i + 1) + "  " + L[i].trim(); };
console.log("hooks/handlers/VoiceNotification.ts (client)");
console.log(at(hook, /AbortSignal\.timeout\(/));
console.log("LIFEOS/PULSE/VoiceServer/voice.ts (/notify)");
console.log(at(srv, /pathname === "\/notify"\)/));
console.log(at(srv, /const result = await sendNotification\(/));
console.log(at(srv, /const played = enqueuePlayback/));
console.log(at(srv, /else await played/));
const ms = Number(hook.match(/interruptible \? \d+ : (\d+)/)[1]);
const afterPlayback = /else await played/.test(srv);
console.log("normal line: client gives up after " + ms + " ms; server answers " + (afterPlayback ? "only after playback ends" : "before playback"));
process.exit(afterPlayback ? 1 : 0);
EOF
bun -e "$(cat probe.js)"   # exit 1
# 2. Live: let a session end with a closing line of normal length (spoken for more than ~9 s), then:
tail -n 3 LIFEOS/MEMORY/VOICE/voice-events.jsonl
#    -> event_type "failed", error "The operation timed out." for a line Pulse played to the end.
Negative control

Probe: bun -e 'const { join } = await import("node:path"); const read = (p) => Bun.file(join(process.cwd(), "skills/LifeOS/install", p)).text(); const hook = await read("hooks/handlers/VoiceNotification.ts"), srv = await read("LIFEOS/PULSE/VoiceServer/voice.ts"); const at = (src, re) => { const L = src.split(String.fromCharCode(10)); const i = L.findIndex((l) => re.test(l)); return " :" + (i + 1) + " " + L[i].trim(); }; console.log("hooks/handlers/VoiceNotification.ts (client)"); console.log(at(hook, /AbortSignal\.timeout\(/)); console.log("LIFEOS/PULSE/VoiceServer/voice.ts (/notify)"); console.log(at(srv, /pathname === "\/notify"\)/)); console.log(at(srv, /const result = await sendNotification\(/)); console.log(at(srv, /const played = enqueuePlayback/)); console.log(at(srv, /else await played/)); const ms = Number(hook.match(/interruptible \? \d+ : (\d+)/)[1]); const afterPlayback = /else await played/.test(srv); console.log("normal line: client gives up after " + ms + " ms; server answers " + (afterPlayback ? "only after playback ends" : "before playback")); process.exit(afterPlayback ? 1 : 0);' · exit 1 · captured 2026-11-27T01:34:03.149Z

Red looks like: client gives up after 10000 ms; server answers only after playback ends

hooks/handlers/VoiceNotification.ts (client)
  :110  signal: AbortSignal.timeout(payload.interruptible ? 20000 : 10000),
LIFEOS/PULSE/VoiceServer/voice.ts (/notify)
  :964  if (pathname === "/notify") {
  :980  const result = await sendNotification(title, message, voiceEnabled, voiceId, volume, false, data.interruptible === true)
  :778  const played = enqueuePlayback(() => playAudio(fishAudio, callerVolume ?? fishEntry.volume ?? FALLBACK_VOLUME, "mp3", { interruptible, bypassMute }), gen)
  :780  else await played
normal line: client gives up after 10000 ms; server answers only after playback ends
Suggested fix

Applied on one install: raise the normal-line wait at VoiceNotification.ts:110 from 10000 to 40000 ms (interruptible clips keep 20000). The hook runs async, so nothing waits on it; its process lives up to 40 s. Since the change, lines that played log sent, including ones that took up to 19 s from request to end of playback. A line longer than 40 s would still log as failed.

The fuller fix, not tried here: have /notify answer once the clip is generated and queued, as it already does for interruptible clips, and report playback failures some other way.

Environment
  • OS: Windows (x64)
  • Harness: claude-code
  • bun: 1.4.2 · git: 2.56.1.
  • Doctor broken: none
Lenguaje dominante
TypeScript
Estrellas
20k
Forks
2.5k
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de danielmiessler/LifeOS

Todos los issues de danielmiessler/LifeOS

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.