Improve sound server fallback and speech acknowledgement handling

Try the invoking user session followed by /run/pulse/native for sound
cues, while preserving an explicit PULSE_SERVER override. Resolve the
user socket from SUDO_UID, XDG_RUNTIME_DIR, or the current UID, and
document the fallback and Speech Dispatcher audio configuration.

Allow five seconds for Speech Dispatcher command acknowledgements so
large voice catalog queries can finish without premature failures.
Add regression coverage for socket selection and delayed replies.

Include cpu-usage.patch as a standalone patch artifact containing Python
remote registry permission and registration failure handling changes.
The patch is stored without applying it to the Python sources.

Validation: go test ./internal/sound ./internal/speech -count=1 passed
with GOCACHE=/tmp/cthulhu-go-cache and GOPROXY=off outside the sandbox
to permit local Unix sockets. source diff whitespace checks passed.
The staged patch has whitespace warnings from preserved blank context
lines; its contents are retained unchanged.
Live audio and keyboard behavior were not tested.
This commit is contained in:
deedra committed 2026-10-28 08:57:12 -07:00
1 parent 60abcc37d9
commit db6955f5b7
7 files changed
+177 -10

No files matched your search

+4 -1
View File
@@ -34,7 +34,10 @@ import (
"git.stormux.org/storm/fenrir/internal/diagnostic"
)
const commandTimeout = 750 * time.Millisecond
// Speech Dispatcher serializes some module queries with speech commands.
// Large voice catalogs can delay acknowledgements beyond a fraction of a second.
// Keep the wait bounded while allowing those queries to finish.
const commandTimeout = 5 * time.Second
type Rejection struct{ Code string }