Verified on a Windows 11 VM over WinRM: doctor, SAPI synthesis, Edge,
oto/WASAPI playback, autostart, mute file, wrap exit codes, doctor --probe
and toast mode all work. Three findings fixed:
- The autostarted daemon died with the WinRM shell: Windows session hosts
(WinRM, SSH, CI runners) put children into a job object that is
terminated with the session. Spawn now starts the daemon with
CREATE_BREAKAWAY_FROM_JOB first and falls back to a start without it when
the job forbids breakaway. Confirmed: the daemon now outlives the WinRM
shell and `talk daemon stop` still ends it.
- `talk mute` without a daemon printed "daemon call failed (<nil>)": the
outer err was reported instead of the call's. Now "no daemon (<reason>);
writing the mute file directly".
- `talk wrap` printed "command did not exit cleanly" for every non-zero
exit code. The note is now reserved for commands that produced no exit
code of their own (not found, signal); a plain failure is carried by the
announcement and the exit code alone.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
talk is going to be published. Code comments, CLI output, error messages,
daemon log lines, MCP descriptions and results, test names and assertions,
README, spec, skill, build scripts and flake are now English. Only the
spoken announcement texts stay bilingual: the wrap result and the test
sentence are German or English depending on the detected language.
Language fallback is now configurable: `lang = "en" | "de"` (env
TALK_LANG, default en) is used when detection cannot tell (numbers, single
words, ties) and for talk's own announcements. langdetect.Detect takes the
fallback as an argument instead of hard-coding German. `talk setup` asks for
it; `talk doctor` and `talk status` show it.
Vocabulary pinned across packages so the process-boundary tests observe
stable strings: chain log lines ("chain: tier X skipped (not available)",
"falling back to the next tier", "spoken via X"), queue lines ("discarded:
quiet hours ... active", "replaced by toast", "max_age"), CLI notes
("speaking directly", "daemon started at", "no daemon", "nothing to cancel"),
status block with aligned English labels, MCP messages, origin guard 403.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Zwei Binaries erzeugten den halben Komplexitätsballast: Degraded Mode mit
Lock-Datei und Stale-Lock-Race, „läuft talkd?", Autostart-Konfiguration je
OS, doppelte Chain-Konstruktion in cmd/talk und cmd/talkd — und der
Degraded Mode kannte weder Rate-Limit noch Ruhezeiten.
Jetzt:
- internal/speak: der eine Sprech-Kern (Config + Sink + Kette → Ansage);
Daemon und Direkt-Pfad benutzen ihn, es gibt keine zweite
Zusammensetzung der Kette mehr.
- internal/daemon: Run (der bisherige talkd-Kern), Spawn (detached per
Setsid bzw. DETACHED_PROCESS, stdout/stderr → daemon.log), PID-Datei
daemon.pid, Shutdown-Trigger.
- `talk daemon run|start|stop`: Vordergrund (systemd/launchd), expliziter
Hintergrund-Start, Stop per POST /shutdown — stop wartet, bis HTTP weg
und die PID-Datei gelöscht ist (Prozess wirklich beendet).
- Autostart: say/wrap starten den Daemon beim ersten Sprechbefehl selbst
(daemon.autostart, Default an; Env TALK_AUTOSTART). Verliert ein
paralleler Aufruf das Port-Rennen, erkennt er das am Kind-Ende und nutzt
den Daemon des anderen — kein Timeout-Warten.
- Direkt-Pfad statt Degraded Mode: ohne erreichbaren oder startbaren
Daemon spricht talk direkt (Mute respektiert, kein Lock, Hinweis +
Grund + Log-Pfad auf stderr). Steuerbefehle starten den Daemon bewusst
nicht; `talk status` zeigt „läuft nicht" (Exit 1).
- cmd/talkd und cmd/talk/degraded.go entfernt; README-Daemon-Abschnitt
neu.
Tests: Harness baut nur noch talk und startet `talk daemon run`;
TALK_AUTOSTART=false als Grundausstattung aller Tests (kein Test
hinterlässt Daemons), autostart_test.go schaltet es bewusst an: Autostart
beim ersten say, Idempotenz, paralleler Start in EINE Queue, expliziter
start/stop, Port fremd belegt → Direkt-Pfad ohne Timeout. Cross-Compile
aller sechs Targets mit CGO_ENABLED=0 verifiziert.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>