fix(svos nh3-svos): Matrix request_timeout_seconds 60 — stopgap for card audio dying at exactly 15 s (svos-dev)

This commit is contained in:
vh
2026-10-17 09:17:21 -07:00
parent 77b75aa172
commit e85ea97101
2 changed files with 45 additions and 2 deletions
@@ -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"
+7 -2
View File
@@ -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`)