From e85ea97101b7a6f7293ff4995fd1b646286760dd Mon Sep 17 00:00:00 2001 From: Vuong Hoang Date: Sat, 17 Oct 2026 09:17:21 -0700 Subject: [PATCH] =?UTF-8?q?fix(svos=20nh3-svos):=20Matrix=20request=5Ftime?= =?UTF-8?q?out=5Fseconds=2060=20=E2=80=94=20stopgap=20for=20card=20audio?= =?UTF-8?q?=20dying=20at=20exactly=2015=20s=20(svos-dev)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nh3-svos-matrix-request-timeout-60.yaml | 38 +++++++++++++++++++ servers/nh3-svos/README.md | 9 ++++- 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 playbooks/svos-releases/nh3-svos-matrix-request-timeout-60.yaml diff --git a/playbooks/svos-releases/nh3-svos-matrix-request-timeout-60.yaml b/playbooks/svos-releases/nh3-svos-matrix-request-timeout-60.yaml new file mode 100644 index 0000000..ef446a5 --- /dev/null +++ b/playbooks/svos-releases/nh3-svos-matrix-request-timeout-60.yaml @@ -0,0 +1,38 @@ +# nh3-svos: [notifications.matrix] request_timeout_seconds 15 (default) -> 60. Stopgap for card audio (svos-dev's word +# 2026-10-17 0916, thread 01M5558E19Q3ZK4RRZXQG6A2Y9; allowed range 15..60): every summons synthesis died at exactly +# 15.0 s (12/12 since 10-10). Short cards speak with this; long ones still hit the voice app's 30 s audio cap until the +# spoken-summons code change (Prime's wording call) ships, then restore the default. Revert = instance.toml.pre-matrix-timeout. +steps: + - name: back up instance.toml + sudo: true + shell: runuser -u svc-svos -- cp -p /var/lib/svos/config/instance.toml /var/lib/svos/config/instance.toml.pre-matrix-timeout + creates: /var/lib/svos/config/instance.toml.pre-matrix-timeout + - name: add request_timeout_seconds = 60 under [notifications.matrix] + sudo: true + shell: | + runuser -u svc-svos -- python3 - <<'PY' + import os, re + p = "/var/lib/svos/config/instance.toml"; s = open(p).read() + block = s[s.index("[notifications.matrix]"):] + block = block[:block.index("\n[", 1)] if "\n[" in block[1:] else block + assert "request_timeout_seconds" not in block, "already set" + anchor = 'voice_id = "miranda-is"' + line = s[s.index(anchor):s.index("\n", s.index(anchor)) + 1] + assert s.count(line) == 1 + s = s.replace(line, line + 'request_timeout_seconds = 60 # 2026-10-17 stopgap (svos-dev): summons synthesis needs > 15 s; range 15..60\n') + t = p + ".tmp"; fd = os.open(t, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o600) + with os.fdopen(fd, "w") as f: f.write(s) + os.replace(t, p); print("edited") + PY + - name: the kernel accepts it (else restore) + sudo: true + shell: | + if runuser -u svc-svos -- /opt/svos/current/kernel-env/bin/svos-kernel check-config --data-root /var/lib/svos; then exit 0; fi + runuser -u svc-svos -- cp -p /var/lib/svos/config/instance.toml.pre-matrix-timeout /var/lib/svos/config/instance.toml; echo RESTORED; exit 1 + - name: reload + sudo: true + shell: systemctl reload svos-kernel; sleep 3; curl -s http://127.0.0.1:8400/health +verify: + - name: health ok, nothing down + shell: h=$(curl -s http://127.0.0.1:8400/health); echo "$h"; echo "$h" | grep -q '"status":"ok"' && echo "$h" | grep -q '"down":0' + changed_when: "false" diff --git a/servers/nh3-svos/README.md b/servers/nh3-svos/README.md index 3d3707e..3941b45 100644 --- a/servers/nh3-svos/README.md +++ b/servers/nh3-svos/README.md @@ -43,8 +43,13 @@ configuration, enrollment and acceptance. restore `instance.toml.pre-3726d73`, then `current → releases/33a7077`, then start. - nh3-dev: `current → releases/33a7077`, then restore `terminal.toml.pre-3726d73`, then restart svos-terminal. - Both apps' older revisions would raise cards again. -- ⚠ **Card audio fails every time:** `synthesis_failed` on every card since at least 10-11, today's included; the Matrix summons do - arrive. This predates v0.0.14. Reported to svos-dev. +- ⚠ **Card audio has failed every time:** 12 of 12 `synthesis_failed` since 10-10, each at **exactly 15.0 s**. That is the kernel's + `[notifications.matrix] request_timeout_seconds` (default 15) running out while synthesis is still going. The kernel speaks the Matrix + summons text, which includes three card ids spelled aloud, so it runs far past what 15 s covers (miranda-is ≈ 28 chars of text per + second; 167 chars took 5.85 s median, n=3). **Stopgap 2026-10-17 0917 (svos-dev's word): `request_timeout_seconds = 60`** (range + 15..60; config gen `d69e7ae87d14ed45`; revert = `instance.toml.pre-matrix-timeout`). Long cards still fail at the voice app's 30 s + audio cap (`utterance_seconds`, max 30, about 480 chars). The real fix is a shorter spoken summons, a kernel patch whose + wording is Prime's call. Restore the 15 s default once it ships. ## Release 452a592 / v0.0.11, U15 task seats slice 1 (2026-10-13 2131–2133; Prime's 2010 go via svos-dev, thread `01M4WAGAS2Z0P8J6GZRSCRPH2Q`)