From 8d7128aa3f98690317dedbd52c8cb439e6acc671 Mon Sep 17 00:00:00 2001 From: Mickael Farina Date: Thu, 2 Jul 2026 16:28:16 +0200 Subject: [PATCH 1/2] =?UTF-8?q?fix(health):=20kokoro=20TTS=20probe=20used?= =?UTF-8?q?=20stale=20port=208880=20=E2=80=94=20false=20DOWN=20reports?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Kokoro serves on :8085 (config tts_url); the skill probed :8880 and has been reporting TTS DOWN while it was healthy. Caught 2026-07-02 when a Project-mode dry run wrote 'kokoro_tts is DOWN' into its status brief. Port now read from config with :8085 default. Manifest regenerated. Co-Authored-By: Claude Fable 5 --- skills/.manifest.json | 2 +- skills/health_check.py | 23 ++++++++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/skills/.manifest.json b/skills/.manifest.json index 3801c13..18aacd9 100644 --- a/skills/.manifest.json +++ b/skills/.manifest.json @@ -49,7 +49,7 @@ "google_sheets.py": "d9b67b7e46ac835f4ef6d171d161b962c93c1916837f1b6aa5f4ec2804a36e69", "google_slides.py": "30193598c0214305c03412911781dd32794e6c9d6349ed6a242753c38eb49101", "google_tasks.py": "a609902fa2a12eddee70942f3786f146c7e413ad60e0bd7e394b0502b99dc1e7", - "health_check.py": "b9d9bb6e12e131a3a71f6490a4ffea32c519b89a52a3e5a458635d016b6ff8eb", + "health_check.py": "5a6e5c71f77bc2a2f856bd70c44dadebd1f67ae58d1fe65416fa40c19479744c", "imessage_send.py": "862f7031a525faed4cec7cb703ef32f5d8bdc1045326f880d50455baf4cfcf86", "json_formatter.py": "42a770a1455a574d33e2f96f34c63ae7a83845f70789862e5e5198d0b429fde2", "memory_entities.py": "252ad5861d614b916504b8af6300c4a8c62622c9f6c15238b11d6c6a052bada7", diff --git a/skills/health_check.py b/skills/health_check.py index 4a89df5..fcf9134 100644 --- a/skills/health_check.py +++ b/skills/health_check.py @@ -54,18 +54,23 @@ def run(task: str = "", context: str = "") -> str: except Exception as e: results["whisper_stt"] = f"DOWN ({type(e).__name__})" - # 5. Kokoro TTS + # 5. Kokoro TTS — port from config (tts_url), default :8085. The old + # hardcoded :8880 was stale (kokoro has served on 8085 for months), so + # health_check falsely reported TTS DOWN — caught 2026-07-02 when a + # Project-mode dry run wrote "kokoro_tts is DOWN" into its status brief + # while the service was healthy. try: - req = Request("http://localhost:8880/health") + tts_base = "http://localhost:8085" + try: + with open(os.path.expanduser("~/.codec/config.json")) as f: + tts_base = json.load(f).get("tts_url", tts_base).rstrip("/") + except Exception: + pass + req = Request(f"{tts_base}/v1/models") resp = urlopen(req, timeout=5) results["kokoro_tts"] = "OK" - except Exception: - try: - req = Request("http://localhost:8880/v1/models") - resp = urlopen(req, timeout=5) - results["kokoro_tts"] = "OK" - except Exception as e: - results["kokoro_tts"] = f"DOWN ({type(e).__name__})" + except Exception as e: + results["kokoro_tts"] = f"DOWN ({type(e).__name__})" # 6. Memory DB try: From f18650361b066468986c81955bc7a95bc4921889 Mon Sep 17 00:00:00 2001 From: Mickael Farina Date: Thu, 2 Jul 2026 16:29:10 +0200 Subject: [PATCH 2/2] fix: parse tts_url as full endpoint (scheme://host only for probe) Co-Authored-By: Claude Fable 5 --- skills/.manifest.json | 2 +- skills/health_check.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/skills/.manifest.json b/skills/.manifest.json index 18aacd9..4e1761f 100644 --- a/skills/.manifest.json +++ b/skills/.manifest.json @@ -49,7 +49,7 @@ "google_sheets.py": "d9b67b7e46ac835f4ef6d171d161b962c93c1916837f1b6aa5f4ec2804a36e69", "google_slides.py": "30193598c0214305c03412911781dd32794e6c9d6349ed6a242753c38eb49101", "google_tasks.py": "a609902fa2a12eddee70942f3786f146c7e413ad60e0bd7e394b0502b99dc1e7", - "health_check.py": "5a6e5c71f77bc2a2f856bd70c44dadebd1f67ae58d1fe65416fa40c19479744c", + "health_check.py": "01ac95da13770e2419460b4aaf1bd79c6628b6bc5413a5608153b81feee81568", "imessage_send.py": "862f7031a525faed4cec7cb703ef32f5d8bdc1045326f880d50455baf4cfcf86", "json_formatter.py": "42a770a1455a574d33e2f96f34c63ae7a83845f70789862e5e5198d0b429fde2", "memory_entities.py": "252ad5861d614b916504b8af6300c4a8c62622c9f6c15238b11d6c6a052bada7", diff --git a/skills/health_check.py b/skills/health_check.py index fcf9134..719ef77 100644 --- a/skills/health_check.py +++ b/skills/health_check.py @@ -60,10 +60,16 @@ def run(task: str = "", context: str = "") -> str: # Project-mode dry run wrote "kokoro_tts is DOWN" into its status brief # while the service was healthy. try: + from urllib.parse import urlparse tts_base = "http://localhost:8085" try: with open(os.path.expanduser("~/.codec/config.json")) as f: - tts_base = json.load(f).get("tts_url", tts_base).rstrip("/") + # tts_url is the FULL speech endpoint + # (e.g. http://localhost:8085/v1/audio/speech) — keep only + # scheme://host:port for the models probe. + _u = urlparse(json.load(f).get("tts_url", "")) + if _u.scheme and _u.netloc: + tts_base = f"{_u.scheme}://{_u.netloc}" except Exception: pass req = Request(f"{tts_base}/v1/models")