worker+voice: per-conn context, store error hygiene, StateDir wiring, pipe leak

worker/server.go: dispatch now receives a per-connection context instead of
context.Background(), so handler cancellation propagates on conn close.

voice/server.go: same — per-conn context fed through safeDispatch into
HandlePushToTalk instead of context.Background().

store/reminders.go: propagate LastInsertId error.
store/nudges.go: propagate LastInsertId and RowsAffected errors.
store/tools.go: propagate RowsAffected error.

config/config.go: applyDefaults now respects StateDir when set, using it as
the base for empty DBPath/SocketPath instead of silently ignoring it.

phraser/llmphraser.go: close stderr pipe fd when cmd.Start() fails.
This commit is contained in:
kami
2026-07-03 11:03:14 +02:00
parent b77f209686
commit 861e418669
7 changed files with 47 additions and 18 deletions
+4 -1
View File
@@ -43,7 +43,10 @@ func (s *Store) ProposeTool(ctx context.Context, name, utterance string, ts time
if err != nil {
return false, fmt.Errorf("propose tool: %w", err)
}
n, _ := res.RowsAffected()
n, err := res.RowsAffected()
if err != nil {
return false, fmt.Errorf("propose tool: rows affected: %w", err)
}
return n > 0, nil
}