v31.0

Notifuse/notifusev31.0May 19, 2026by pierre-b

AI Summary

This release fixes several issues including a self-loop in segment recomputation, UTC time handling for recurring tasks, and database pool health check context isolation.

Key Highlights

  • Fix: Segment recomputation trigger no longer re-enqueues contacts (self-loop fix)
  • Fix: Recurring tasks timeout_after written in UTC
  • Fix: Broadcast pause next_run_after written in UTC
  • Fix: GetWorkspaceConnection pool health check uses isolated context

Full Release Notes

### Database Schema Changes

- Migration v31.0 updates the `queue_contact_for_segment_recomputation` trigger function on every workspace database to short-circuit when the inserted `contact_timeline` row is itself a segment membership event (`kind IN ('segment.joined', 'segment.left')`).

### Fixes

- **Fix**: `queue_contact_for_segment_recomputation` trigger no longer re-enqueues contacts when the inserted `contact_timeline` event is itself a segment membership change (`segment.joined`/`segment.left`). Removes a self-loop where every membership write re-queued the same contact.
- **Fix**: Recurring tasks dispatched via HTTP now write `timeout_after` in UTC. The column is `TIMESTAMP WITHOUT TIME ZONE` and the scheduler compares it against `time.Now().UTC()`; on non-UTC hosts the local-time value caused the task to appear "still running" for the host's UTC offset. Same fix applied to the broadcast-pause `next_run_after`.
- **Fix**: `GetWorkspaceConnection`'s pool health check now uses an isolated context for `pool.PingContext` instead of the caller's. A caller-context cancellation no longer triggers pool eviction.