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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user